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
59078d61
Commit
59078d61
authored
Jul 30, 2009
by
ogg.k.ogg.k
Committed by
Laurent Aimar
Jul 31, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
factor the ogg paging code
Signed-off-by:
Laurent Aimar
<
fenrir@videolan.org
>
parent
47318ef3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
24 deletions
+12
-24
modules/mux/ogg.c
modules/mux/ogg.c
+12
-24
No files found.
modules/mux/ogg.c
View file @
59078d61
...
@@ -557,14 +557,16 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
...
@@ -557,14 +557,16 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
/*****************************************************************************
/*****************************************************************************
* Ogg bitstream manipulation routines
* Ogg bitstream manipulation routines
*****************************************************************************/
*****************************************************************************/
static
block_t
*
OggStreamFlush
(
sout_mux_t
*
p_mux
,
static
block_t
*
OggStreamGetPage
(
sout_mux_t
*
p_mux
,
ogg_stream_state
*
p_os
,
mtime_t
i_pts
)
ogg_stream_state
*
p_os
,
mtime_t
i_pts
,
bool
flush
)
{
{
(
void
)
p_mux
;
(
void
)
p_mux
;
block_t
*
p_og
,
*
p_og_first
=
NULL
;
block_t
*
p_og
,
*
p_og_first
=
NULL
;
ogg_page
og
;
ogg_page
og
;
int
(
*
pager
)(
ogg_stream_state
*
,
ogg_page
*
)
=
flush
?
ogg_stream_flush
:
ogg_stream_pageout
;
while
(
ogg_stream_flush
(
p_os
,
&
og
)
)
while
(
pager
(
p_os
,
&
og
)
)
{
{
/* Flush all data */
/* Flush all data */
p_og
=
block_New
(
p_mux
,
og
.
header_len
+
og
.
body_len
);
p_og
=
block_New
(
p_mux
,
og
.
header_len
+
og
.
body_len
);
...
@@ -583,30 +585,16 @@ static block_t *OggStreamFlush( sout_mux_t *p_mux,
...
@@ -583,30 +585,16 @@ static block_t *OggStreamFlush( sout_mux_t *p_mux,
return
p_og_first
;
return
p_og_first
;
}
}
static
block_t
*
OggStream
PageOut
(
sout_mux_t
*
p_mux
,
static
block_t
*
OggStream
Flush
(
sout_mux_t
*
p_mux
,
ogg_stream_state
*
p_os
,
mtime_t
i_pts
)
ogg_stream_state
*
p_os
,
mtime_t
i_pts
)
{
{
(
void
)
p_mux
;
return
OggStreamGetPage
(
p_mux
,
p_os
,
i_pts
,
true
);
block_t
*
p_og
,
*
p_og_first
=
NULL
;
}
ogg_page
og
;
while
(
ogg_stream_pageout
(
p_os
,
&
og
)
)
{
/* Flush all data */
p_og
=
block_New
(
p_mux
,
og
.
header_len
+
og
.
body_len
);
memcpy
(
p_og
->
p_buffer
,
og
.
header
,
og
.
header_len
);
memcpy
(
p_og
->
p_buffer
+
og
.
header_len
,
og
.
body
,
og
.
body_len
);
p_og
->
i_dts
=
0
;
p_og
->
i_pts
=
i_pts
;
p_og
->
i_length
=
0
;
i_pts
=
0
;
// write them only once
block_ChainAppend
(
&
p_og_first
,
p_og
);
}
return
p_og_first
;
static
block_t
*
OggStreamPageOut
(
sout_mux_t
*
p_mux
,
ogg_stream_state
*
p_os
,
mtime_t
i_pts
)
{
return
OggStreamGetPage
(
p_mux
,
p_os
,
i_pts
,
false
);
}
}
static
block_t
*
OggCreateHeader
(
sout_mux_t
*
p_mux
)
static
block_t
*
OggCreateHeader
(
sout_mux_t
*
p_mux
)
...
...
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