[FFmpeg-devel] [PATCH]pes packetizer

realsun sunxiaohui
Thu Jul 5 08:25:07 CEST 2007


Diego Biurrun wrote:
> 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.
>   
changed

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

changed

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

changed

>   
>> +/**
>> + * @file mpeg_pes.h
>> + * PES packetizer api header.
>> + */
>>     
>
> API, same nit and I prefer MPEG PES, same below.
>   

changed

>   
>> +/**
>> + * 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.
>   

changed

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

changed

>   
>> +/**
>> + * Find the most fit stream to be muxed.
>>     
>
> I don't understand.
>   

i means that is to find the stream which should be muxed into PES stream

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

changed

>   
>> + * @param[in] flush   whether we flush after every single subtitle packet for subtitle
>>     
>
> I don't understand.
>   

for subtitle, a single PES packet must be generated, so we set this flag 
to flush after every single packet

>   
>> + * @param[out] best_i       the best fit stream index
>>     
>
> I don't understand.
>   

stream with this index that should be muxed

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

added

>   
>> +/**
>> + * Get how many frames is muxed.
>>     
>
> I don't understand.
>   

Get total frames that have been muxed

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

changed

>   
>> + * @param [in]      id             stream id
>>     
>
> ID
>   

changed

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

changed

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

changed

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

changed

>   
>> + * @return   bytes wirtten to PES stream.
>>     
>
> written
>   

changed

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

removed

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

changed

> Diego
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
>
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pes.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070705/fe8b3206/attachment.asc>



More information about the ffmpeg-devel mailing list