BitmapToolkit Scol plugin
|
MediaPlayerToolkit.cpp
Go to the documentation of this file.
279 if ((player == NULL) || (iBuff == NIL) || (iwidth == NIL) || (iheight == NIL) || (ibytesperpixel == NIL))
296 cv::Mat imagesrc = ConversionTools::ScolBitmapBufferToMat((void*)buffer, iwidth, iheight, ibytesperpixel);
1245 { "_BLTmediaPlayerBuffer", 5, "fun [ObjMediaPlayer ObjBuff I I I] ObjBuff", _BLTmediaPlayerBuffer },
1257 { "_SETmediaPlayerStream", 2, "fun [ObjMediaPlayer I] ObjMediaPlayer", _SETmediaPlayerStream },
1258 { "_SETmediaPlayerAudioStream", 2, "fun [ObjMediaPlayer I] ObjMediaPlayer", _SETmediaPlayerAudioStream },
1260 { "_SETmediaPlayerAudioFormat", 3, "fun [ObjMediaPlayer I I] ObjMediaPlayer", _SETmediaPlayerAudioFormat },
1266 { "_GETmediaPlayerAudioStreams", 1, "fun [ObjMediaPlayer] [S r1]", _GETmediaPlayerAudioStreams },
1267 { "_GETmediaPlayerVideoStreams", 1, "fun [ObjMediaPlayer] [S r1]", _GETmediaPlayerVideoStreams },
1268 { "_CBmediaPlayerEnd", 3, "fun [ObjMediaPlayer fun [ObjMediaPlayer u0] u1 u0] ObjMediaPlayer", _CBmediaPlayerEnd},
1269 { "_CBmediaPlayerLoaded", 3, "fun [ObjMediaPlayer fun [ObjMediaPlayer u0 I] u1 u0] ObjMediaPlayer", _CBmediaPlayerLoaded}
1288 OBJMEDIAPLAYERSCOL = OBJregister(NBMEDIAPLAYER_CALLBACK, 0, destroyMediaPlayerObj, "OBJMEDIAPLAYERSCOL");
1290 k = PKhardpak2(m, "MediaPlayerToolkitEngine", sizeof(videoToolkitEngine) / sizeof(videoToolkitEngine[0]), videoToolkitEngine);
int UnloadMediaPlayerToolkit()
int LoadMediaPlayerToolkit(mmachine m)
static cv::Mat ScolBitmapBufferToMat(void *buffer, int width, int height, int nbcomponents, bool align=true)
Definition ScolConvert.cpp:611
int GetAudioThreaded(char *destBuffer, size_t length)
Get decoded audio data from the media (using the dedicated audio thread).
Definition MediaPlayer.cpp:1481
int SetVideoStream(int streamIndex=-1)
Select the video stream to play from the current file.
Definition MediaPlayer.cpp:662
bool HasAudio()
Check whether the player has an audio track selected and ready to play.
Definition MediaPlayer.cpp:360
void Play(long startPosition=0)
Play/resume the currently loaded media.
Definition MediaPlayer.cpp:487
void SetAudioFormat(AudioFormats format, int sampleRate)
Set the output format for audio.
Definition MediaPlayer.cpp:432
bool GetFrame(ObjBitmap *scolBitmap)
Get the current decoded video frame.
Definition MediaPlayer.cpp:595
std::vector< std::string > ListStreams(AVMediaType type)
Definition MediaPlayer.cpp:788
bool HasVideo()
Check whether the player has a video track selected and ready to play.
Definition MediaPlayer.cpp:365
void GetSize(int &width, int &height)
Get the current size of the video (after resize)
Definition MediaPlayer.cpp:398
void GetSourceSize(int &width, int &height)
Get the original size of the video (before resize)
Definition MediaPlayer.cpp:409
int SetAudioStream(int streamIndex=-1)
Select the audio stream to play from the current file.
Definition MediaPlayer.cpp:703
void SetCurrentTime(long time)
Set the current playback time of the media.
Definition MediaPlayer.cpp:561
static void DeInitFFmpeg()
Free resources allocated by init. Call this when you're done with MediaPlayer.
Definition MediaPlayer.cpp:76
static void InitFFmpeg()
Init FFmpeg functionalities. Call this before any other MediaPlayer functions.
Definition MediaPlayer.cpp:69
void Open(std::string path)
Open the media file at the given path. If a media was already loaded, it will be replaced by the new ...
Definition MediaPlayer.cpp:239
static bool IsValidPlayer(MediaPlayer *player)
Check whether a media player is still valid.
Definition MediaPlayer.cpp:99
int _GETmediaPlayerSize(mmachine m)
_GETmediaPlayerSize : Get the current video size. Prototype: fun [ObjMediaPlayer] [I I]
Definition MediaPlayerToolkit.cpp:494
int _BLTmediaPlayerBuffer(mmachine m)
_BLTmediaPlayerBuffer : This function blits the current video frame into a buffer Prototype: fun [Obj...
Definition MediaPlayerToolkit.cpp:267
int _OPENmediaPlayerUrl(mmachine m)
_OPENmediaPlayerUrl : open a media player url.
Definition MediaPlayerToolkit.cpp:143
int destroyMediaPlayerObj(mmachine m, SCOL_PTR_TYPE handsys, int objm)
Definition MediaPlayerToolkit.cpp:61
int _SETmediaPlayerLoop(mmachine m)
_SETmediaPlayerLoop : Toggle loop playback mode. Prototype: fun [ObjMediaPlayer I] ObjMediaPlayer
Definition MediaPlayerToolkit.cpp:716
int _STOPmediaPlayer(mmachine m)
_STOPmediaPlayer : Stop the video. Prototype: fun [ObjMediaPlayer] ObjMediaPlayer
Definition MediaPlayerToolkit.cpp:433
int _GETmediaPlayerHasAudio(mmachine m)
_GETmediaPlayerHasAudio : Check whether an audio stream is selected and ready to play....
Definition MediaPlayerToolkit.cpp:926
int _OPENmediaPlayerFile(mmachine m)
_OPENmediaPlayerFile : open a media player file.
Definition MediaPlayerToolkit.cpp:188
int _PAUSEmediaPlayer(mmachine m)
_PAUSEmediaPlayer : Pause the video. Prototype: fun [ObjMediaPlayer] ObjMediaPlayer
Definition MediaPlayerToolkit.cpp:399
int _GETmediaPlayerSourceSize(mmachine m)
_GETmediaPlayerSourceSize : Get the size of the source video, before resize. Prototype: fun [ObjMedia...
Definition MediaPlayerToolkit.cpp:542
int _CBmediaPlayerLoaded(mmachine m)
_CBmediaPlayerLoaded : This function set the Callback for loaded event of a media player Prototype: f...
Definition MediaPlayerToolkit.cpp:1203
int getMediaPlayerEndCb(mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE ret)
Definition MediaPlayerToolkit.cpp:1182
int _PLAYmediaPlayer(mmachine m)
_PLAYmediaPlayer : Play / resume (if paused) the video. Prototype: fun [ObjMediaPlayer] ObjMediaPlaye...
Definition MediaPlayerToolkit.cpp:365
int getMediaPlayerLoadedCb(mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE ret)
Definition MediaPlayerToolkit.cpp:1208
int _GETmediaPlayerHasVideo(mmachine m)
_GETmediaPlayerHasVideo : Check whether a video stream is selected and ready to play....
Definition MediaPlayerToolkit.cpp:954
int _SETmediaPlayerAudioStream(mmachine m)
_SETmediaPlayerAudioStream : Select an audio stream to play in the current file. Prototype: fun [ObjM...
Definition MediaPlayerToolkit.cpp:792
int _GETmediaPlayerIsSeekable(mmachine m)
_GETmediaPlayerIsSeekable : Check whether the current media source supports seeking....
Definition MediaPlayerToolkit.cpp:1038
int _SETmediaPlayerSize(mmachine m)
_SETmediaPlayerSize : Change the video size. Prototype: fun [ObjMediaPlayer I I] ObjMediaPlayer
Definition MediaPlayerToolkit.cpp:460
int _GETmediaPlayerIsLiveStream(mmachine m)
_GETmediaPlayerIsLiveStream : Check whether the current media source is a live stream or not....
Definition MediaPlayerToolkit.cpp:1010
MediaPlayer * getPlayerFromStack(mmachine m, int pos)
Definition MediaPlayerToolkit.cpp:51
int _SETmediaPlayerStream(mmachine m)
_SETmediaPlayerStream : Select a video stream to play in the current file. Prototype: fun [ObjMediaPl...
Definition MediaPlayerToolkit.cpp:750
int _GETmediaPlayerLength(mmachine m)
_GETmediaPlayerLength : Get the media player length. Prototype: fun [ObjMediaPlayer] I
Definition MediaPlayerToolkit.cpp:634
int _GETmediaPlayerState(mmachine m)
_GETmediaPlayerState : Get the current playback state of a MediaPlayer. Prototype: fun [ObjMediaPlaye...
Definition MediaPlayerToolkit.cpp:982
int _DSmediaPlayer(mmachine m)
_DSMediaPlayer : Delete a media player object.
Definition MediaPlayerToolkit.cpp:116
int _GETmediaPlayerVideoStreams(mmachine m)
_GETmediaPlayerVideoStreams : Get a list of the current file's video streams. Prototype: fun [ObjMedi...
Definition MediaPlayerToolkit.cpp:1122
int _GETmediaPlayerAudioStreams(mmachine m)
_GETmediaPlayerAudioStreams : Get a list of the current file's audio streams. Prototype: fun [ObjMedi...
Definition MediaPlayerToolkit.cpp:1067
int _SEEKmediaPlayer(mmachine m)
_SEEKmediaPlayer : Seek to the given position in milliseconds. Prototype: fun [ObjMediaPlayer I] ObjM...
Definition MediaPlayerToolkit.cpp:672
int _CRmediaPlayer(mmachine m)
_CRMediaPlayer : Create an empty media player (no video loaded).
Definition MediaPlayerToolkit.cpp:80
int _BLTmediaPlayer(mmachine m)
_BLTmediaPlayer : This function blits the current video frame into a bitmap Prototype: fun [ObjMediaP...
Definition MediaPlayerToolkit.cpp:231
int _SETmediaPlayerAudioFormat(mmachine m)
_SETmediaPlayerAudioFormat : Set the output format for audio. Prototype: fun [ObjMediaPlayer I I] Obj...
Definition MediaPlayerToolkit.cpp:889
int _GETmediaPlayerAudio(mmachine m)
_GETmediaPlayerAudio : Get raw audio data from the currently playing video. Prototype: fun [ObjMediaP...
Definition MediaPlayerToolkit.cpp:833
int _GETmediaPlayerTime(mmachine m)
_GETmediaPlayerTime : Get the playback position in the current video. Prototype: fun [ObjMediaPlayer]...
Definition MediaPlayerToolkit.cpp:590
int _CBmediaPlayerEnd(mmachine m)
_CBmediaPlayerEnd : This function set the Callback for end event of a media player content Prototype:...
Definition MediaPlayerToolkit.cpp:1177
int _GETmediaPlayerBuffer(mmachine m)
_GETmediaPlayerBuffer : This function blits the current video frame into a buffer Prototype: fun [Obj...
Definition MediaPlayerToolkit.cpp:321
Generated by 1.9.8