Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
f8d33b35
Commit
f8d33b35
authored
Nov 04, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: specify libav private options
Usage: --avio-options={foo=bar,few=baz}
parent
50fe8e11
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
modules/access/avio.c
modules/access/avio.c
+22
-2
modules/access/avio.h
modules/access/avio.h
+3
-1
No files found.
modules/access/avio.c
View file @
f8d33b35
...
@@ -148,7 +148,17 @@ int OpenAvio(vlc_object_t *object)
...
@@ -148,7 +148,17 @@ int OpenAvio(vlc_object_t *object)
.
callback
=
UrlInterruptCallback
,
.
callback
=
UrlInterruptCallback
,
.
opaque
=
access
,
.
opaque
=
access
,
};
};
ret
=
avio_open2
(
&
sys
->
context
,
url
,
AVIO_FLAG_READ
,
&
cb
,
NULL
/* options */
);
AVDictionary
*
options
=
NULL
;
char
*
psz_opts
=
var_InheritString
(
access
,
"avio-options"
);
if
(
psz_opts
&&
*
psz_opts
)
{
options
=
vlc_av_get_options
(
psz_opts
);
free
(
psz_opts
);
}
ret
=
avio_open2
(
&
sys
->
context
,
url
,
AVIO_FLAG_READ
,
&
cb
,
&
options
);
AVDictionaryEntry
*
t
=
NULL
;
while
((
t
=
av_dict_get
(
options
,
""
,
t
,
AV_DICT_IGNORE_SUFFIX
)))
msg_Err
(
access
,
"unknown option
\"
%s
\"
"
,
t
->
key
);
av_dict_free
(
&
options
);
#endif
#endif
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
errno
=
AVUNERROR
(
ret
);
errno
=
AVUNERROR
(
ret
);
...
@@ -216,8 +226,18 @@ int OutOpenAvio(vlc_object_t *object)
...
@@ -216,8 +226,18 @@ int OutOpenAvio(vlc_object_t *object)
.
callback
=
UrlInterruptCallback
,
.
callback
=
UrlInterruptCallback
,
.
opaque
=
access
,
.
opaque
=
access
,
};
};
AVDictionary
*
options
=
NULL
;
char
*
psz_opts
=
var_InheritString
(
access
,
"avio-options"
);
if
(
psz_opts
&&
*
psz_opts
)
{
options
=
vlc_av_get_options
(
psz_opts
);
free
(
psz_opts
);
}
ret
=
avio_open2
(
&
sys
->
context
,
access
->
psz_path
,
AVIO_FLAG_WRITE
,
ret
=
avio_open2
(
&
sys
->
context
,
access
->
psz_path
,
AVIO_FLAG_WRITE
,
&
cb
,
NULL
/* options */
);
&
cb
,
&
options
);
AVDictionaryEntry
*
t
=
NULL
;
while
((
t
=
av_dict_get
(
options
,
""
,
t
,
AV_DICT_IGNORE_SUFFIX
)))
msg_Err
(
access
,
"unknown option
\"
%s
\"
"
,
t
->
key
);
av_dict_free
(
&
options
);
#endif
#endif
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
errno
=
AVUNERROR
(
ret
);
errno
=
AVUNERROR
(
ret
);
...
...
modules/access/avio.h
View file @
f8d33b35
...
@@ -43,6 +43,7 @@ void OutCloseAvio(vlc_object_t *);
...
@@ -43,6 +43,7 @@ void OutCloseAvio(vlc_object_t *);
set_capability("access", -1) \
set_capability("access", -1) \
add_shortcut("avio", "rtmp", "rtmpe", "rtmps", "rtmpt", "rtmpte", "rtmpts") \
add_shortcut("avio", "rtmp", "rtmpe", "rtmps", "rtmpt", "rtmpte", "rtmpts") \
set_callbacks(OpenAvio, CloseAvio) \
set_callbacks(OpenAvio, CloseAvio) \
add_string("avio-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true) \
add_submodule () \
add_submodule () \
set_shortname( "libavformat" ) \
set_shortname( "libavformat" ) \
set_description( N_("libavformat access output") ) \
set_description( N_("libavformat access output") ) \
...
@@ -50,4 +51,5 @@ void OutCloseAvio(vlc_object_t *);
...
@@ -50,4 +51,5 @@ void OutCloseAvio(vlc_object_t *);
set_category( CAT_SOUT ) \
set_category( CAT_SOUT ) \
set_subcategory( SUBCAT_SOUT_ACO ) \
set_subcategory( SUBCAT_SOUT_ACO ) \
add_shortcut( "avio", "rtmp" ) \
add_shortcut( "avio", "rtmp" ) \
set_callbacks( OutOpenAvio, OutCloseAvio)
set_callbacks( OutOpenAvio, OutCloseAvio) \
add_string("avio-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true)
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