Skip to content

Commit

Permalink
Playback tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcampbell05 committed Nov 4, 2014
1 parent e0f9c3f commit f229012
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
5 changes: 0 additions & 5 deletions framework/Source/GPUImageMovie.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
*/
@property(readwrite, nonatomic, nonatomic) BOOL shouldRepeat;

/** This specifies the progress of the process on a scale from 0 to 1.0. A value of 0 means the process has not yet begun, A value of 1.0 means the conversaion is complete.
This property is not key-value observable.
*/
@property(readonly, nonatomic, nonatomic) float progress;

/** Volume for audio track.
*/
@property(nonatomic, assign) NSUInteger volume;
Expand Down
24 changes: 2 additions & 22 deletions framework/Source/GPUImageMovie.m
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ - (void)prepareForPlayback
if ([videoTrack statusOfValueForKey:@"preferredTransform" error:nil] == AVKeyValueStatusLoaded) {


dispatch_async(dispatch_get_main_queue(), ^{
// dispatch_async(dispatch_get_main_queue(), ^{
[self.playerItem addOutput:self.playerItemOutput];
[self.player replaceCurrentItemWithPlayerItem:self.playerItem];
[self.playerItemOutput requestNotificationOfMediaDataChangeWithAdvanceInterval:ONE_FRAME_DURATION];
[self.player play];
});
// });

}

Expand Down Expand Up @@ -297,26 +297,6 @@ - (void)processMovieFrame:(CMSampleBufferRef)movieSampleBuffer;
[self processMovieFrame:movieFrame withSampleTime:currentSampleTime];
}

- (float)progress
{
// if ( AVAssetReaderStatusReading == self.reader.status )
// {
// float current = self.processingFrameTime.value * 1.0f / self.processingFrameTime.timescale;
// float duration = self.playerItem.asset.duration.value * 1.0f / self.playerItem.asset.duration.timescale;
// return current / duration;
// }
// else if ( AVAssetReaderStatusCompleted == self.reader.status )
// {
// return 1.f;
// }
// else
// {
// return 0.f;
// }

return 0.0f;
}

- (void)processMovieFrame:(CVPixelBufferRef)movieFrame withSampleTime:(CMTime)currentSampleTime
{
int bufferHeight = (int) CVPixelBufferGetHeight(movieFrame);
Expand Down

0 comments on commit f229012

Please sign in to comment.