Basic complilation
-Set the include folders to :
32 bits: installation folder\YAVIO3210\include
64 bits: installation folder\YAVIO6410\include
-Include the library/DLL in your project:
32 bits: YAVIO3210.lib / YAVIO3210.dll
64 bits: YAVIO6410.lib / YAVIO6410.dll
The library name never changes in minor versions.
-To get libabcodec and SDL low level functions (this interface may change in future releases):
add the include folders from:
installation folder\YAVIO3210\lib_libavcodec
installation folder\YAVIO3210\lib_SDL
The YAVIO installer
-Windows:
It installs the YAVIO framework in the user system, ask user permision to register video formats to Yavio player. The windows registry stores the path to YAVIOxxxx.dll. It adds YAVIOxxxx.dll to system path.
You may distribute Yavio and install it in your program folder, Yavio will be available only for your software.
-Other systems
More systems installer will be added in the future.
Basic API
The library is programmed through basic objects:
MMOBJECT
MMFRAME
MMDISPLAY
Opening a video file for reading
Declare the multimedia object:
MMOBJECT *mmo;
Open a video for reading:
open_mmobject(mmo,"file_to_open",MMOBJECT_OPEN_READ);
flags supported:
MMOBJECT_OPEN_READ opens an object for reading
MMOBJECT_OPEN_WRITE opens an object for writing
MMOBJECT_OVERWRITE overwrite if a object exist
Now the MMFRAME mmf asociated to the object is populated to the video information:
mmo->audio_streams
mmo->subtitle_streams
mmo->mmstream
mmo->mmframe_video_in
mmo->mmframe_audio_in[]
full video info is available:
mmo->mmframe_video_in.size
mmo->mmframe_video_in.fps
mmo->mmframe_video_in.timebase
mmo->mmframe_video_in.interlaced
mmo->mmframe_video_in.topfield
...
Get next frame decoded, the frame is video, audio or whatever is found on the stream.
mmframe mmf
get_next_decoded_data(mmo,&mmf);
Seek to frame number or milliseconds from the beggining of file, returs the frame number actually got
seek_object(mmo,int stream,int64_t seek_frame_number,double seek_ms,int64_t*got_frame_number,double *got_ms)
Closing the mmobject
close_mmobject(mmo)
High level API: Playing a video on a window
Open the video
MMOBJECT *mmo;
open_mmobject(mmo,"file_to_open",MMOBJECT_OPEN_READ);
Set up the display context associated with a mmobject, the display surface is full screen or windowed
MMDISPLAY *MMdisplay;
MMdisplay_init(MMdisplay,mmo,int ID,flags);
Playing the video
MMdisplay_play(MMdisplay);
MMdisplay_pause(MMdisplay);
MMdisplay_stop(MMdisplay);
MMdisplay_get_next_frame(MMdisplay,frame_number,ms);
MMdisplay_seek(MMdisplay,frame_number,ms,got_frame_number,got_ms);
MMdisplay_Set_audio_stream(MMdisplay,int audioStremIndex);
MMdisplay_mute(MMdisplay,BOOL mute);
Close
MMdisplay_close(MMdisplay);
close_mmobject(mmo);
CopyRight (c) 2011-2013 Levan