[FFmpeg-devel] video engine on ffmpeg
Lukasz M
lukasz.m.luki
Sat Sep 1 00:34:02 CEST 2007
Hi.
I'm new on list so hello everyone :)
Few days ago i started to write my video player based on ffmpeg. It makes me a
little angry, that it's so complicated. I decided to write a simple library
that makes life easier. I'm sending first working version with example
program. (this example program is very simple, but I was concentrated on
avengine)
If you want to add it do ffmpeg project or publicate on webpage as a help then
be my guest :) I put header to files - you can changed it, if you want.
Few words about it.
First it's needed to call
engine_init(char *filename, \
void(*callbackVideo)(AVEngineState *engine, AVPicture *picture), \
void(*callbackAudio)(AVEngineState* state, int16_t *stream, int len));
filename it's a file to play. Then we have to only get audio data with the
function engine_get_audio(AVEngineState* state, int8_t *stream, int len);
This function might be used as a SDL audio callback. When it's time to display
a picture, my library call callbackVideo function and user have to only
display a picture given as a parameter. when we pause audio, callback video
will not be called untill play again. there is also audio callback. This
function is called after decoding audio packets, so it's easy way to make
some stuff on it (e.g. implementing equalizer). I've made also seeking to
certain time (not only to key frames) and softwere volume controler.
compiled with:
gcc test.c avengine.c -o play -lavformat -I/usr/include/ffmpeg
`sdl-config --libs --cflags` -lswscale
I hope you like it. :)
Sorry for my english :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avengine.c.gz
Type: application/x-gzip
Size: 3807 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070901/83f02074/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avengine.h.gz
Type: application/x-gzip
Size: 2140 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070901/83f02074/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c.gz
Type: application/x-gzip
Size: 1559 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070901/83f02074/attachment-0002.bin>
More information about the ffmpeg-devel
mailing list