[FFmpeg-devel] [PATCH] avformat: add AVFormatContext.first_pts_wallclock

"zhilizhao(赵志立)" quinkblack at foxmail.com
Sat Jun 18 15:26:32 EEST 2022



> On Jun 18, 2022, at 12:01 PM, Gyan Doshi <ffmpeg at gyani.pro> wrote:
> 
> 
> On 2022-06-16 02:39 pm, Gyan Doshi wrote:
>> Stores wallclock time for the first packet received with a pts.
> 
> Comments?

>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
>> index f12fa7d904..56f9656a68 100644
>> --- a/libavformat/avformat.h
>> +++ b/libavformat/avformat.h
>> @@ -1808,6 +1808,16 @@ typedef struct AVFormatContext {
>>       */
>>      int max_probe_packets;
>>  +    /**
>> +     * Wallclock start time of the stream in real world time, in microseconds
>> +     * since the Unix epoch (00:00 1st January 1970). That is, the first packet
>> +     * with a set pts was received at this real world time.
>> +     * - demuxing: Set by libavformat. Users may want to use start_time_realtime
>> +     *             if set.
>> +     * - muxing: unused.
>> +     */
>> +    int64_t first_pts_wallclock;
>> +
>>      /**
>>       * A callback for closing the streams opened with AVFormatContext.io_open().
>>       *

It should be put after io_close2 to keep ABI compatible.

The usecase isn’t clear for this single patch.


More information about the ffmpeg-devel mailing list