[FFmpeg-devel] IEC61937 compatible muxer

Diego Biurrun diego
Tue Aug 18 15:17:35 CEST 2009


On Tue, Aug 18, 2009 at 12:03:32PM +0200, Bartlomiej Wolowiec wrote:
> 
> Ok, i attach improved patch.

Please cut down your quotes, thank you.

> --- libavformat/spdif.c	(wersja 0)
> +++ libavformat/spdif.c	(wersja 0)
> @@ -0,0 +1,310 @@
> +/**
> + * @file libavformat/spdif.c
> + * IEC-61937 encapsulation of various formats, used at S/PDIF

s/at/with/ or s/at/by/ I think.

> +typedef struct IEC958Context {
> +    enum IEC958DataType data_type;  ///< Burst info - reference to type of payload of the data-burst
> +    int pkt_size;                   ///< Length code in bits
> +    int pkt_offset;                 ///< Repetition period of data burst in bytes

data burst repetition period in bytes

> +    uint8_t *buffer;                ///< Allocated buffer, used for swap bytes
> +    int buffer_size;                ///< Size of allocated buffer

allocated buffer size

nit: All of these comments should not be capitalized.

> +    /// Function, which generates codec dependent header information (sets data_type and data_offset)

Please break overly long lines where easily possible.

> +    for (; i < w; i++) {
> +        dst[i + 0] = bswap_16(src[i + 0]);
> +    }

useless {}

> +    int version = (pkt->data[1] >> 3) & 3;
> +    int layer = 3 - ((pkt->data[1] >> 1) & 3);

align

> +    NULL_IF_CONFIG_SMALL("IEC958 (IEC-61937)"),

Maybe you could mention S/PDIF somewhere in there.

Diego



More information about the ffmpeg-devel mailing list