Skip to content

Commit

Permalink
SGOutput: Optsions.
Browse files Browse the repository at this point in the history
  • Loading branch information
libobjc committed Oct 28, 2019
1 parent 5b28137 commit 82bcc97
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions SGPlayer/Classes/Core/SGSession/SGFrameOutput.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "SGVideoDecoder.h"
#import "SGPacketOutput.h"
#import "SGDecodeLoop.h"
#import "SGOptions.h"
#import "SGMacro.h"
#import "SGLock.h"

Expand Down Expand Up @@ -53,6 +54,7 @@ - (instancetype)initWithAsset:(SGAsset *)asset
self->_capacityFlags[i] = NO;
self->_capacities[i] = SGCapacityCreate();
}
[self setDecoderOptions:[SGOptions sharedOptions].decoder.copy];
}
return self;
}
Expand All @@ -75,9 +77,9 @@ - (void)dealloc
SGGet0Map(CMTime, duration, self->_packetOutput)
SGGet0Map(NSDictionary *, metadata, self->_packetOutput)
SGGet0Map(NSArray<SGTrack *> *, tracks, self->_packetOutput)
SGGet0Map(SGDemuxerOptions *, demuxerOptions, self->_packetOutput)
SGSet1Map(void, setDemuxerOptions, SGDemuxerOptions *, self->_packetOutput)
SGGet00Map(SGDemuxerOptions *,demuxerOptions, options, self->_packetOutput)
SGGet00Map(SGDecoderOptions *, decoderOptions, options, self->_audioDecoder)
SGSet11Map(void, setDemuxerOptions, setOptions, SGDemuxerOptions *, self->_packetOutput)

#pragma mark - Setter & Getter

Expand Down
2 changes: 1 addition & 1 deletion SGPlayer/Classes/Core/SGSession/SGPacketOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ typedef NS_ENUM(NSUInteger, SGPacketOutputState) {
/**
*
*/
@property (nonatomic, copy) SGDemuxerOptions *demuxerOptions;
@property (nonatomic, copy) SGDemuxerOptions *options;

/**
*
Expand Down
2 changes: 2 additions & 0 deletions SGPlayer/Classes/Core/SGSession/SGPacketOutput.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "SGPacketOutput.h"
#import "SGAsset+Internal.h"
#import "SGDemuxable.h"
#import "SGOptions.h"
#import "SGError.h"
#import "SGMacro.h"
#import "SGLock.h"
Expand Down Expand Up @@ -43,6 +44,7 @@ - (instancetype)initWithAsset:(SGAsset *)asset
self->_demuxable.delegate = self;
self->_lock = [[NSLock alloc] init];
self->_wakeup = [[NSCondition alloc] init];
[self setOptions:[SGOptions sharedOptions].demuxer.copy];
}
return self;
}
Expand Down

0 comments on commit 82bcc97

Please sign in to comment.