Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers
@ 2022-01-02 17:46 Anton Khirnov
  2022-01-02 17:46 ` [FFmpeg-devel] [RFC/PATCH 2/2] lavf/imfdec: mark as experimental Anton Khirnov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Anton Khirnov @ 2022-01-02 17:46 UTC (permalink / raw)
  To: ffmpeg-devel

---
 doc/APIchanges         | 3 +++
 libavformat/avformat.h | 7 +++++++
 libavformat/format.c   | 2 ++
 libavformat/version.h  | 2 +-
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 670a59329e..29c235630e 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -14,6 +14,9 @@ libavutil:     2021-04-27
 
 API changes, most recent first:
 
+2022-01-xx - xxxxxxxxxx - lavf 59.13.100 - avformat.h
+  Add AVFMT_EXPERIMENTAL flag.
+
 2021-12-xx - xxxxxxxxxx - lavu 57.13.100 - hwcontext_videotoolbox.h
   Add av_vt_pixbuf_set_attachments
 
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 70b36d7682..6ce367e854 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -463,6 +463,13 @@ typedef struct AVProbeData {
 /// Demuxer will use avio_open, no opened file should be provided by the caller.
 #define AVFMT_NOFILE        0x0001
 #define AVFMT_NEEDNUMBER    0x0002 /**< Needs '%d' in filename. */
+/**
+ * The muxer/demuxer is experimental and should be used with caution.
+ *
+ * - demuxers: will not be selected automatically by probing, must be specified
+ *             explicitly.
+ */
+#define AVFMT_EXPERIMENTAL  0x0004
 #define AVFMT_SHOW_IDS      0x0008 /**< Show format stream IDs numbers. */
 #define AVFMT_GLOBALHEADER  0x0040 /**< Format wants global header. */
 #define AVFMT_NOTIMESTAMPS  0x0080 /**< Format does not need / have any timestamps. */
diff --git a/libavformat/format.c b/libavformat/format.c
index 387627009e..52b85c16a2 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -158,6 +158,8 @@ const AVInputFormat *av_probe_input_format3(const AVProbeData *pd,
     }
 
     while ((fmt1 = av_demuxer_iterate(&i))) {
+        if (fmt1->flags & AVFMT_EXPERIMENTAL)
+            continue;
         if (!is_opened == !(fmt1->flags & AVFMT_NOFILE) && strcmp(fmt1->name, "image2"))
             continue;
         score = 0;
diff --git a/libavformat/version.h b/libavformat/version.h
index 917b9ffa5d..29dcce352b 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -32,7 +32,7 @@
 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
 // Also please add any ticket numbers that you believe might be affected here
 #define LIBAVFORMAT_VERSION_MAJOR  59
-#define LIBAVFORMAT_VERSION_MINOR  12
+#define LIBAVFORMAT_VERSION_MINOR  13
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
-- 
2.33.0

_______________________________________________
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] 6+ messages in thread

* [FFmpeg-devel] [RFC/PATCH 2/2] lavf/imfdec: mark as experimental
  2022-01-02 17:46 [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers Anton Khirnov
@ 2022-01-02 17:46 ` Anton Khirnov
       [not found] ` <20220102174605.2438-1-anton@khirnov.net-MsQtgJZ----2>
  2022-01-02 22:45 ` Michael Niedermayer
  2 siblings, 0 replies; 6+ messages in thread
From: Anton Khirnov @ 2022-01-02 17:46 UTC (permalink / raw)
  To: ffmpeg-devel

People have expressed concerns about its safety, so prevent it from
being auto-selected without explicit user indication.
---
 libavformat/imfdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index f17064cfcd..228ba494ae 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -889,6 +889,7 @@ static const AVClass imf_class = {
 const AVInputFormat ff_imf_demuxer = {
     .name           = "imf",
     .long_name      = NULL_IF_CONFIG_SMALL("IMF (Interoperable Master Format)"),
+    .flags          = AVFMT_EXPERIMENTAL,
     .flags_internal = FF_FMT_INIT_CLEANUP,
     .priv_class     = &imf_class,
     .priv_data_size = sizeof(IMFContext),
-- 
2.33.0

_______________________________________________
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] 6+ messages in thread

* Re: [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers
       [not found] ` <20220102174605.2438-1-anton@khirnov.net-MsQtgJZ----2>
@ 2022-01-02 18:18   ` Lynne
  2022-01-03  4:56     ` Andreas Rheinhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Lynne @ 2022-01-02 18:18 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

2 Jan 2022, 18:46 by anton@khirnov.net:

> ---
>  doc/APIchanges         | 3 +++
>  libavformat/avformat.h | 7 +++++++
>  libavformat/format.c   | 2 ++
>  libavformat/version.h  | 2 +-
>  4 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 670a59329e..29c235630e 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -14,6 +14,9 @@ libavutil:     2021-04-27
>  
>  API changes, most recent first:
>  
> +2022-01-xx - xxxxxxxxxx - lavf 59.13.100 - avformat.h
> +  Add AVFMT_EXPERIMENTAL flag.
> +
>  2021-12-xx - xxxxxxxxxx - lavu 57.13.100 - hwcontext_videotoolbox.h
>  Add av_vt_pixbuf_set_attachments
>  
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index 70b36d7682..6ce367e854 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -463,6 +463,13 @@ typedef struct AVProbeData {
>  /// Demuxer will use avio_open, no opened file should be provided by the caller.
>  #define AVFMT_NOFILE        0x0001
>  #define AVFMT_NEEDNUMBER    0x0002 /**< Needs '%d' in filename. */
> +/**
> + * The muxer/demuxer is experimental and should be used with caution.
> + *
> + * - demuxers: will not be selected automatically by probing, must be specified
> + *             explicitly.
> + */
> +#define AVFMT_EXPERIMENTAL  0x0004
>  #define AVFMT_SHOW_IDS      0x0008 /**< Show format stream IDs numbers. */
>  #define AVFMT_GLOBALHEADER  0x0040 /**< Format wants global header. */
>  #define AVFMT_NOTIMESTAMPS  0x0080 /**< Format does not need / have any timestamps. */
> diff --git a/libavformat/format.c b/libavformat/format.c
> index 387627009e..52b85c16a2 100644
> --- a/libavformat/format.c
> +++ b/libavformat/format.c
> @@ -158,6 +158,8 @@ const AVInputFormat *av_probe_input_format3(const AVProbeData *pd,
>  }
>  
>  while ((fmt1 = av_demuxer_iterate(&i))) {
> +        if (fmt1->flags & AVFMT_EXPERIMENTAL)
> +            continue;
>  if (!is_opened == !(fmt1->flags & AVFMT_NOFILE) && strcmp(fmt1->name, "image2"))
>  continue;
>  score = 0;
> diff --git a/libavformat/version.h b/libavformat/version.h
> index 917b9ffa5d..29dcce352b 100644
> --- a/libavformat/version.h
> +++ b/libavformat/version.h
> @@ -32,7 +32,7 @@
>  // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
>  // Also please add any ticket numbers that you believe might be affected here
>  #define LIBAVFORMAT_VERSION_MAJOR  59
> -#define LIBAVFORMAT_VERSION_MINOR  12
> +#define LIBAVFORMAT_VERSION_MINOR  13
>  #define LIBAVFORMAT_VERSION_MICRO 100
>  
>  #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
>

You should add it in libavformat/options_table.h too.
Apart from that, it looks fine. Should we move muxers previously
behind strict_std_compliance > experimental like scd behind
this flag or would that be an API breakage?
_______________________________________________
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] 6+ messages in thread

* Re: [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers
  2022-01-02 17:46 [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers Anton Khirnov
  2022-01-02 17:46 ` [FFmpeg-devel] [RFC/PATCH 2/2] lavf/imfdec: mark as experimental Anton Khirnov
       [not found] ` <20220102174605.2438-1-anton@khirnov.net-MsQtgJZ----2>
@ 2022-01-02 22:45 ` Michael Niedermayer
  2022-01-03 19:43   ` Anton Khirnov
  2 siblings, 1 reply; 6+ messages in thread
From: Michael Niedermayer @ 2022-01-02 22:45 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 479 bytes --]

On Sun, Jan 02, 2022 at 06:46:04PM +0100, Anton Khirnov wrote:
> ---
>  doc/APIchanges         | 3 +++
>  libavformat/avformat.h | 7 +++++++
>  libavformat/format.c   | 2 ++
>  libavformat/version.h  | 2 +-
>  4 files changed, 13 insertions(+), 1 deletion(-)

patchset LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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] 6+ messages in thread

* Re: [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers
  2022-01-02 18:18   ` [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers Lynne
@ 2022-01-03  4:56     ` Andreas Rheinhardt
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Rheinhardt @ 2022-01-03  4:56 UTC (permalink / raw)
  To: ffmpeg-devel

Lynne:
> 2 Jan 2022, 18:46 by anton@khirnov.net:
> 
>> ---
>>  doc/APIchanges         | 3 +++
>>  libavformat/avformat.h | 7 +++++++
>>  libavformat/format.c   | 2 ++
>>  libavformat/version.h  | 2 +-
>>  4 files changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/doc/APIchanges b/doc/APIchanges
>> index 670a59329e..29c235630e 100644
>> --- a/doc/APIchanges
>> +++ b/doc/APIchanges
>> @@ -14,6 +14,9 @@ libavutil:     2021-04-27
>>  
>>  API changes, most recent first:
>>  
>> +2022-01-xx - xxxxxxxxxx - lavf 59.13.100 - avformat.h
>> +  Add AVFMT_EXPERIMENTAL flag.
>> +
>>  2021-12-xx - xxxxxxxxxx - lavu 57.13.100 - hwcontext_videotoolbox.h
>>  Add av_vt_pixbuf_set_attachments
>>  
>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
>> index 70b36d7682..6ce367e854 100644
>> --- a/libavformat/avformat.h
>> +++ b/libavformat/avformat.h
>> @@ -463,6 +463,13 @@ typedef struct AVProbeData {
>>  /// Demuxer will use avio_open, no opened file should be provided by the caller.
>>  #define AVFMT_NOFILE        0x0001
>>  #define AVFMT_NEEDNUMBER    0x0002 /**< Needs '%d' in filename. */
>> +/**
>> + * The muxer/demuxer is experimental and should be used with caution.
>> + *
>> + * - demuxers: will not be selected automatically by probing, must be specified
>> + *             explicitly.
>> + */
>> +#define AVFMT_EXPERIMENTAL  0x0004
>>  #define AVFMT_SHOW_IDS      0x0008 /**< Show format stream IDs numbers. */
>>  #define AVFMT_GLOBALHEADER  0x0040 /**< Format wants global header. */
>>  #define AVFMT_NOTIMESTAMPS  0x0080 /**< Format does not need / have any timestamps. */
>> diff --git a/libavformat/format.c b/libavformat/format.c
>> index 387627009e..52b85c16a2 100644
>> --- a/libavformat/format.c
>> +++ b/libavformat/format.c
>> @@ -158,6 +158,8 @@ const AVInputFormat *av_probe_input_format3(const AVProbeData *pd,
>>  }
>>  
>>  while ((fmt1 = av_demuxer_iterate(&i))) {
>> +        if (fmt1->flags & AVFMT_EXPERIMENTAL)
>> +            continue;
>>  if (!is_opened == !(fmt1->flags & AVFMT_NOFILE) && strcmp(fmt1->name, "image2"))
>>  continue;
>>  score = 0;
>> diff --git a/libavformat/version.h b/libavformat/version.h
>> index 917b9ffa5d..29dcce352b 100644
>> --- a/libavformat/version.h
>> +++ b/libavformat/version.h
>> @@ -32,7 +32,7 @@
>>  // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
>>  // Also please add any ticket numbers that you believe might be affected here
>>  #define LIBAVFORMAT_VERSION_MAJOR  59
>> -#define LIBAVFORMAT_VERSION_MINOR  12
>> +#define LIBAVFORMAT_VERSION_MINOR  13
>>  #define LIBAVFORMAT_VERSION_MICRO 100
>>  
>>  #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
>>
> 
> You should add it in libavformat/options_table.h too.

This is not a new AVFMT_FLAG_* value, but an AVFMT_* value (akin to a
codec cap).

> Apart from that, it looks fine. Should we move muxers previously
> behind strict_std_compliance > experimental like scd behind
> this flag or would that be an API breakage?

What (de)muxers (scd is a demuxer) would that be besides scd?

- Andreas
_______________________________________________
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] 6+ messages in thread

* Re: [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers
  2022-01-02 22:45 ` Michael Niedermayer
@ 2022-01-03 19:43   ` Anton Khirnov
  0 siblings, 0 replies; 6+ messages in thread
From: Anton Khirnov @ 2022-01-03 19:43 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Quoting Michael Niedermayer (2022-01-02 23:45:19)
> On Sun, Jan 02, 2022 at 06:46:04PM +0100, Anton Khirnov wrote:
> > ---
> >  doc/APIchanges         | 3 +++
> >  libavformat/avformat.h | 7 +++++++
> >  libavformat/format.c   | 2 ++
> >  libavformat/version.h  | 2 +-
> >  4 files changed, 13 insertions(+), 1 deletion(-)
> 
> patchset LGTM

pushed

-- 
Anton Khirnov
_______________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2022-01-03 19:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-02 17:46 [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers Anton Khirnov
2022-01-02 17:46 ` [FFmpeg-devel] [RFC/PATCH 2/2] lavf/imfdec: mark as experimental Anton Khirnov
     [not found] ` <20220102174605.2438-1-anton@khirnov.net-MsQtgJZ----2>
2022-01-02 18:18   ` [FFmpeg-devel] [RFC/PATCH 1/2] lavf: add a flag for experimental (de)muxers Lynne
2022-01-03  4:56     ` Andreas Rheinhardt
2022-01-02 22:45 ` Michael Niedermayer
2022-01-03 19:43   ` Anton Khirnov

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