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
a2a352f3
Commit
a2a352f3
authored
Sep 18, 2014
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mux: ogg: add daala support
parent
e0a19237
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
modules/mux/ogg.c
modules/mux/ogg.c
+22
-8
No files found.
modules/mux/ogg.c
View file @
a2a352f3
...
...
@@ -152,7 +152,7 @@ typedef struct
mtime_t
i_length
;
int
i_packet_no
;
int
i_serial_no
;
int
i_keyframe_granule_shift
;
/* Theora only */
int
i_keyframe_granule_shift
;
/* Theora
and Daala
only */
int
i_last_keyframe
;
/* dirac and theora */
int
i_num_frames
;
/* Theora only */
uint64_t
u_last_granulepos
;
/* Used for correct EOS page */
...
...
@@ -439,6 +439,10 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
msg_Dbg
(
p_mux
,
"theora stream"
);
break
;
case
VLC_CODEC_DAALA
:
msg_Dbg
(
p_mux
,
"daala stream"
);
break
;
case
VLC_CODEC_VP8
:
msg_Dbg
(
p_mux
,
"VP8 stream"
);
break
;
...
...
@@ -746,6 +750,9 @@ static void OggGetSkeletonFisbone( uint8_t **pp_buffer, long *pi_size,
case
VLC_CODEC_THEORA
:
psz_value
=
"video/theora"
;
break
;
case
VLC_CODEC_DAALA
:
psz_value
=
"video/daala"
;
break
;
case
VLC_CODEC_SPEEX
:
psz_value
=
"audio/speex"
;
break
;
...
...
@@ -994,7 +1001,9 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
sout_input_t
*
p_input
=
p_mux
->
pp_inputs
[
i
];
p_stream
=
(
ogg_stream_t
*
)
p_input
->
p_sys
;
bool
video
=
(
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
||
p_stream
->
i_fourcc
==
VLC_CODEC_DIRAC
);
bool
video
=
(
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
||
p_stream
->
i_fourcc
==
VLC_CODEC_DIRAC
||
p_stream
->
i_fourcc
==
VLC_CODEC_DAALA
);
if
(
(
(
pass
==
0
&&
!
video
)
||
(
pass
==
1
&&
video
)
)
)
continue
;
...
...
@@ -1009,9 +1018,10 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
if
(
p_stream
->
i_fourcc
==
VLC_CODEC_VORBIS
||
p_stream
->
i_fourcc
==
VLC_CODEC_SPEEX
||
p_stream
->
i_fourcc
==
VLC_CODEC_OPUS
||
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
)
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
||
p_stream
->
i_fourcc
==
VLC_CODEC_DAALA
)
{
/* First packet in order: vorbis/speex/
theor
a info */
/* First packet in order: vorbis/speex/
opus/theora/daal
a info */
unsigned
pi_size
[
XIPH_MAX_HEADER_COUNT
];
void
*
pp_data
[
XIPH_MAX_HEADER_COUNT
];
unsigned
i_count
;
...
...
@@ -1035,8 +1045,9 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
ogg_stream_packetin
(
&
p_stream
->
os
,
&
op
);
p_og
=
OggStreamFlush
(
p_mux
,
&
p_stream
->
os
,
0
);
/* Get keyframe_granule_shift for theora granulepos calculation */
if
(
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
)
/* Get keyframe_granule_shift for theora or daala granulepos calculation */
if
(
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
||
p_stream
->
i_fourcc
==
VLC_CODEC_DAALA
)
{
p_stream
->
i_keyframe_granule_shift
=
(
(
op
.
packet
[
40
]
&
0x03
)
<<
3
)
|
(
(
op
.
packet
[
41
]
&
0xe0
)
>>
5
);
...
...
@@ -1172,7 +1183,8 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
if
(
p_stream
->
i_fourcc
==
VLC_CODEC_VORBIS
||
p_stream
->
i_fourcc
==
VLC_CODEC_SPEEX
||
p_stream
->
i_fourcc
==
VLC_CODEC_OPUS
||
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
)
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
||
p_stream
->
i_fourcc
==
VLC_CODEC_DAALA
)
{
unsigned
pi_size
[
XIPH_MAX_HEADER_COUNT
];
void
*
pp_data
[
XIPH_MAX_HEADER_COUNT
];
...
...
@@ -1573,6 +1585,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
p_stream
->
i_fourcc
!=
VLC_CODEC_SPEEX
&&
p_stream
->
i_fourcc
!=
VLC_CODEC_OPUS
&&
p_stream
->
i_fourcc
!=
VLC_CODEC_THEORA
&&
p_stream
->
i_fourcc
!=
VLC_CODEC_DAALA
&&
p_stream
->
i_fourcc
!=
VLC_CODEC_VP8
&&
p_stream
->
i_fourcc
!=
VLC_CODEC_DIRAC
)
{
...
...
@@ -1614,7 +1627,8 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
}
else
if
(
p_stream
->
i_cat
==
VIDEO_ES
)
{
if
(
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
)
if
(
p_stream
->
i_fourcc
==
VLC_CODEC_THEORA
||
p_stream
->
i_fourcc
==
VLC_CODEC_DAALA
)
{
p_stream
->
i_num_frames
++
;
if
(
p_data
->
i_flags
&
BLOCK_FLAG_TYPE_I
)
...
...
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