Vuo  2.3.2
VuoAvPlayerObject.h
Go to the documentation of this file.
1 
10 #include "VuoMacOSSDKWorkaround.h"
11 #import <Cocoa/Cocoa.h>
12 
13 #include "VuoVideoFrame.h"
14 #include "VuoAudioFrame.h"
15 #include "VuoImage.h"
16 #include "VuoLoopType.h"
17 #import <AVFoundation/AVFoundation.h>
18 
19 @class VuoAvTrackOutput;
20 
24 @interface VuoAvPlayerObject : NSObject
25 {
27  AVAsset* asset;
29  // AVPlayer* player;
33  AVAssetReader* assetReader;
37  AVAssetReaderTrackOutput* assetReaderAudioTrackOutput;
38 
40  volatile bool isReady;
44  float playbackRate;
50  void(*readyToPlayCallback)(void* decoderCppObject, bool canPlayMedia);
51 
53  NSMutableArray* videoQueue;
54 
56  Float32* audioBuffer;
66  unsigned int audioBufferSampleIndex;
68  unsigned int audioChannelCount;
71 
72  bool hasAlpha;
73 
75  CVOpenGLTextureCacheRef textureCache;
76 }
77 
79 - (id) init;
81 - (void) setPlayerCallback:(void (*)(void* functionPtr, bool canPlayMedia))callback target:(void*)decoderCppObject;
83 - (bool) setURL:(NSURL*)url;
85 // - (void) unload;
87 - (void) setPlaybackRate:(double)rate;
89 - (bool) decodePreceedingVideoSamples;
91 - (bool) seekToSecond:(float)second withRange:(float)range frame:(VuoVideoFrame *)frame;
93 - (bool) canBeginPlayback;
95 - (bool) nextVideoFrame:(VuoVideoFrame*)frame;
97 - (bool) nextAudioFrame:(VuoAudioFrame*) frame;
99 - (VuoReal) getCurrentTimestamp;
101 - (bool) setAssetReaderTimeRange:(CMTimeRange)timeRange;
103 - (bool) copyNextVideoSampleBuffer;
105 - (unsigned int) getAudioChannelCount:(AVAssetTrack*) track;
107 - (bool) audioEnabled;
109 - (VuoReal) getDuration;
111 - (double) getFrameRate;
113 - (bool) canPlayAudio;
115 - (unsigned int) audioChannels;
117 + (void) releaseAssetReader:(AVAssetReader*)reader;
118 @end