[FFmpeg-devel] [PATCH]pes packetizer
Vitor
vitor1001
Wed Jun 27 12:35:37 CEST 2007
Hi
realsun wrote:
> Michael Niedermayer wrote:
>> Hi
>>
>> On Sat, Jun 23, 2007 at 06:11:29PM +0800, realsun wrote:
>>
>>> Hi,
>>> This is the PES packetizer code and I have made MPEG PS encoder to use
>>> this packetizer and I hope this could be reused by TS muxer.
I admit I didn't follow this from the start, but I'll give my two cents...
[...]
> +typedef struct {
> + int is_ps; /*< whether it is a Program Stream */
> + int packet_number;
> +} PESContext;
Maybe you mean
+ int is_ps; /**< whether it is a Program Stream */
which is a doxygen comment.
> +
> +typedef struct {
> + AVFifoBuffer fifo;
> + int max_buffer_size; /*< in bytes */
same thing
> + int buffer_index;
> + PacketDesc *predecode_packet;
> + PacketDesc *premux_packet;
> + PacketDesc **next_packet;
> +} PESStream;
> +
> +
> +#define AUDIO_ID 0xc0
> +#define VIDEO_ID 0xe0
> +#define AC3_ID 0x80
> +#define DTS_ID 0x8a
> +#define LPCM_ID 0xa0
> +#define SUB_ID 0x20
> +
> +/* mpeg2 */
> +#define PROGRAM_STREAM_MAP 0x1bc
> +#define PRIVATE_STREAM_1 0x1bd
> +#define PADDING_STREAM 0x1be
> +#define PRIVATE_STREAM_2 0x1bf
> +
> +
> +static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 };
> +
> +
> +/*
> + * Initialization of PES mux.
> + * @param[in] ctx the AVFormatContext which contains streams
> + * @return On error a negative value is returned, on success zero.
> + */
and here maybe
+/**
+ * Initialization of PES mux.
+ * @param[in] ctx the AVFormatContext which contains streams
+ * @return On error a negative value is returned, on success zero.
+ */
The double ** is needed for proper doxygen parsing. There are a few
more like this in the code.
> Property changes on: pes.h
> ___________________________________________________________________
> Name: svn:executable
> + *
Maybe this shouldn't be here.
-Vitor
More information about the ffmpeg-devel
mailing list