From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id F2D214DC77 for <ffmpegdev@gitmailbox.com>; Wed, 23 Apr 2025 23:15:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7B1B568B50A; Thu, 24 Apr 2025 02:15:22 +0300 (EEST) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 91E6868B44A for <ffmpeg-devel@ffmpeg.org>; Thu, 24 Apr 2025 02:15:15 +0300 (EEST) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-ac339f53df9so76443066b.1 for <ffmpeg-devel@ffmpeg.org>; Wed, 23 Apr 2025 16:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745450115; x=1746054915; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=b3r2++hTTqIrHcMxZyB9e8JOJMax80Kdb8dWDAyBsBE=; b=Uprcx3AeZhUjmWUM9bndcudJA9aRhK42jnP01N+J5fcE26TAg9/K1DZglQx1+4Xcbz 3frYBuNvMc/9n8uaC7f9BU0eO9S3HBSnmCtmgPpWq/mOoscxCr5S7vuvCSeeXxAb0tXT 0ROtjDe020NOS7HFVwEnlyVByBDo/GeUISDArjj7h/tjktwsBtN4RRDyBDtXR47BbOOp SzT4MFYaWDjgeW/fBcOiyD1UzLj+PvfBa483X2niAVZ5fakv8bIAxPLPFtM0H6dOUGbP 2exBbRcaaTZgJpp9Ayp9lpAbO/0gUHA8MJITmw5aetiGkMmHeXD/VcPrQ7UoBW1sSBtz Xcpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745450115; x=1746054915; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=b3r2++hTTqIrHcMxZyB9e8JOJMax80Kdb8dWDAyBsBE=; b=SxkmuNDGOxmV9bnOwwXRvUZ08/CqvGGg79hTDo65/c6mV9tMbhio+jLx8t6r5pxqFC KNcX0Bcqncvh9gYqUXMBUb2XhnTv/u8EgQRxGO4796dUsJTTMKqBqIfbl/cqra02QxhE FSdUv62z8oPL47KMDSfhPpB5QbrvMxrtmBp06WuxmhwsSSD7HCZAvTY1up9zQEmPkpCf YWPDB/fEvi+eQlDqkUbOEAUjlkcabogdezBqgOLUvJarg3NP3GyVTiN2iFoDwtki60Sp p0ca1fcO+L/pJj5cY54iK3quXjv62mW4d9ADE5Nbf247wqV3dAfA38VwH3lTu5eH79hN 9sLA== X-Gm-Message-State: AOJu0Yw9bFJKgX4dRiS01MjemP4gOPQ8LH6TvKclJcUuE+dq2f710bAk thhtreBNhKOewQE6ciSnnPhZxfjaC2vJFO4FhU1U39ip5SAOkUzJ8kIBAA== X-Gm-Gg: ASbGncu11IcFta/1Mo9sHjFCOiuG+EhvjCHhDFQnxyOdBrZrQ8r+rbKhWOhlhXQXApV 4R/z981MBUiSM45dtbVGU9hBwT+n/puflN+vzQeHHf68IUpkOKI5zyXb0d/9CwgsA89lARc/6e0 xcVXfdOSUrlHZlq3a4Ou2EU2b6MXES3K/J+jjqWqMjIkFvux7QQUIwgGb4zH6kMjKSIIBdJw0GG TqZbNZO0IcVV/S2hNtoc/feru74mcADB/MDQpSctO5lCnm4ngyH2MrQ71uCLntQbK0o14oteSPb Wc+wWfUq9+hJ+XOFaYBMyGlf/lcwL3Yfjvl1+PWvNNc2dbDndeIrPgvv/2jiC/twlrNgtmu+XZ6 /RmT+ X-Google-Smtp-Source: AGHT+IE0ApbqM24rBEX2JkuZzsCprzdOrkE+IYBrGnRELl1bPTnNu9QfoO4+vb9LB0AdwJddzbojtw== X-Received: by 2002:a17:907:7f0f:b0:ab7:1012:3ccb with SMTP id a640c23a62f3a-ace5723b154mr57781766b.14.1745450114427; Wed, 23 Apr 2025 16:15:14 -0700 (PDT) Received: from mariano (dynamic-adsl-84-220-189-10.clienti.tiscali.it. [84.220.189.10]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ace59830ef2sm11101966b.11.2025.04.23.16.15.13 for <ffmpeg-devel@ffmpeg.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 16:15:13 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 0E3FCBFCE8; Thu, 24 Apr 2025 01:15:13 +0200 (CEST) Date: Thu, 24 Apr 2025 01:15:12 +0200 From: Stefano Sabatini <stefasab@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Message-ID: <aAl0gP3BocA8uYIP@mariano> Mail-Followup-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> References: <20250415104439.13431-1-ffmpeg@gyani.pro> <aAaOo/EIFF0O9lJG@mariano> <5a767a5b-96a3-47e4-ba47-a2572691fcb5@gyani.pro> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5a767a5b-96a3-47e4-ba47-a2572691fcb5@gyani.pro> User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH v2 1/2] avformat: add avformat_query_seekable X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/aAl0gP3BocA8uYIP@mariano/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> On date Tuesday 2025-04-22 10:24:01 +0530, Gyan Doshi wrote: > On 2025-04-21 11:59 pm, Stefano Sabatini wrote: > > On date Tuesday 2025-04-15 16:09:56 +0530, Gyan Doshi wrote: > > > Utility function to report seekability features for a given input. > > > > > > Useful for ffprobe and to extend seek possibilities in fftools. > > > --- > > > v2: > > > made constants more descriptive > > > add exception for rtsp false negative seekability > > > > > > doc/APIchanges | 3 +++ > > > libavformat/avformat.h | 22 ++++++++++++++++++ > > > libavformat/seek.c | 53 ++++++++++++++++++++++++++++++++++++++++++ > > > libavformat/version.h | 2 +- > > > 4 files changed, 79 insertions(+), 1 deletion(-) > > > > > > diff --git a/doc/APIchanges b/doc/APIchanges > > > index 65bf5a9419..879f56b572 100644 > > > --- a/doc/APIchanges > > > +++ b/doc/APIchanges > > > @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28 > > > API changes, most recent first: > > > +2025-04-xx - xxxxxxxxxx - lavf 62.1.100 - avformat.h > > > + Add avformat_query_seekable(). > > > + > > > 2025-04-07 - 19e9a203b7 - lavu 60.01.100 - dict.h > > > Add AV_DICT_DEDUP. > > > diff --git a/libavformat/avformat.h b/libavformat/avformat.h > > > index 498c3020a5..f9da5e9e79 100644 > > > --- a/libavformat/avformat.h > > > +++ b/libavformat/avformat.h > > > @@ -2338,6 +2338,28 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, > > > */ > > > int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags); > > > +#define AVSEEKABLE_IO_NORMAL 0x00000001 ///< I/O is seekable like a local file > > > +#define AVSEEKABLE_IO_PROTOCOL 0x00000002 ///< I/O seek is through protocol request via avio_seek_time > > > +#define AVSEEKABLE_VIA_DEMUXER 0x00000004 ///< demuxer has a seek function > > > +#define AVSEEKABLE_VIA_PKTSCAN 0x00000008 ///< seek is performed by consuming and scanning packet timestamps > > > +#define AVSEEKABLE_BY_TIME 0x00000100 ///< seek target can be a timestamp > > > +#define AVSEEKABLE_BY_BYTE 0x00000200 ///< seek target can be in bytes > > > +#define AVSEEKABLE_BY_FRAME 0x00000400 ///< seek target can be a frame index > > > +#define AVSEEKABLE_PROP_PTS 0x00010000 ///< seek target timestamp is expected to be PTS > > > +#define AVSEEKABLE_PROP_FAST 0x00020000 ///< demuxer allows fast but inaccurate seeking > > > +#define AVSEEKABLE_PROP_FWDONLY 0x00040000 ///< set seek will be equal or forward of specified seek point > > Not sure I get this, can you clarify/expand? > > The framework does not seek to an earlier KF, e.g. if either avio is not > AVIO_SEEKABLE_NORMAL or the index does not correctly mark keyframes. then a > seek to 12s will return frames from 12s and decoding will start from next KF > encountered. Thanks for the clarification. This is my take to integrate this comment into the doxy (also it's probably best to avoid contractions to improve mnemonics): #define AVSEEKABLE_PROP_FORWARDONLY 0x00040000 ///< seek result position will be equal or forward of the specified seek point _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".