Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH v5 0/1] avformat/demux: Add duration_probesize AVOption
@ 2024-03-28 17:57 Nicolas Gaullier
  2024-03-28 17:57 ` [FFmpeg-devel] [PATCH v5 1/1] " Nicolas Gaullier
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Gaullier @ 2024-03-28 17:57 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Nicolas Gaullier

V5 including all Stefano's feedback.
Notes:
- I have largely reworked the texi, I hope the use case is more clear.
- I have rewrote "250K up to 16M" to "250000 up to 16M" to be clear about the K/M units.
- @seealso seems not supported in my doxy environment, so I simply moved all the @sa to @see

>> +    int64_t duration_max_read_size = ic->duration_probesize ? 
>> + ic->duration_probesize >> DURATION_MAX_RETRY_USER : 
>> + DURATION_MAX_READ_SIZE_DEFAULT;
>
>nit: I find the right shift followed by the leftshift a bit confusing, but probably there is no simple way to prevent it
Apart code simplification, there is a least one reason for that: an odd number would not be satisfactory for the algorithm.
Each seek/retry has to join with no overlap. Here, if the user set duration_probesize=17, the first seek will be at filesize-8 / 8 bytes
and the next-unique retry at filesize-16 / 8 bytes.

Thank you for your time,
Nicolas


Nicolas Gaullier (1):
  avformat/demux: Add duration_probesize AVOption

 doc/APIchanges              |  3 +++
 doc/formats.texi            | 19 ++++++++++++++++++-
 libavformat/avformat.h      | 16 ++++++++++++++--
 libavformat/demux.c         | 13 ++++++++-----
 libavformat/options_table.h |  1 +
 libavformat/version.h       |  2 +-
 6 files changed, 45 insertions(+), 9 deletions(-)

-- 
2.30.2

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-28 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 17:57 [FFmpeg-devel] [PATCH v5 0/1] avformat/demux: Add duration_probesize AVOption Nicolas Gaullier
2024-03-28 17:57 ` [FFmpeg-devel] [PATCH v5 1/1] " Nicolas Gaullier
2024-03-28 19:11   ` Stefano Sabatini

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git