X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=doc%2Fdeveloper%2Fdecoders.xml;h=50eefea20206faab97c6918d46cb17875824d95a;hb=d5a04763bde647b3a59ac18898dc06d12bc52491;hp=354de019ebd78deb569db3767b19125694d0c916;hpb=33687bb4acf1099dfaa26d07110c37857f638005;p=vlc diff --git a/doc/developer/decoders.xml b/doc/developer/decoders.xml index 354de019eb..50eefea202 100644 --- a/doc/developer/decoders.xml +++ b/doc/developer/decoders.xml @@ -23,20 +23,20 @@ chapters. Decoder configuration -The input thread spawns the appropriate decoders [the relation is -currently hard-wired in src/input/input_programs.c]. -It then launches *_CreateThread(), with either -an adec_config_t (audio) or an vdec_config_t -(video) structure, described in include/input_ext-dec.h. +The input thread spawns the appropriate decoder modules from +src/input/input_dec.c. The Dec_CreateThread +function selects the more accurate decoder module. Each decoder module +looks at decoder_config.i_type and returns a score [ see the modules +section ]. It then launches module.pf_run(), +with a decoder_config_t, described in +include/input_ext-dec.h. -It contains some parameters relative to the output thread, which will -be described in the following chapters, and a generic -decoder_config_t, which gives the decoder the ES ID and type, and -pointers to a stream_control_t structure (gives -information on the play status), a decoder_fifo_t -and pf_init_bit_stream, which will be +The generic decoder_config_t structure, gives the decoder +the ES ID and type, and pointers to a stream_control_t +structure (gives information on the play status), a decoder_fifo_t + and pf_init_bit_stream, which will be described in the next two sections. @@ -79,7 +79,7 @@ dropped. - + @@ -97,7 +97,7 @@ dropped. - + @@ -280,15 +280,15 @@ also a new pes_packet_t. You can store your own structure in VLC already features an MPEG layer 1 and 2 audio decoder, an MPEG MP@ML video decoder, an AC3 decoder (borrowed from LiViD), a DVD SPU decoder, -and an LPCM decoder [not functional yet]. You can write your own -decoder, just mimic the video parser. +and an LPCM decoder. You can write your own decoder, just mimic the +video parser. Limitations in the current design -Currently, decoders are not "plug-ins", that is they are not dynamically -loadable. The way the input chooses a decoder is also not final - it -is hard-wired in src/input/input_programs.c. +To add a new decoder, you'll still have to add the stream type as there's +still a a hard-wired piece of code in src/input/input_programs.c +. @@ -307,7 +307,7 @@ be described in the following section. The MPEG video decoder -VideoLAN Client provides an MPEG-1, and an MPEG-2 Main Profile @ +VLC media player provides an MPEG-1, and an MPEG-2 Main Profile @ Main Level decoder. It has been natively written for VLC, and is quite mature. Its status is a bit special, since it is splitted between two logicial entities : video parser and video decoder. @@ -379,7 +379,8 @@ seven methods : vdec_IDCT - ( vdec_thread_t * p_vdec, dctelem_t * p_block, int ) : + ( decoder_config_t * p_config, dctelem_t * p_block, int ) + : Does the complete 2-D IDCT. 64 coefficients are in p_block.