reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofAVFoundationVideoPlayer Class Reference

#include <ofAVFoundationVideoPlayer.h>

Inheritance diagram for ofAVFoundationVideoPlayer:

Instance Methods

(BOOL) - loadWithFile:async:
 
(BOOL) - loadWithPath:async:
 
(BOOL) - loadWithURL:async:stream:
 
(void) - unloadVideoAsync
 
(void) - unloadVideo
 
(void) - update
 
(void) - play
 
(void) - pause
 
(void) - togglePlayPause
 
(void) - stop
 
(void) - stepByCount:
 
(void) - seekToStart
 
(void) - seekToEnd
 
(void) - seekToTime:
 
(void) - seekToTime:withTolerance:
 
(BOOL) - isReady
 
(BOOL) - isLoaded
 
(BOOL) - isPlaying
 
(BOOL) - isPaused
 
(BOOL) - isNewFrame
 
(BOOL) - isFinished
 
(void) - setEnableVideoSampling:
 
(void) - setEnableAudioSampling:
 
(void) - setSynchSampleTime:
 
(void) - setSynchSampleTimeInSec:
 
(CMTime) - getVideoSampleTime
 
(double) - getVideoSampleTimeInSec
 
(CMTime) - getAudioSampleTime
 
(double) - getAudioSampleTimeInSec
 
(CMSampleBufferRef) - getVideoSampleBuffer
 
(CMSampleBufferRef) - getAudioSampleBuffer
 
(CVImageBufferRef) - getCurrentFrame
 
(NSInteger) - getWidth
 
(NSInteger) - getHeight
 
(CMTime) - getCurrentTime
 
(double) - getCurrentTimeInSec
 
(CMTime) - getDuration
 
(double) - getDurationInSec
 
(int) - getDurationInFrames
 
(int) - getCurrentFrameNum
 
(float) - getFrameRate
 
(void) - setFrame:
 
(void) - setPosition:
 
(float) - getPosition
 
(void) - setVolume:
 
(float) - getVolume
 
(void) - setLoop:
 
(playerLoopType- getLoop
 
(void) - setSpeed:
 
(float) - getSpeed
 
(void) - setAutoplay:
 
(BOOL) - getAutoplay
 
(void) - setWillBeUpdatedExternally:
 
(void) - close
 
(void) - setStreaming:
 

Protected Attributes

CMVideoFormatDescriptionRef _videoInfo
 
id timeObserver
 
CMSampleBufferRef videoSampleBuffer
 
CMSampleBufferRef audioSampleBuffer
 
CMTime videoSampleTime
 
CMTime videoSampleTimePrev
 
CMTime audioSampleTime
 
CMTime synchSampleTime
 
CMTime duration
 
CMTime currentTime
 
float volume
 
float speed
 
float frameRate
 
NSInteger videoWidth
 
NSInteger videoHeight
 
playerLoopType loop
 
BOOL bWillBeUpdatedExternally
 
BOOL bReady
 
BOOL bLoaded
 
BOOL bPlayStateBeforeLoad
 
BOOL bUpdateFirstFrame
 
BOOL bNewFrame
 
BOOL bPlaying
 
BOOL bWasPlayingBackwards
 
BOOL bFinished
 
BOOL bAutoPlayOnLoad
 
BOOL bSeeking
 
BOOL bSampleVideo
 
BOOL bSampleAudio
 
BOOL bIsUnloaded
 
BOOL bStream
 
int frameBeforeReady
 
float positionBeforeReady
 
BOOL bIsStopped
 
NSLock * asyncLock
 
NSCondition * deallocCond
 

Properties

AVPlayer * player
 
AVAsset * asset
 
AVPlayerItem * playerItem
 
AVAssetReader * assetReader
 
AVAssetReaderTrackOutput * assetReaderVideoTrackOutput
 
AVAssetReaderTrackOutput * assetReaderAudioTrackOutput
 
AVPlayerItemVideoOutput * videoOutput
 

Method Documentation

◆ close

- (void) close

◆ getAudioSampleBuffer

- (CMSampleBufferRef) getAudioSampleBuffer

◆ getAudioSampleTime

- (CMTime) getAudioSampleTime

◆ getAudioSampleTimeInSec

- (double) getAudioSampleTimeInSec

◆ getAutoplay

- (BOOL) getAutoplay

◆ getCurrentFrame

- (CVImageBufferRef) getCurrentFrame

◆ getCurrentFrameNum

- (int) getCurrentFrameNum

◆ getCurrentTime

- (CMTime) getCurrentTime

◆ getCurrentTimeInSec

- (double) getCurrentTimeInSec

◆ getDuration

- (CMTime) getDuration

◆ getDurationInFrames

- (int) getDurationInFrames

◆ getDurationInSec

- (double) getDurationInSec

◆ getFrameRate

- (float) getFrameRate

◆ getHeight

- (NSInteger) getHeight

◆ getLoop

- (playerLoopType) getLoop

◆ getPosition

- (float) getPosition

◆ getSpeed

- (float) getSpeed

◆ getVideoSampleBuffer

- (CMSampleBufferRef) getVideoSampleBuffer

◆ getVideoSampleTime

- (CMTime) getVideoSampleTime

◆ getVideoSampleTimeInSec

- (double) getVideoSampleTimeInSec

◆ getVolume

- (float) getVolume

◆ getWidth

- (NSInteger) getWidth

◆ isFinished

- (BOOL) isFinished

◆ isLoaded

- (BOOL) isLoaded

◆ isNewFrame

- (BOOL) isNewFrame

◆ isPaused

- (BOOL) isPaused

◆ isPlaying

- (BOOL) isPlaying

◆ isReady

- (BOOL) isReady

◆ loadWithFile:async:

- (BOOL) loadWithFile: (NSString*)  file
async: (BOOL)  bAsync 

◆ loadWithPath:async:

- (BOOL) loadWithPath: (NSString*)  path
async: (BOOL)  bAsync 

◆ loadWithURL:async:stream:

- (BOOL) loadWithURL: (NSURL*)  url
async: (BOOL)  bAsync
stream: (BOOL)  isStream 

◆ pause

- (void) pause

◆ play

- (void) play

◆ seekToEnd

- (void) seekToEnd

◆ seekToStart

- (void) seekToStart

◆ seekToTime:

- (void) seekToTime: (CMTime)  time

◆ seekToTime:withTolerance:

- (void) seekToTime: (CMTime)  time
withTolerance: (CMTime)  tolerance 

◆ setAutoplay:

- (void) setAutoplay: (BOOL)  bAutoplay

◆ setEnableAudioSampling:

- (void) setEnableAudioSampling: (BOOL)  value

◆ setEnableVideoSampling:

- (void) setEnableVideoSampling: (BOOL)  value

◆ setFrame:

- (void) setFrame: (int)  frame

◆ setLoop:

- (void) setLoop: (playerLoopType loop

◆ setPosition:

- (void) setPosition: (float)  position

◆ setSpeed:

- (void) setSpeed: (float)  speed

◆ setStreaming:

- (void) setStreaming: (BOOL)  value

◆ setSynchSampleTime:

- (void) setSynchSampleTime: (CMTime)  time

◆ setSynchSampleTimeInSec:

- (void) setSynchSampleTimeInSec: (double)  time

◆ setVolume:

- (void) setVolume: (float)  volume

◆ setWillBeUpdatedExternally:

- (void) setWillBeUpdatedExternally: (BOOL)  value

◆ stepByCount:

- (void) stepByCount: (long)  frames

◆ stop

- (void) stop

◆ togglePlayPause

- (void) togglePlayPause

◆ unloadVideo

- (void) unloadVideo

◆ unloadVideoAsync

- (void) unloadVideoAsync

◆ update

- (void) update

return if, video is not yet loaded, video is finished playing.

Member Data Documentation

◆ _videoInfo

- (CMVideoFormatDescriptionRef) _videoInfo
protected

◆ asyncLock

- (NSLock*) asyncLock
protected

◆ audioSampleBuffer

- (CMSampleBufferRef) audioSampleBuffer
protected

◆ audioSampleTime

- (CMTime) audioSampleTime
protected

◆ bAutoPlayOnLoad

- (BOOL) bAutoPlayOnLoad
protected

◆ bFinished

- (BOOL) bFinished
protected

◆ bIsStopped

- (BOOL) bIsStopped
protected

◆ bIsUnloaded

- (BOOL) bIsUnloaded
protected

◆ bLoaded

- (BOOL) bLoaded
protected

◆ bNewFrame

- (BOOL) bNewFrame
protected

◆ bPlaying

- (BOOL) bPlaying
protected

◆ bPlayStateBeforeLoad

- (BOOL) bPlayStateBeforeLoad
protected

◆ bReady

- (BOOL) bReady
protected

◆ bSampleAudio

- (BOOL) bSampleAudio
protected

◆ bSampleVideo

- (BOOL) bSampleVideo
protected

◆ bSeeking

- (BOOL) bSeeking
protected

◆ bStream

- (BOOL) bStream
protected

◆ bUpdateFirstFrame

- (BOOL) bUpdateFirstFrame
protected

◆ bWasPlayingBackwards

- (BOOL) bWasPlayingBackwards
protected

◆ bWillBeUpdatedExternally

- (BOOL) bWillBeUpdatedExternally
protected

◆ currentTime

- (CMTime) currentTime
protected

◆ deallocCond

- (NSCondition*) deallocCond
protected

◆ duration

- (CMTime) duration
protected

◆ frameBeforeReady

- (int) frameBeforeReady
protected

◆ frameRate

- (float) frameRate
protected

◆ loop

- (playerLoopType) loop
protected

◆ positionBeforeReady

- (float) positionBeforeReady
protected

◆ speed

- (float) speed
protected

◆ synchSampleTime

- (CMTime) synchSampleTime
protected

◆ timeObserver

- (id) timeObserver
protected

◆ videoHeight

- (NSInteger) videoHeight
protected

◆ videoSampleBuffer

- (CMSampleBufferRef) videoSampleBuffer
protected

◆ videoSampleTime

- (CMTime) videoSampleTime
protected

◆ videoSampleTimePrev

- (CMTime) videoSampleTimePrev
protected

◆ videoWidth

- (NSInteger) videoWidth
protected

◆ volume

- (float) volume
protected

Property Documentation

◆ asset

- (AVAsset*) asset
readwritenonatomicstrong

◆ assetReader

- (AVAssetReader*) assetReader
readwritenonatomicstrong

◆ assetReaderAudioTrackOutput

- (AVAssetReaderTrackOutput*) assetReaderAudioTrackOutput
readwritenonatomicstrong

◆ assetReaderVideoTrackOutput

- (AVAssetReaderTrackOutput*) assetReaderVideoTrackOutput
readwritenonatomicstrong

◆ player

- (AVPlayer*) player
readwritenonatomicstrong

◆ playerItem

- (AVPlayerItem*) playerItem
readwritenonatomicstrong

◆ videoOutput

- (AVPlayerItemVideoOutput*) videoOutput
readwritenonatomicstrong

The documentation for this class was generated from the following files: