[FFmpeg-devel] LPCM for mpeg-ts, the second
Christian P. Schmidt
schmidt
Sun Aug 2 12:17:11 CEST 2009
Diego Biurrun wrote:
> On Sun, Aug 02, 2009 at 10:54:57AM +0300, Christian P. Schmidt wrote:
>> Attached a second attempt at adding the support for LPCM streams in mpeg transport streams.
>
>> +#if CONFIG_DECODERS
>> +#define PCM_MPEG_DECODER(id,name,long_name_) \
>> +AVCodec name ## _decoder = { \
>> + #name, \
>> + CODEC_TYPE_AUDIO, \
>> + id, \
>> + sizeof(PCMDecode), \
>> + pcm_mpeg_decode_init, \
>> + NULL, \
>> + NULL, \
>> + pcm_mpeg_decode_frame, \
>> + .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S32, SAMPLE_FMT_NONE}, \
>> + .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
>> +};
>> +#else
>> +#define PCM_MPEG_DECODER(id,name,long_name_)
>> +#endif
>> +
>> +#define PCM_CODEC(id, sample_fmt_, name, long_name_) \
>> + PCM_ENCODER(id,sample_fmt_,name,long_name_) PCM_DECODER(id,sample_fmt_,name,long_name_)
>> +
>> +/* Note: Do not forget to add new entries to the Makefile as well. */
>> +PCM_MPEG_DECODER(CODEC_ID_PCM_BLURAY, pcm_bluray, "PCM signed 16|20|24-bit big-endian");
>
> I don't think it makes sense to use a macro for one declaration.
Agreed. The macro is there to easily move pcm_dvd here in the next phase. The PCM_CODEC macro is a copy&paste leftover and will be
removed - I can't encode without complete knowledge of the meaning of the remaining bits.
Will fix the other issues (codingstyle, whitespaces).
Regards,
Christian
More information about the ffmpeg-devel
mailing list