Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
217213c1
Commit
217213c1
authored
Dec 18, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavutil: set verbosity based on VLC own verbosity
parent
071f1afb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
8 deletions
+36
-8
modules/access/avio.c
modules/access/avio.c
+2
-2
modules/codec/avcodec/avcodec.c
modules/codec/avcodec/avcodec.c
+1
-1
modules/codec/avcodec/avcommon.h
modules/codec/avcodec/avcommon.h
+30
-2
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+1
-1
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+1
-1
modules/demux/avformat/mux.c
modules/demux/avformat/mux.c
+1
-1
No files found.
modules/access/avio.c
View file @
217213c1
...
@@ -140,7 +140,7 @@ int OpenAvio(vlc_object_t *object)
...
@@ -140,7 +140,7 @@ int OpenAvio(vlc_object_t *object)
}
}
/* */
/* */
vlc_init_avformat
();
vlc_init_avformat
(
object
);
int
ret
;
int
ret
;
#if LIBAVFORMAT_VERSION_MAJOR < 54
#if LIBAVFORMAT_VERSION_MAJOR < 54
...
@@ -224,7 +224,7 @@ int OutOpenAvio(vlc_object_t *object)
...
@@ -224,7 +224,7 @@ int OutOpenAvio(vlc_object_t *object)
sys
->
context
=
NULL
;
sys
->
context
=
NULL
;
/* */
/* */
vlc_init_avformat
();
vlc_init_avformat
(
object
);
if
(
!
access
->
psz_path
)
if
(
!
access
->
psz_path
)
goto
error
;
goto
error
;
...
...
modules/codec/avcodec/avcodec.c
View file @
217213c1
...
@@ -269,7 +269,7 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -269,7 +269,7 @@ static int OpenDecoder( vlc_object_t *p_this )
}
}
/* Initialization must be done before avcodec_find_decoder() */
/* Initialization must be done before avcodec_find_decoder() */
vlc_init_avcodec
();
vlc_init_avcodec
(
p_this
);
/* *** ask ffmpeg for a decoder *** */
/* *** ask ffmpeg for a decoder *** */
char
*
psz_decoder
=
var_CreateGetString
(
p_this
,
"avcodec-codec"
);
char
*
psz_decoder
=
var_CreateGetString
(
p_this
,
"avcodec-codec"
);
...
...
modules/codec/avcodec/avcommon.h
View file @
217213c1
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#ifdef HAVE_LIBAVUTIL_AVUTIL_H
#ifdef HAVE_LIBAVUTIL_AVUTIL_H
# include <libavutil/avutil.h>
# include <libavutil/avutil.h>
# include <libavutil/dict.h>
# include <libavutil/dict.h>
# include <libavutil/log.h>
#define AV_OPTIONS_TEXT "Advanced options"
#define AV_OPTIONS_TEXT "Advanced options"
#define AV_OPTIONS_LONGTEXT "Advanced options, in the form {opt=val,opt2=val2}."
#define AV_OPTIONS_LONGTEXT "Advanced options, in the form {opt=val,opt2=val2}."
...
@@ -58,16 +59,41 @@ static inline AVDictionary *vlc_av_get_options(const char *psz_opts)
...
@@ -58,16 +59,41 @@ static inline AVDictionary *vlc_av_get_options(const char *psz_opts)
}
}
return
options
;
return
options
;
}
}
static
inline
void
vlc_init_avutil
(
vlc_object_t
*
obj
)
{
int
level
=
AV_LOG_QUIET
;
if
(
!
var_InheritBool
(
obj
,
"quiet"
))
{
int64_t
verbose
=
var_InheritInteger
(
obj
,
"verbose"
);
if
(
verbose
>=
0
)
switch
(
verbose
+
VLC_MSG_ERR
)
{
case
VLC_MSG_ERR
:
level
=
AV_LOG_ERROR
;
break
;
case
VLC_MSG_WARN
:
level
=
AV_LOG_WARNING
;
break
;
case
VLC_MSG_DBG
:
level
=
AV_LOG_DEBUG
;
default:
break
;
}
}
av_log_set_level
(
level
);
}
#endif
#endif
unsigned
GetVlcDspMask
(
void
);
unsigned
GetVlcDspMask
(
void
);
#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
# include <libavformat/avformat.h>
# include <libavformat/avformat.h>
static
inline
void
vlc_init_avformat
(
v
oid
)
static
inline
void
vlc_init_avformat
(
v
lc_object_t
*
obj
)
{
{
vlc_avcodec_lock
();
vlc_avcodec_lock
();
vlc_init_avutil
(
obj
);
#if LIBAVUTIL_VERSION_CHECK(51, 25, 0, 42, 100)
#if LIBAVUTIL_VERSION_CHECK(51, 25, 0, 42, 100)
av_set_cpu_flags_mask
(
INT_MAX
&
~
GetVlcDspMask
()
);
av_set_cpu_flags_mask
(
INT_MAX
&
~
GetVlcDspMask
()
);
#endif
#endif
...
@@ -80,10 +106,12 @@ static inline void vlc_init_avformat(void)
...
@@ -80,10 +106,12 @@ static inline void vlc_init_avformat(void)
#ifdef HAVE_LIBAVCODEC_AVCODEC_H
#ifdef HAVE_LIBAVCODEC_AVCODEC_H
# include <libavcodec/avcodec.h>
# include <libavcodec/avcodec.h>
static
inline
void
vlc_init_avcodec
(
v
oid
)
static
inline
void
vlc_init_avcodec
(
v
lc_object_t
*
obj
)
{
{
vlc_avcodec_lock
();
vlc_avcodec_lock
();
vlc_init_avutil
(
obj
);
#if LIBAVCODEC_VERSION_MAJOR < 54
#if LIBAVCODEC_VERSION_MAJOR < 54
avcodec_init
();
avcodec_init
();
#endif
#endif
...
...
modules/codec/avcodec/encoder.c
View file @
217213c1
...
@@ -216,7 +216,7 @@ int OpenEncoder( vlc_object_t *p_this )
...
@@ -216,7 +216,7 @@ int OpenEncoder( vlc_object_t *p_this )
char
*
psz_val
;
char
*
psz_val
;
/* Initialization must be done before avcodec_find_encoder() */
/* Initialization must be done before avcodec_find_encoder() */
vlc_init_avcodec
();
vlc_init_avcodec
(
p_this
);
config_ChainParse
(
p_enc
,
ENC_CFG_PREFIX
,
ppsz_enc_options
,
p_enc
->
p_cfg
);
config_ChainParse
(
p_enc
,
ENC_CFG_PREFIX
,
ppsz_enc_options
,
p_enc
->
p_cfg
);
...
...
modules/demux/avformat/demux.c
View file @
217213c1
...
@@ -129,7 +129,7 @@ int OpenDemux( vlc_object_t *p_this )
...
@@ -129,7 +129,7 @@ int OpenDemux( vlc_object_t *p_this )
}
}
stream_Control
(
p_demux
->
s
,
STREAM_CAN_SEEK
,
&
b_can_seek
);
stream_Control
(
p_demux
->
s
,
STREAM_CAN_SEEK
,
&
b_can_seek
);
vlc_init_avformat
();
vlc_init_avformat
(
p_this
);
char
*
psz_format
=
var_InheritString
(
p_this
,
"avformat-format"
);
char
*
psz_format
=
var_InheritString
(
p_this
,
"avformat-format"
);
if
(
psz_format
)
if
(
psz_format
)
...
...
modules/demux/avformat/mux.c
View file @
217213c1
...
@@ -83,7 +83,7 @@ int OpenMux( vlc_object_t *p_this )
...
@@ -83,7 +83,7 @@ int OpenMux( vlc_object_t *p_this )
sout_mux_sys_t
*
p_sys
;
sout_mux_sys_t
*
p_sys
;
char
*
psz_mux
;
char
*
psz_mux
;
vlc_init_avformat
();
vlc_init_avformat
(
p_this
);
config_ChainParse
(
p_mux
,
"sout-avformat-"
,
ppsz_mux_options
,
p_mux
->
p_cfg
);
config_ChainParse
(
p_mux
,
"sout-avformat-"
,
ppsz_mux_options
,
p_mux
->
p_cfg
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment