Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
0f827e95
Commit
0f827e95
authored
Mar 12, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics (ts).
parent
f5bea704
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
48 deletions
+34
-48
modules/demux/ts.c
modules/demux/ts.c
+34
-48
No files found.
modules/demux/ts.c
View file @
0f827e95
...
@@ -3048,6 +3048,23 @@ static dvbpsi_descriptor_t *PMTEsFindDescriptor( const dvbpsi_pmt_es_t *p_es,
...
@@ -3048,6 +3048,23 @@ static dvbpsi_descriptor_t *PMTEsFindDescriptor( const dvbpsi_pmt_es_t *p_es,
p_dr
=
p_dr
->
p_next
;
p_dr
=
p_dr
->
p_next
;
return
p_dr
;
return
p_dr
;
}
}
static
bool
PMTEsHasRegistration
(
demux_t
*
p_demux
,
const
dvbpsi_pmt_es_t
*
p_es
,
const
char
*
psz_tag
)
{
dvbpsi_descriptor_t
*
p_dr
=
PMTEsFindDescriptor
(
p_es
,
0x05
);
if
(
!
p_dr
)
return
false
;
if
(
p_dr
->
i_length
<
4
)
{
msg_Warn
(
p_demux
,
"invalid Registration Descriptor"
);
return
false
;
}
assert
(
strlen
(
psz_tag
)
==
4
);
return
!
memcmp
(
p_dr
->
p_data
,
psz_tag
,
4
);
}
static
void
PMTSetupEsISO14496
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
static
void
PMTSetupEsISO14496
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
const
ts_prg_psi_t
*
prg
,
const
dvbpsi_pmt_es_t
*
p_es
)
const
ts_prg_psi_t
*
prg
,
const
dvbpsi_pmt_es_t
*
p_es
)
{
{
...
@@ -3464,71 +3481,40 @@ static void PMTSetupEs0xEA( demux_t *p_demux, ts_pid_t *pid,
...
@@ -3464,71 +3481,40 @@ static void PMTSetupEs0xEA( demux_t *p_demux, ts_pid_t *pid,
const
dvbpsi_pmt_es_t
*
p_es
)
const
dvbpsi_pmt_es_t
*
p_es
)
{
{
/* Registration Descriptor */
/* Registration Descriptor */
dvbpsi_descriptor_t
*
p_dr
=
PMTEsFindDescriptor
(
p_es
,
0x05
);
if
(
!
PMTEsHasRegistration
(
p_demux
,
p_es
,
"VC-1"
)
)
if
(
!
p_dr
)
{
{
msg_Err
(
p_demux
,
"Registration descriptor not found"
);
msg_Err
(
p_demux
,
"Registration descriptor not found
or invalid
"
);
return
;
return
;
}
}
if
(
p_dr
->
i_length
<
4
)
// XXX VC-1 has extended this descriptor with sub-descriptor
es_format_t
*
p_fmt
=
&
pid
->
es
->
fmt
;
{
msg_Warn
(
p_demux
,
"invalid Registration Descriptor"
);
return
;
}
if
(
!
memcmp
(
p_dr
->
p_data
,
"VC-1"
,
4
)
)
{
es_format_t
*
p_fmt
=
&
pid
->
es
->
fmt
;
/* registration descriptor for VC-1 (SMPTE rp227) */
/* registration descriptor for VC-1 (SMPTE rp227) */
p_fmt
->
i_cat
=
VIDEO_ES
;
p_fmt
->
i_cat
=
VIDEO_ES
;
p_fmt
->
i_codec
=
VLC_FOURCC
(
'W'
,
'V'
,
'C'
,
'1'
);
p_fmt
->
i_codec
=
VLC_FOURCC
(
'W'
,
'V'
,
'C'
,
'1'
);
/* XXX With Simple and Main profile the SEQUENCE
/* XXX With Simple and Main profile the SEQUENCE
* header is modified: video width and height are
* header is modified: video width and height are
* inserted just after the start code as 2 int16_t
* inserted just after the start code as 2 int16_t
* The packetizer will take care of that. */
* The packetizer will take care of that. */
}
else
{
msg_Warn
(
p_demux
,
"unknown Registration Descriptor (%4.4s)"
,
p_dr
->
p_data
);
}
}
}
static
void
PMTSetupEs0xD1
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
static
void
PMTSetupEs0xD1
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
const
dvbpsi_pmt_es_t
*
p_es
)
const
dvbpsi_pmt_es_t
*
p_es
)
{
{
/* Registration Descriptor */
/* Registration Descriptor */
dvbpsi_descriptor_t
*
p_dr
=
PMTEsFindDescriptor
(
p_es
,
0x05
);
if
(
!
PMTEsHasRegistration
(
p_demux
,
p_es
,
"drac"
)
)
if
(
!
p_dr
)
{
msg_Err
(
p_demux
,
"Registration descriptor not found"
);
return
;
}
if
(
p_dr
->
i_length
<
4
)
{
{
msg_
Warn
(
p_demux
,
"invalid Registration Descriptor
"
);
msg_
Err
(
p_demux
,
"Registration descriptor not found or invalid
"
);
return
;
return
;
}
}
if
(
!
memcmp
(
p_dr
->
p_data
,
"drac"
,
4
)
)
es_format_t
*
p_fmt
=
&
pid
->
es
->
fmt
;
{
es_format_t
*
p_fmt
=
&
pid
->
es
->
fmt
;
/* registration descriptor for Dirac
/* registration descriptor for Dirac
* (backwards compatable with VC-2 (SMPTE Sxxxx:2008)) */
* (backwards compatable with VC-2 (SMPTE Sxxxx:2008)) */
p_fmt
->
i_cat
=
VIDEO_ES
;
p_fmt
->
i_cat
=
VIDEO_ES
;
p_fmt
->
i_codec
=
VLC_FOURCC
(
'd'
,
'r'
,
'a'
,
'c'
);
p_fmt
->
i_codec
=
VLC_FOURCC
(
'd'
,
'r'
,
'a'
,
'c'
);
}
else
{
msg_Warn
(
p_demux
,
"unknown Registration Descriptor (%4.4s)"
,
p_dr
->
p_data
);
}
}
}
static
void
PMTSetupEs0xA0
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
static
void
PMTSetupEs0xA0
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
,
...
...
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