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
0011b704
Commit
0011b704
authored
Jan 29, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat mux: convert to new avio API
parent
aca40fdc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
modules/demux/avformat/mux.c
modules/demux/avformat/mux.c
+20
-3
No files found.
modules/demux/avformat/mux.c
View file @
0011b704
...
@@ -55,7 +55,11 @@ static const char *const ppsz_mux_options[] = {
...
@@ -55,7 +55,11 @@ static const char *const ppsz_mux_options[] = {
*****************************************************************************/
*****************************************************************************/
struct
sout_mux_sys_t
struct
sout_mux_sys_t
{
{
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(105<<8)+0)
AVIOContext
*
io
;
#else
ByteIOContext
io
;
ByteIOContext
io
;
#endif
int
io_buffer_size
;
int
io_buffer_size
;
uint8_t
*
io_buffer
;
uint8_t
*
io_buffer
;
...
@@ -86,7 +90,6 @@ int OpenMux( vlc_object_t *p_this )
...
@@ -86,7 +90,6 @@ int OpenMux( vlc_object_t *p_this )
AVOutputFormat
*
file_oformat
;
AVOutputFormat
*
file_oformat
;
sout_mux_t
*
p_mux
=
(
sout_mux_t
*
)
p_this
;
sout_mux_t
*
p_mux
=
(
sout_mux_t
*
)
p_this
;
sout_mux_sys_t
*
p_sys
;
sout_mux_sys_t
*
p_sys
;
AVFormatParameters
params
,
*
ap
=
&
params
;
char
*
psz_mux
;
char
*
psz_mux
;
/* Should we call it only once ? */
/* Should we call it only once ? */
...
@@ -134,9 +137,18 @@ int OpenMux( vlc_object_t *p_this )
...
@@ -134,9 +137,18 @@ int OpenMux( vlc_object_t *p_this )
/* Create I/O wrapper */
/* Create I/O wrapper */
p_sys
->
io_buffer_size
=
32768
;
/* FIXME */
p_sys
->
io_buffer_size
=
32768
;
/* FIXME */
p_sys
->
io_buffer
=
malloc
(
p_sys
->
io_buffer_size
);
p_sys
->
io_buffer
=
malloc
(
p_sys
->
io_buffer_size
);
init_put_byte
(
&
p_sys
->
io
,
p_sys
->
io_buffer
,
p_sys
->
io_buffer_size
,
#if (LIBAVFORMAT_VERSION_INT >= ((52<<16)+(105<<8)+0))
p_sys
->
io
=
avio_alloc_context
(
#else
init_put_byte
(
&
p_sys
->
io
,
#endif
p_sys
->
io_buffer
,
p_sys
->
io_buffer_size
,
1
,
p_mux
,
NULL
,
IOWrite
,
IOSeek
);
1
,
p_mux
,
NULL
,
IOWrite
,
IOSeek
);
#if (LIBAVFORMAT_VERSION_INT < ((52<<16)+(105<<8)+0))
AVFormatParameters
params
,
*
ap
=
&
params
;
memset
(
ap
,
0
,
sizeof
(
*
ap
)
);
memset
(
ap
,
0
,
sizeof
(
*
ap
)
);
if
(
av_set_parameters
(
p_sys
->
oc
,
ap
)
<
0
)
if
(
av_set_parameters
(
p_sys
->
oc
,
ap
)
<
0
)
{
{
...
@@ -146,8 +158,13 @@ int OpenMux( vlc_object_t *p_this )
...
@@ -146,8 +158,13 @@ int OpenMux( vlc_object_t *p_this )
free
(
p_sys
);
free
(
p_sys
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
#endif
#if (LIBAVFORMAT_VERSION_INT >= ((52<<16)+(105<<8)+0))
p_sys
->
oc
->
pb
=
p_sys
->
io
;
#else
p_sys
->
oc
->
pb
=
&
p_sys
->
io
;
p_sys
->
oc
->
pb
=
&
p_sys
->
io
;
#endif
p_sys
->
oc
->
nb_streams
=
0
;
p_sys
->
oc
->
nb_streams
=
0
;
p_sys
->
b_write_header
=
true
;
p_sys
->
b_write_header
=
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