[FFmpeg-devel] LPCM for mpeg-ts, the second
Diego Biurrun
diego
Sun Aug 2 10:46:59 CEST 2009
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.
Please remove the trailing whitespace from your patch.
> --- ffmpeg.old/trunk/libavcodec/pcm-mpeg.c 1970-01-01 03:00:00.000000000 +0300
> +++ ffmpeg/trunk/libavcodec/pcm-mpeg.c 2009-08-02 10:12:22.431003427 +0300
> @@ -0,0 +1,215 @@
> + if (buf_size < 4) {
> + av_log(avctx, AV_LOG_ERROR, "PCM packet too small\n");
> + return -1;
> + }
indentation
> + if (0 == avctx->channels) {
(!avctx->channels)
> +#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.
Diego
More information about the ffmpeg-devel
mailing list