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
bd304fa5
Commit
bd304fa5
authored
Feb 25, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed --ts-extra-pmt (close #516)
Added
VC-1
detection (SMPTE RP 227)
parent
781ce1f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
7 deletions
+51
-7
modules/demux/ts.c
modules/demux/ts.c
+51
-7
No files found.
modules/demux/ts.c
View file @
bd304fa5
...
...
@@ -695,16 +695,19 @@ static int Open( vlc_object_t *p_this )
if
(
i_pid
>=
2
&&
i_pid
<
8192
)
{
ts_pid_t
*
pmt
=
&
p_sys
->
pid
[
i_pid
];
ts_prg_psi_t
*
prg
;
msg_Dbg
(
p_demux
,
"extra pmt specified (pid=%d)"
,
i_pid
);
PIDInit
(
pmt
,
VLC_TRUE
,
NULL
);
pmt
->
psi
->
i_prg
=
1
;
pmt
->
psi
->
prg
=
malloc
(
sizeof
(
ts_prg_psi_t
)
);
/* FIXME we should also ask for a number */
pmt
->
psi
->
prg
[
0
]
->
handle
=
dvbpsi_AttachPMT
(
1
,
(
dvbpsi_pmt_callback
)
PMTCallBack
,
p_demux
);
pmt
->
psi
->
prg
[
0
]
->
i_number
=
0
;
/* special one */
/* Dummy PMT */
prg
=
malloc
(
sizeof
(
ts_prg_psi_t
)
);
memset
(
prg
,
0
,
sizeof
(
ts_prg_psi_t
)
);
prg
->
i_pid_pcr
=
-
1
;
prg
->
i_pid_pmt
=
-
1
;
prg
->
i_number
=
0
;
/* special */
prg
->
handle
=
dvbpsi_AttachPMT
(
1
,
(
dvbpsi_pmt_callback
)
PMTCallBack
,
p_demux
);
TAB_APPEND
(
pmt
->
psi
->
i_prg
,
pmt
->
psi
->
prg
,
prg
);
psz
=
strchr
(
psz
,
'='
)
+
1
;
/* can't failed */
while
(
psz
&&
*
psz
)
...
...
@@ -1933,6 +1936,7 @@ static int PIDFillFormat( ts_pid_t *pid, int i_stream_type )
case
0x06
:
/* PES_PRIVATE (fixed later) */
case
0x12
:
/* MPEG-4 generic (sub/scene/...) (fixed later) */
case
0xEA
:
/* Privately managed ES (VC-1) (fixed later */
default:
es_format_Init
(
fmt
,
UNKNOWN_ES
,
0
);
break
;
...
...
@@ -3225,6 +3229,46 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
}
}
}
else
if
(
p_es
->
i_type
==
0xEA
)
{
dvbpsi_descriptor_t
*
p_dr
;
for
(
p_dr
=
p_es
->
p_first_descriptor
;
p_dr
!=
NULL
;
p_dr
=
p_dr
->
p_next
)
{
msg_Dbg
(
p_demux
,
" * es pid=%d type=%d dr->i_tag=0x%x"
,
p_es
->
i_pid
,
p_es
->
i_type
,
p_dr
->
i_tag
);
if
(
p_dr
->
i_tag
==
0x05
)
{
/* Registration Descriptor */
if
(
p_dr
->
i_length
<
4
)
// XXX VC-1 has extended this descriptor with sub-descriptor
{
msg_Warn
(
p_demux
,
"invalid Registration Descriptor"
);
}
else
{
if
(
!
memcmp
(
p_dr
->
p_data
,
"VC-1"
,
4
)
)
{
/* registration descriptor for VC-1 (SMPTE rp227) */
pid
->
es
->
fmt
.
i_cat
=
VIDEO_ES
;
pid
->
es
->
fmt
.
i_codec
=
VLC_FOURCC
(
'W'
,
'V'
,
'C'
,
'1'
);
/* XXX With Simple and Main profile the SEQUENCE
* header is modified: video width and height are
* inserted just after the start code as 2 int16_t
* The packetizer will take care of that. */
}
else
{
msg_Warn
(
p_demux
,
"unknown Registration Descriptor (%4.4s)"
,
p_dr
->
p_data
);
}
}
}
}
}
else
if
(
p_es
->
i_type
==
0xa0
)
{
/* MSCODEC sent by vlc */
...
...
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