HandBrake/macosx/HBAudioTrack.h
Damiano Galassi 66fe47c548
libhb: ui: add new presets key for track names (#6840)
Add AudioTrackNamePassthru and SubtitleTrackNamePassthru preset key to
preserve the existing track names, and AudioAutomaticNamingBehavior to
disable or enable the audio track automatic names.

Co-authored-by: sr55 <sr55.code@outlook.com>
2025-06-03 08:48:59 +02:00

67 lines
2.1 KiB
Objective-C

/* HBAudioTrack.h $
This file is part of the HandBrake source code.
Homepage: <http://handbrake.fr/>.
It may be used under the terms of the GNU General Public License. */
#import <Foundation/Foundation.h>
@class HBAudioTrack;
@class HBTitleAudioTrack;
NS_ASSUME_NONNULL_BEGIN
@protocol HBAudioTrackDataSource <NSObject>
- (HBTitleAudioTrack *)sourceTrackAtIndex:(NSUInteger)idx;
- (NSArray<NSString *> *)sourceTracksArray;
- (nullable NSString *)defaultTitleForTrackAtIndex:(NSUInteger)idx mixdown:(int)mixdown;
@end
@protocol HBAudioTrackDelegate <NSObject>
- (void)track:(HBAudioTrack *)track didChangeSourceFrom:(NSUInteger)oldSourceIdx;
- (void)encoderChanged;
@end
@interface HBAudioTrack : NSObject <NSSecureCoding, NSCopying>
- (instancetype)initWithTrackIdx:(NSUInteger)index
container:(int)container
dataSource:(id<HBAudioTrackDataSource>)dataSource
delegate:(id<HBAudioTrackDelegate>)delegate;
/// The index of the source in the data source tracks array.
@property (nonatomic, readwrite) NSUInteger sourceTrackIdx;
@property (nonatomic, readwrite) int container;
@property (nonatomic, weak, nullable) id<HBAudioTrackDataSource> dataSource;
@property (nonatomic, weak, nullable) id<HBAudioTrackDelegate> delegate;
/**
* track properties.
*/
@property (nonatomic, readwrite) int encoder;
@property (nonatomic, readwrite) int mixdown;
@property (nonatomic, readwrite) int sampleRate;
@property (nonatomic, readwrite) int bitRate;
@property (nonatomic, readwrite) double gain;
@property (nonatomic, readwrite) double drc;
@property (nonatomic, readwrite, nullable) NSString *title;
@property (nonatomic, readonly, getter=isEnabled) BOOL enabled;
/**
* Arrays of possible options for the track properties.
*/
@property (nonatomic, readonly) NSArray<NSString *> *encoders;
@property (nonatomic, readonly) NSArray<NSString *> *mixdowns;
@property (nonatomic, readonly) NSArray<NSString *> *sampleRates;
@property (nonatomic, readonly) NSArray<NSString *> *bitRates;
@property (nonatomic, readwrite, weak, nullable) NSUndoManager *undo;
@end
NS_ASSUME_NONNULL_END