[FFmpeg-devel] Google Summer of Code participation

Thilo Borgmann thilo.borgmann
Sun Apr 5 22:20:13 CEST 2009



Michael Niedermayer schrieb:
> On Sun, Apr 05, 2009 at 09:20:55PM +0200, Thilo Borgmann wrote:
>   
>> Ok I've found the Makefile inside libavcodec/ and altered it accordingly, 
>> so the make && make test is successful.
>>
>> I added libavcodec/avpacket.c as an attachement - hope this is ok otherwise 
>> just tell me how to...
>>     
>
> it would be nice to in addition see the diff between utils.c and avpacket.c
> to make sure nothing was unintentionally changed 
Hmm. As Mans Rullgard suggested, I "git add"ed and "git commit"ed the 
new file. I thought it would be in the "git diff" somewhere but it 
isn't. A manual "diff -up" makes no sense to me as it shows a lot of 
lines hard to read... please tell me how to generate what you want to see.
> also the commit should be
> done with svn cp to preserve history
> [...]
>   
I'm using git since there are two successive patches from me altering 
the same files (and I couldn't handle it with svn anymore).
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -842,6 +842,55 @@ typedef struct AVPanScan{
>>  #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
>>  #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
>>  
>> +typedef struct AVPacket {
>> +    /**
>> +     * Presentation timestamp in time_base units; the time at which the
>> +     * decompressed packet will be presented to the user.
>> +     * Can be AV_NOPTS_VALUE if it is not stored in the file.
>> +     * pts MUST be larger or equal to dts as presentation cannot happen before
>> +     * decompression, unless one wants to view hex dumps. Some formats misuse
>> +     * the terms dts and pts/cts to mean something different. Such timestamps
>> +     * must be converted to true pts/dts before they are stored in AVPacket.
>> +     */
>> +    int64_t pts;
>> +    /**
>> +     * Decompression timestamp in time_base units; the time at which the
>> +     * packet is decompressed.
>> +     * Can be AV_NOPTS_VALUE if it is not stored in the file.
>> +     */
>> +    int64_t dts;
>> +    uint8_t *data;
>> +    int   size;
>> +    int   stream_index;
>> +    int   flags;
>> +    /**
>> +     * Duration of this packet in time_base units, 0 if unknown.
>> +     * Equals next_pts - this_pts in presentation order.
>> +     */
>> +    int   duration;
>> +    void  (*destruct)(struct AVPacket *);
>> +    void  *priv;
>> +    int64_t pos;                            ///< byte position in stream, -1 if unknown
>> +
>> +    /**
>> +     * Time difference in stream time base units from the pts of this
>> +     * packet to the point at which the output from the decoder has converged
>> +     * independent from the availability of previous frames. That is, the
>> +     * frames are virtually identical no matter if decoding started from
>> +     * the very first frame or from this keyframe.
>> +     * Is AV_NOPTS_VALUE if unknown.
>> +     * This field is not the display duration of the current packet.
>> +     *
>> +     * The purpose of this field is to allow seeking in streams that have no
>> +     * keyframes in the conventional sense. It corresponds to the
>> +     * recovery point SEI in H.264 and match_time_delta in NUT. It is also
>> +     * essential for some types of subtitle streams to ensure that all
>> +     * subtitles are correctly displayed after seeking.
>> +     */
>> +    int64_t convergence_duration;
>> +} AVPacket;
>> +#define PKT_FLAG_KEY   0x0001
>> +
>>  /**
>>   * Audio Video Frame.
>>   * New fields can be added to the end of FF_COMMON_FRAME with minor version
>> @@ -2529,55 +2578,6 @@ typedef struct AVPaletteControl {
>>  } AVPaletteControl attribute_deprecated;
>>  #endif
>>  
>> -typedef struct AVPacket {
>> -    /**
>> -     * Presentation timestamp in time_base units; the time at which the
>> -     * decompressed packet will be presented to the user.
>> -     * Can be AV_NOPTS_VALUE if it is not stored in the file.
>> -     * pts MUST be larger or equal to dts as presentation cannot happen before
>> -     * decompression, unless one wants to view hex dumps. Some formats misuse
>> -     * the terms dts and pts/cts to mean something different. Such timestamps
>> -     * must be converted to true pts/dts before they are stored in AVPacket.
>> -     */
>> -    int64_t pts;
>> -    /**
>> -     * Decompression timestamp in time_base units; the time at which the
>> -     * packet is decompressed.
>> -     * Can be AV_NOPTS_VALUE if it is not stored in the file.
>> -     */
>> -    int64_t dts;
>> -    uint8_t *data;
>> -    int   size;
>> -    int   stream_index;
>> -    int   flags;
>> -    /**
>> -     * Duration of this packet in time_base units, 0 if unknown.
>> -     * Equals next_pts - this_pts in presentation order.
>> -     */
>> -    int   duration;
>> -    void  (*destruct)(struct AVPacket *);
>> -    void  *priv;
>> -    int64_t pos;                            ///< byte position in stream, -1 if unknown
>> -
>> -    /**
>> -     * Time difference in stream time base units from the pts of this
>> -     * packet to the point at which the output from the decoder has converged
>> -     * independent from the availability of previous frames. That is, the
>> -     * frames are virtually identical no matter if decoding started from
>> -     * the very first frame or from this keyframe.
>> -     * Is AV_NOPTS_VALUE if unknown.
>> -     * This field is not the display duration of the current packet.
>> -     *
>> -     * The purpose of this field is to allow seeking in streams that have no
>> -     * keyframes in the conventional sense. It corresponds to the
>> -     * recovery point SEI in H.264 and match_time_delta in NUT. It is also
>> -     * essential for some types of subtitle streams to ensure that all
>> -     * subtitles are correctly displayed after seeking.
>> -     */
>> -    int64_t convergence_duration;
>> -} AVPacket;
>> -#define PKT_FLAG_KEY   0x0001
>> -
>>  enum AVSubtitleType {
>>      SUBTITLE_NONE,
>>  
>>     
>
> this should be seperate, also ive already approved it i think?
>
>
> [...]
>   
>   
This part equals the "tb.movedAgainAVPacket.patch". You said, it is OK 
but it is not yet applied to the code. As you see this as a seperate 
thing, the patch "tb.movedAgainAVPacket.patch" remains valid and there 
will be another one on top of that for moving the functions, as soon as 
I can continue - means the questions above are clear to me.

TB



More information about the ffmpeg-devel mailing list