ARSA Language
2.8
(Encryption, GPU and Web 3.0)
|
Go to the source code of this file.
Functions | |
void | audio (const char *filename) |
just play audio More... | |
void | audio (const char *filename, const char *command, const char *option=0) |
play audio with command More... | |
void | audio (const char *filename, const char *command, void *function) |
query audio isplaying or not More... | |
void | video (const char *filename) |
just play video More... | |
void | video (const char *filename, const char *command) |
play video, gif or animated png with command More... | |
void | video (const char *filename, const char *command, void *function) |
query video isplaying or not More... | |
void | video (const char *filename, const char *command=resize, int width, int height) |
resize video only More... | |
void | video (const char *filename, const char *command=playat, const char *layername) |
force video play at psd layer, !!!MUST clearplayat with layer name after you done or exit!!! More... | |
ARSA Language, audio/video path using ffmpeg,
the function audio/video are a very simple and portable media player using the FFmpeg libraries and the SDL library.It is mostly used as a testbed for the various FFmpeg APIs.
Support file format:
https://ffmpeg.org/general.html#File-Formats
Download ffmpeg sourcecode:
https://ffmpeg.org/download.html#get-sources
ffmpeg license:
https://ffmpeg.org/legal.html
Definition in file av.h.
void audio | ( | const char * | filename | ) |
just play audio
filename | name of media file want to operator Example: audio(win.mp3) |
void audio | ( | const char * | filename, |
const char * | command, | ||
const char * | option = 0 |
||
) |
play audio with command
filename | name of media file want to operator |
command | operator command play playonce // stop and go sound just once time, for sound fx that want repeating pause stop clear load loop once seek // seek offset by percent 0..100, 0 is start, 100 is end Example: |
option | may be boolean that depend on command |
void audio | ( | const char * | filename, |
const char * | command, | ||
void * | function | ||
) |
query audio isplaying or not
filename | name of media file want to operator |
command | operator command isplaying !isplaying Example: |
function | call the function |
void video | ( | const char * | filename | ) |
just play video
Function audio is a very simple and portable media player using the FFmpeg libraries and the SDL library. It is mostly used as a testbed for the various FFmpeg APIs. User can watch support file format from https://ffmpeg.org/general.html#File-Formats
filename | name of media file want to operator Example: video(combo.mp4) |
void video | ( | const char * | filename, |
const char * | command | ||
) |
play video, gif or animated png with command
filename | name of media file want to operator |
command | operator command play pause stop show hide clear load loop once playat // !!!MUST call clearplayat with layer name after you done or exit!!! playatresize // macro -> resize texture same psd layer size and call playat. clearplayat // !!!MUST call when not playing on layer or exit.!!! resize // specify width, height after. !!!MUST call before playat cmd!!! seek // seek offset by percent 0..100, 0 is start, 100 is end Example: video(combo.mp4, load) video(combo.mp4, clear) // remove video from memory, !!!MUST call clearplayat if you call playat before.!!! video(null, clear) // remove all audio/video from memory, !!!MUST call clearplayat if you call playat before.!!! video(combo.mp4, seek, 50) // seek as percent 0..100, 0 is start, 100 is end video(combo.mp4, loop) // loop enable video(combo.mp4, once) // play one time, loop disable video(combo.mp4, show, true) // auto show video on screen, true is show, false is hide video(combo.mp4, hide) // hide video on screen video(combo.mp4, playat, canvas) // play video on layer in psd video(combo.mp4, playatresize, canvas) // play video and resize original video to layer in psd video(combo.mp4, resize, 512, 512) // dimension in pixel to resize original video { video(combo.mp4, "clearplayat", canvas) // !!!MUST call clearplayat when exit, if call playat before!!! }function(deinit) |
void video | ( | const char * | filename, |
const char * | command, | ||
void * | function | ||
) |
resize video only
-1,-1 : full screen (very slow)
0,0 : original size
filename | name of media file want to operator |
command | resize only |
width | new size of video |
height | new size of video Example: video(combo.mp4, resize, -1, -1) |
void video | ( | const char * | filename, |
const char * | command = playat , |
||
const char * | layername | ||
) |
force video play at psd layer, !!!MUST clearplayat with layer name after you done or exit!!!
filename | name of media file want to operator |
command | playat only |
layername | name of psd layer that you want to playing video at there. Example: video(combo.mp4, playat, vlayer) // !!!MUST clearplayat with layer name after you done or exit!!! // video(combo.mp4, playatresize, vlayer) // [optional] resize original video size fit to layer size, !!!MUST clearplayat with layer name after you done or exit!!! { video(combo.mp4, clearplayat, vlayer) }deinit() |