diff mbox

[FFmpeg-devel,1/3] avcodec: add new AVOID_PROBING capability

Message ID 20160922120005.1083-1-timo@rothenpieler.org
State Accepted
Commit 30d3e36a46028d6d4aec5070d1fff89f8af5f9d9
Headers show

Commit Message

Timo Rothenpieler Sept. 22, 2016, noon UTC
---
 doc/APIchanges       |  3 +++
 libavcodec/avcodec.h | 10 ++++++++++
 libavcodec/version.h |  4 ++--
 3 files changed, 15 insertions(+), 2 deletions(-)

Comments

wm4 Sept. 22, 2016, 12:49 p.m. UTC | #1
On Thu, 22 Sep 2016 14:00:03 +0200
Timo Rothenpieler <timo@rothenpieler.org> wrote:

> ---
>  doc/APIchanges       |  3 +++
>  libavcodec/avcodec.h | 10 ++++++++++
>  libavcodec/version.h |  4 ++--
>  3 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 158a0b2..5d577e4 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -15,6 +15,9 @@ libavutil:     2015-08-28
>  
>  API changes, most recent first:
>  
> +2016-09-xx - xxxxxxx - lavc 57.58.100 - avcodec.h
> +  Add AV_CODEC_CAP_AVOID_PROBING codec capability flag.
> +
>  2016-09-xx - xxxxxxx - lavf 57.49.100 - avformat.h
>    Add avformat_transfer_internal_stream_timing_info helper to help with stream
>    copy.
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index db1061d..b174116 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1036,6 +1036,16 @@ typedef struct RcOverride{
>   */
>  #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
>  /**
> + * Decoder is not a preferred choice for probing.
> + * This indicates that the decoder is not a good choice for probing.
> + * It could for example be an expensive to spin up hardware decoder,
> + * or it could simply not provide a lot of useful information about
> + * the stream.
> + * A decoder marked with this flag should only be used as last resort
> + * choice for probing.
> + */
> +#define AV_CODEC_CAP_AVOID_PROBING       (1 << 17)
> +/**
>   * Codec is intra only.
>   */
>  #define AV_CODEC_CAP_INTRA_ONLY       0x40000000
> diff --git a/libavcodec/version.h b/libavcodec/version.h
> index 9acf081..9e44eca 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -28,8 +28,8 @@
>  #include "libavutil/version.h"
>  
>  #define LIBAVCODEC_VERSION_MAJOR  57
> -#define LIBAVCODEC_VERSION_MINOR  57
> -#define LIBAVCODEC_VERSION_MICRO 101
> +#define LIBAVCODEC_VERSION_MINOR  58
> +#define LIBAVCODEC_VERSION_MICRO 100
>  
>  #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
>                                                 LIBAVCODEC_VERSION_MINOR, \

Actually seems like a good idea. All hw decoders should be marked like
this.
Michael Niedermayer Sept. 22, 2016, 2:39 p.m. UTC | #2
On Thu, Sep 22, 2016 at 02:00:03PM +0200, Timo Rothenpieler wrote:
> ---
>  doc/APIchanges       |  3 +++
>  libavcodec/avcodec.h | 10 ++++++++++
>  libavcodec/version.h |  4 ++--
>  3 files changed, 15 insertions(+), 2 deletions(-)

LGTM

thx

[...]
Timo Rothenpieler Sept. 23, 2016, 9:49 a.m. UTC | #3
series applied
diff mbox

Patch

diff --git a/doc/APIchanges b/doc/APIchanges
index 158a0b2..5d577e4 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@  libavutil:     2015-08-28
 
 API changes, most recent first:
 
+2016-09-xx - xxxxxxx - lavc 57.58.100 - avcodec.h
+  Add AV_CODEC_CAP_AVOID_PROBING codec capability flag.
+
 2016-09-xx - xxxxxxx - lavf 57.49.100 - avformat.h
   Add avformat_transfer_internal_stream_timing_info helper to help with stream
   copy.
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index db1061d..b174116 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1036,6 +1036,16 @@  typedef struct RcOverride{
  */
 #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
 /**
+ * Decoder is not a preferred choice for probing.
+ * This indicates that the decoder is not a good choice for probing.
+ * It could for example be an expensive to spin up hardware decoder,
+ * or it could simply not provide a lot of useful information about
+ * the stream.
+ * A decoder marked with this flag should only be used as last resort
+ * choice for probing.
+ */
+#define AV_CODEC_CAP_AVOID_PROBING       (1 << 17)
+/**
  * Codec is intra only.
  */
 #define AV_CODEC_CAP_INTRA_ONLY       0x40000000
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 9acf081..9e44eca 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,8 +28,8 @@ 
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  57
-#define LIBAVCODEC_VERSION_MINOR  57
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MINOR  58
+#define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \