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
d5a0120d
Commit
d5a0120d
authored
Nov 13, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic and initial support of sipr in rm demuxer. Doesn't work with all flavours yet.
parent
d4515c0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
28 deletions
+36
-28
modules/demux/real.c
modules/demux/real.c
+36
-28
No files found.
modules/demux/real.c
View file @
d5a0120d
...
...
@@ -103,6 +103,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args );
static
int
HeaderRead
(
demux_t
*
p_demux
);
static
int
ReadCodecSpecificData
(
demux_t
*
p_demux
,
int
i_len
,
int
i_num
);
// Map flavour to bytes per second
static
int
sipr_fl2bps
[
4
]
=
{
813
,
1062
,
625
,
2000
};
// 6.5, 8.5, 5, 16 kbit per second
/*****************************************************************************
* Open
*****************************************************************************/
...
...
@@ -482,7 +485,7 @@ static int Demux( demux_t *p_demux )
(
int64_t
)
p_sys
->
i_pcr
);
}
if
(
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
)
)
if
(
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
)
)
{
int
i_sub
=
(
p_sys
->
buffer
[
1
]
>>
4
)
&
0x0f
;
uint8_t
*
p_sub
=
&
p_sys
->
buffer
[
2
+
2
*
i_sub
];
...
...
@@ -517,8 +520,7 @@ static int Demux( demux_t *p_demux )
if
(
i_flags
&
2
)
y
=
tk
->
i_subpacket
=
0
;
if
(
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'c'
,
'o'
,
'o'
,
'k'
)
||
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'a'
,
't'
,
'r'
,
'c'
)
||
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
's'
,
'i'
,
'p'
,
'r'
)
)
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'a'
,
't'
,
'r'
,
'c'
))
for
(
i
=
0
;
i
<
tk
->
i_frame_size
/
tk
->
i_subpacket_size
;
i
++
)
{
block_t
*
p_block
=
block_New
(
p_demux
,
tk
->
i_subpacket_size
);
...
...
@@ -533,7 +535,8 @@ static int Demux( demux_t *p_demux )
tk
->
i_subpacket
++
;
}
if
(
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'2'
,
'8'
,
'_'
,
'8'
)
)
if
(
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'2'
,
'8'
,
'_'
,
'8'
)
||
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
's'
,
'i'
,
'p'
,
'r'
)
)
for
(
i
=
0
;
i
<
tk
->
i_subpacket_h
/
2
;
i
++
)
{
block_t
*
p_block
=
block_New
(
p_demux
,
tk
->
i_coded_frame_size
);
...
...
@@ -1043,14 +1046,14 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
switch
(
fmt
.
i_codec
)
{
case
VLC_FOURCC
(
'd'
,
'n'
,
'e'
,
't'
):
fmt
.
i_codec
=
VLC_FOURCC
(
'a'
,
'5'
,
'2'
,
' '
);
case
VLC_FOURCC
(
'd'
,
'n'
,
'e'
,
't'
):
fmt
.
i_codec
=
VLC_FOURCC
(
'a'
,
'5'
,
'2'
,
' '
);
break
;
case
VLC_FOURCC
(
'r'
,
'a'
,
'a'
,
'c'
):
case
VLC_FOURCC
(
'r'
,
'a'
,
'c'
,
'p'
):
case
VLC_FOURCC
(
'r'
,
'a'
,
'a'
,
'c'
):
case
VLC_FOURCC
(
'r'
,
'a'
,
'c'
,
'p'
):
fmt
.
i_extra
=
GetDWBE
(
p_peek
);
p_peek
+=
4
;
//
version 5 ?
//
For version == 4, there might need an extra p_peek++
if
(
fmt
.
i_extra
>
0
)
{
fmt
.
i_extra
--
;
p_peek
++
;
}
if
(
fmt
.
i_extra
>
0
)
{
...
...
@@ -1058,12 +1061,11 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
memcpy
(
fmt
.
p_extra
,
p_peek
,
fmt
.
i_extra
);
}
fmt
.
i_codec
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
);
fmt
.
i_codec
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
);
break
;
case
VLC_FOURCC
(
'c'
,
'o'
,
'o'
,
'k'
):
case
VLC_FOURCC
(
'a'
,
't'
,
'r'
,
'c'
):
// case VLC_FOURCC('s','i','p','r'):
fmt
.
audio
.
i_blockalign
=
i_subpacket_size
;
if
(
!
(
fmt
.
i_extra
=
GetDWBE
(
p_peek
))
)
break
;
fmt
.
p_extra
=
malloc
(
fmt
.
i_extra
);
...
...
@@ -1075,6 +1077,12 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
fmt
.
audio
.
i_blockalign
=
i_coded_frame_size
;
break
;
case
VLC_FOURCC
(
's'
,
'i'
,
'p'
,
'r'
):
fmt
.
i_extra
=
0
;
fmt
.
audio
.
i_blockalign
=
i_coded_frame_size
;
fmt
.
audio
.
i_bitspersample
=
sipr_fl2bps
[
i_flavor
];
break
;
default:
msg_Dbg
(
p_demux
,
" - unknown audio codec=%4.4s"
,
(
char
*
)
&
fmt
.
i_codec
);
...
...
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