[FFmpeg-devel] [PATCH]pes packetizer

Diego Biurrun diego
Tue Jul 3 11:27:49 CEST 2007


On Tue, Jul 03, 2007 at 03:35:38PM +0800, realsun wrote:
> 
> --- mpeg_pes_enc.c	(revision 9465)
> +++ mpeg_pes_enc.c	(working copy)
> @@ -1,6 +1,6 @@
>  /*
> - * MPEG1/2 muxer
> - * Copyright (c) 2000, 2001, 2002 Fabrice Bellard.
> + * PES muxer.
> + * Copyright (c) 2000-2002 Fabrice Bellard.

I would prefer if you would call it MPEG PES, same below.  That may just
be me though.

nit: The periods at the ends of these lines are senseless.

> --- mpeg_pes.h	(revision 0)
> +++ mpeg_pes.h	(revision 0)
> @@ -0,0 +1,157 @@
> +/*
> + * Copyright (c) 2000-2002 Fabrice Bellard.

same nit here

> +/**
> + * @file mpeg_pes.h
> + * PES packetizer api header.
> + */

API, same nit and I prefer MPEG PES, same below.

> +/**
> + * Initialization of PES mux.
> + * @param[in] ctx the AVFormatContext which contains streams
> + * @return  On error a negative value is returned, on success zero.
> + */
> +int ff_pes_mux_init(AVFormatContext *ctx);

I think it should be muxer, not mux, same below.

> +/**
> + * Write packet into PES fifo.

FIFO

> +/**
> + * Find the most fit stream to be muxed.

I don't understand.

> + * @param[in] packet_size  the packet size of PES stream

PES stream packet size 

> + * @param[in] flush   whether we flush after every single subtitle packet for subtitle

I don't understand.

> + * @param[out] best_i       the best fit stream index

I don't understand.

> + * @return  On error a negative or zero value is returned, on success 1 is returned

missing period

> +/**
> + * Get how many frames is muxed.

I don't understand.

> + * @param [in]      pts            packet presentation time stamp
> + * @param [in]      dts            packet decoding time stamp

timestamp

> + * @param [in]      id             stream id

ID

> + * @param [in]      packet_size    the total packet size

total packet size

> + * @param [in]      payload_size   the payload size of the packet

packet payload size

> + * @param [in]      stuffing_size  the stuffing size of the packet

packet stuffing size

> + * @return   bytes wirtten to PES stream.

written

> + * @param[in] scr  System Clock Reference of PES stream.

Remove the period.

> + * @return  On error a negative or zero value is returned, on success 1 is returned

Add a period.

Diego




More information about the ffmpeg-devel mailing list