Skip to content

Commit

Permalink
SGSWScale: Format.
Browse files Browse the repository at this point in the history
  • Loading branch information
libobjc committed Nov 1, 2019
1 parent 70ab4e8 commit e4e192e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
12 changes: 12 additions & 0 deletions SGPlayer/Classes/Core/SGDescription/SGVideoDescriptor.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ - (instancetype)initWithFrame:(AVFrame *)frame
return self;
}

- (void)setFormat:(int)format
{
self->_format = format;
self->_cv_format = SGPixelFormatFF2AV(format);
}

- (void)setCv_format:(OSType)cv_format
{
self->_format = SGPixelFormatAV2FF(cv_format);
self->_cv_format = cv_format;
}

- (BOOL)isEqualToDescriptor:(SGVideoDescriptor *)descriptor
{
if (!descriptor) {
Expand Down
2 changes: 1 addition & 1 deletion SGPlayer/Classes/Core/SGProcessor/SGSWScale.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ - (int)convert:(const uint8_t *const [])inputData inputLinesize:(const int [])in
0,
self->_inputDescriptor.height,
outputData,
outputLinesize);;
outputLinesize);
}

@end
3 changes: 3 additions & 0 deletions SGPlayer/Classes/SGPlayerHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ FOUNDATION_EXPORT const unsigned char SGPlayerVersionString[];
#import "SGURLSegment.h"
#import "SGPaddingSegment.h"

#import "SGDemuxable.h"
#import "SGURLDemuxer.h"

#import "SGPlayerItem.h"
#import "SGFrameOutput.h"
#import "SGPacketOutput.h"
Expand Down

0 comments on commit e4e192e

Please sign in to comment.