[vlc-commits] codec/demux: output version and provider in debug

Francois Cartegnie git at videolan.org
Tue Apr 18 15:15:49 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr 18 15:13:44 2017 +0200| [afcdb682ba320e7ee346ef1440f1aaa59467f7d3] | committer: Francois Cartegnie

codec/demux: output version and provider in debug

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=afcdb682ba320e7ee346ef1440f1aaa59467f7d3
---

 modules/codec/avcodec/avcodec.c         | 2 ++
 modules/codec/avcodec/avcommon_compat.h | 2 ++
 modules/codec/avcodec/encoder.c         | 2 ++
 modules/demux/avformat/demux.c          | 2 +-
 modules/demux/avformat/mux.c            | 2 ++
 5 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index 291ed0ac48..edfe10603a 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -264,6 +264,8 @@ static int OpenDecoder( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
+    msg_Dbg( p_this, "using %s %s", AVPROVIDER(LIBAVCODEC), LIBAVCODEC_IDENT );
+
     /* Initialization must be done before avcodec_find_decoder() */
     vlc_init_avcodec(p_this);
 
diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
index 6f227baef7..8f9c12081c 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -25,6 +25,8 @@
 #ifndef AVCOMMON_COMPAT_H
 #define AVCOMMON_COMPAT_H 1
 
+#define AVPROVIDER(lib) ((lib##_VERSION_MICRO < 100) ? "libav" : "ffmpeg")
+
 #ifdef HAVE_LIBAVCODEC_AVCODEC_H
 #include <libavcodec/avcodec.h>
 
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index c2ef832c49..854dcb9383 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -378,6 +378,8 @@ int OpenEncoder( vlc_object_t *p_this )
     float f_val;
     char *psz_val;
 
+    msg_Dbg( p_this, "using %s %s", AVPROVIDER(LIBAVCODEC), LIBAVCODEC_IDENT );
+
     /* Initialization must be done before avcodec_find_encoder() */
     vlc_init_avcodec(p_this);
 
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 0c1a67e67a..453e7247fd 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -649,7 +649,7 @@ int OpenDemux( vlc_object_t *p_this )
     if( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE )
         i_start_time = p_sys->ic->start_time * 1000000 / AV_TIME_BASE;
 
-    msg_Dbg( p_demux, "AVFormat supported stream" );
+    msg_Dbg( p_demux, "AVFormat(%s %s) supported stream", AVPROVIDER(LIBAVFORMAT), LIBAVFORMAT_IDENT );
     msg_Dbg( p_demux, "    - format = %s (%s)",
              p_sys->fmt->name, p_sys->fmt->long_name );
     msg_Dbg( p_demux, "    - start time = %"PRId64, i_start_time );
diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index 1d4a9715d8..821860dcf0 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -94,6 +94,8 @@ int OpenMux( vlc_object_t *p_this )
                               >= sizeof (((AVFormatContext *)NULL)->filename) )
         return VLC_EGENERIC;
 
+    msg_Dbg( p_mux, "using %s %s", AVPROVIDER(LIBAVFORMAT), LIBAVFORMAT_IDENT );
+
     vlc_init_avformat(p_this);
 
     config_ChainParse( p_mux, "sout-avformat-", ppsz_mux_options, p_mux->p_cfg );



More information about the vlc-commits mailing list