[FFmpeg-devel] [PATCH] Demuxer for Leitch/Harris' VR native stream format (LXF)
Diego Biurrun
diego
Tue Aug 31 14:58:56 CEST 2010
On Fri, Aug 27, 2010 at 05:00:39PM +0200, Tomas H?rdin wrote:
>
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -22,7 +22,7 @@
> #define AVFORMAT_AVFORMAT_H
>
> #define LIBAVFORMAT_VERSION_MAJOR 52
> -#define LIBAVFORMAT_VERSION_MINOR 78
> +#define LIBAVFORMAT_VERSION_MINOR 79
> #define LIBAVFORMAT_VERSION_MICRO 3
Reset the micro version if you bump minor.
> --- /dev/null
> +++ b/libavformat/lxfdec.c
> @@ -0,0 +1,335 @@
> +/*
> + * LXF demuxer.
Drop this pointless period.
> +//returns number of bits set in value
> +static int num_set_bits(uint32_t value) {
{ on the next line
> + for(ret = 0; value; ret += (value & 1), value >>= 1);
for (
more below
> +//reads and checksums packet header. returns format and size of payload
> +static int get_packet_header(AVFormatContext *s, unsigned char *header, uint32_t *format)
long line
> + LXFDemuxContext *lxf = s->priv_data;
> + ByteIOContext *pb = s->pb;
vertically align the =
> + switch(AV_RL32(&header[16])) {
switch (
> + if (lxf->bps != 16 && lxf->bps != 20 && lxf->bps != 24 && lxf->bps != 32) {
> + av_log(s, AV_LOG_WARNING, "only 16-, 20-, 24- and 32-bit PCM currently supported\n");
Please break long lines where easily possible, same in other places.
> + st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
> + st->codec->sample_rate = LXF_SAMPLERATE;
> + st->codec->channels = lxf->channels;
vertically align the =
Diego
More information about the ffmpeg-devel
mailing list