ES from a custom module: demux to decoder

This forum is about all development around libVLC.
ewong
Blank Cone
Blank Cone
Posts: 15
Joined: 29 May 2012 04:50

ES from a custom module: demux to decoder

Postby ewong » 20 Jun 2012 00:53

Within the Open() method of a custom demux module, I assume that the
stream must be added, es_out_Add( ) before sending data to it using es_out_Send().
Is that true?

Is a decoder module invoked by specifying the codec type, i_codec = ?

As shown by the ??? in the code snippet, how do you specify a custom decoder, eg. MyDecoder?
There is an include file called vlc_fourcc.h, should this file be modified?

Code: Select all

struct demux_sys_t { es_format_t fmt; es_out_id_t *p_es; ... }; static int Open( vlc_object_t * p_this ) { demux_t *p_demux = (demux_t*)p_this; demux_sys_t *p_sys; .... p_demux->p_sys = p_sys; ... // Set the Elementary Stream Format es_format_Init( &p_sys->fmt, VIDEO_ES, 0 ); p_sys->fmt.i_codec = ???; p_sys->p_es = es_out_Add( p_demux->out, &p_sys->fmt ); }
How does a RGBA image get rendered from a decoder module?

As shown in the png.c module, if the DecodeBlock() returns with a picture_t variable,
does the image get immediately rendered in an output window?

Code: Select all

static int OpenDecoder( vlc_object_t *p_this ) { ... /* Set output properties */ p_dec->fmt_out.i_cat = VIDEO_ES; p_dec->fmt_out.i_codec = VLC_CODEC_RGBA; /* Set callbacks */ p_dec->pf_decode_video = DecodeBlock; return VLC_SUCCESS; }
Where is the window initially spawned from a file such as image.png.
Is it the Access or Demux module?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: ES from a custom module: demux to decoder

Postby Jean-Baptiste Kempf » 23 Jun 2012 16:30

Define the i_codec with the correct FOURCC (see vlc_fourcc.h and src/misc/fourcc.c)
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 10 guests