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
6daa02af
Commit
6daa02af
authored
Feb 24, 2013
by
Sébastien Escudier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Vorbis and VP8 codecs to live555.
Chained vorbis stream is not supported.
parent
41a7f1cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
modules/access/live555.cpp
modules/access/live555.cpp
+42
-0
No files found.
modules/access/live555.cpp
View file @
6daa02af
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
#include <GroupsockHelper.hh>
#include <GroupsockHelper.hh>
#include <liveMedia.hh>
#include <liveMedia.hh>
#include <liveMedia_version.hh>
#include <liveMedia_version.hh>
#include <Base64.hh>
extern
"C"
{
extern
"C"
{
#include "../access/mms/asf.h"
/* Who said ugly ? */
#include "../access/mms/asf.h"
/* Who said ugly ? */
...
@@ -268,6 +269,8 @@ static void* TimeoutPrevention( void * );
...
@@ -268,6 +269,8 @@ static void* TimeoutPrevention( void * );
static
unsigned
char
*
parseH264ConfigStr
(
char
const
*
configStr
,
static
unsigned
char
*
parseH264ConfigStr
(
char
const
*
configStr
,
unsigned
int
&
configSize
);
unsigned
int
&
configSize
);
static
unsigned
char
*
parseVorbisConfigStr
(
char
const
*
configStr
,
unsigned
int
&
configSize
);
/*****************************************************************************
/*****************************************************************************
* DemuxOpen:
* DemuxOpen:
...
@@ -959,6 +962,20 @@ static int SessionsSetup( demux_t *p_demux )
...
@@ -959,6 +962,20 @@ static int SessionsSetup( demux_t *p_demux )
tk
->
fmt
.
audio
.
i_rate
=
8000
;
tk
->
fmt
.
audio
.
i_rate
=
8000
;
}
}
}
}
else
if
(
!
strcmp
(
sub
->
codecName
(),
"VORBIS"
)
)
{
tk
->
fmt
.
i_codec
=
VLC_CODEC_VORBIS
;
unsigned
int
i_extra
;
unsigned
char
*
p_extra
;
if
(
(
p_extra
=
parseVorbisConfigStr
(
sub
->
fmtp_config
(),
i_extra
)
)
)
{
tk
->
fmt
.
i_extra
=
i_extra
;
tk
->
fmt
.
p_extra
=
p_extra
;
}
else
msg_Warn
(
p_demux
,
"Missing or unsupported vorbis header."
);
}
}
}
else
if
(
!
strcmp
(
sub
->
mediumName
(),
"video"
)
)
else
if
(
!
strcmp
(
sub
->
mediumName
(),
"video"
)
)
{
{
...
@@ -1050,6 +1067,10 @@ static int SessionsSetup( demux_t *p_demux )
...
@@ -1050,6 +1067,10 @@ static int SessionsSetup( demux_t *p_demux )
tk
->
p_out_muxed
=
stream_DemuxNew
(
p_demux
,
"rawdv"
,
tk
->
p_out_muxed
=
stream_DemuxNew
(
p_demux
,
"rawdv"
,
p_demux
->
out
);
p_demux
->
out
);
}
}
else
if
(
!
strcmp
(
sub
->
codecName
(),
"VP8"
)
)
{
tk
->
fmt
.
i_codec
=
VLC_CODEC_VP8
;
}
}
}
else
if
(
!
strcmp
(
sub
->
mediumName
(),
"text"
)
)
else
if
(
!
strcmp
(
sub
->
mediumName
(),
"text"
)
)
{
{
...
@@ -2123,3 +2144,24 @@ static unsigned char* parseH264ConfigStr( char const* configStr,
...
@@ -2123,3 +2144,24 @@ static unsigned char* parseH264ConfigStr( char const* configStr,
free
(
dup
);
free
(
dup
);
return
cfg
;
return
cfg
;
}
}
static
uint8_t
*
parseVorbisConfigStr
(
char
const
*
configStr
,
unsigned
int
&
configSize
)
{
configSize
=
0
;
if
(
configStr
==
NULL
||
*
configStr
==
'\0'
)
return
NULL
;
unsigned
char
*
p_cfg
=
base64Decode
(
configStr
,
configSize
);
uint8_t
*
p_extra
=
NULL
;
/* skip header count, ident number and length (cf. RFC 5215) */
const
unsigned
int
headerSkip
=
9
;
if
(
configSize
>
headerSkip
&&
((
uint8_t
*
)
p_cfg
)[
3
]
==
1
)
{
configSize
-=
headerSkip
;
p_extra
=
(
uint8_t
*
)
xmalloc
(
configSize
);
memcpy
(
p_extra
,
p_cfg
+
headerSkip
,
configSize
);
}
delete
[]
p_cfg
;
return
p_extra
;
}
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