Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
da6ecee0
Commit
da6ecee0
authored
May 11, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ts.c: this time it should work (create one dvbpsi handle per pmt).
parent
ad5da144
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
23 deletions
+34
-23
modules/demux/ts.c
modules/demux/ts.c
+34
-23
No files found.
modules/demux/ts.c
View file @
da6ecee0
...
...
@@ -161,6 +161,8 @@ typedef struct
typedef
struct
{
dvbpsi_handle
handle
;
int
i_version
;
int
i_number
;
int
i_pid_pcr
;
...
...
@@ -170,10 +172,8 @@ typedef struct
typedef
struct
{
/* Common PSI handle */
dvbpsi_handle
handle
;
/* for special PAT case */
dvbpsi_handle
handle
;
int
i_pat_version
;
/* For PMT */
...
...
@@ -404,7 +404,7 @@ static int Open( vlc_object_t *p_this )
msg_Dbg
(
p_demux
,
"extra pmt specified (pid=0x%x)"
,
i_pid
);
PIDInit
(
pmt
,
VLC_TRUE
,
NULL
);
/* FIXME we should also ask for a number */
pmt
->
psi
->
handle
=
pmt
->
psi
->
prg
[
0
]
->
handle
=
dvbpsi_AttachPMT
(
1
,
(
dvbpsi_pmt_callback
)
PMTCallBack
,
p_demux
);
pmt
->
psi
->
prg
[
0
]
->
i_number
=
0
;
/* special one */
...
...
@@ -632,7 +632,18 @@ static int Demux( demux_t *p_demux )
{
if
(
p_pid
->
psi
)
{
dvbpsi_PushPacket
(
p_pid
->
psi
->
handle
,
p_pkt
->
p_buffer
);
if
(
p_pid
->
i_pid
==
0
)
{
dvbpsi_PushPacket
(
p_pid
->
psi
->
handle
,
p_pkt
->
p_buffer
);
}
else
{
int
i_prg
;
for
(
i_prg
=
0
;
i_prg
<
p_pid
->
psi
->
i_prg
;
i_prg
++
)
{
dvbpsi_PushPacket
(
p_pid
->
psi
->
prg
[
i_prg
]
->
handle
,
p_pkt
->
p_buffer
);
}
}
block_Release
(
p_pkt
);
}
else
if
(
!
p_sys
->
b_udp_out
)
...
...
@@ -755,7 +766,7 @@ static void PIDInit( ts_pid_t *pid, vlc_bool_t b_psi, ts_psi_t *p_owner )
pid
->
psi
=
malloc
(
sizeof
(
ts_psi_t
)
);
pid
->
psi
->
i_prg
=
0
;
pid
->
psi
->
prg
=
NULL
;
pid
->
psi
->
handle
=
NULL
;
pid
->
psi
->
handle
=
NULL
;
}
pid
->
psi
->
i_pat_version
=
-
1
;
if
(
p_owner
)
...
...
@@ -766,6 +777,7 @@ static void PIDInit( ts_pid_t *pid, vlc_bool_t b_psi, ts_psi_t *p_owner )
prg
->
i_number
=
-
1
;
prg
->
i_pid_pcr
=
-
1
;
prg
->
iod
=
NULL
;
prg
->
handle
=
NULL
;
TAB_APPEND
(
pid
->
psi
->
i_prg
,
pid
->
psi
->
prg
,
prg
);
}
...
...
@@ -792,6 +804,7 @@ static void PIDClean( es_out_t *out, ts_pid_t *pid )
for
(
i
=
0
;
i
<
pid
->
psi
->
i_prg
;
i
++
)
{
if
(
pid
->
psi
->
prg
[
i
]
->
iod
)
IODFree
(
pid
->
psi
->
prg
[
i
]
->
iod
);
if
(
pid
->
psi
->
prg
[
i
]
->
handle
)
dvbpsi_DetachPMT
(
pid
->
psi
->
prg
[
i
]
->
handle
);
free
(
pid
->
psi
->
prg
[
i
]
);
}
if
(
pid
->
psi
->
prg
)
free
(
pid
->
psi
->
prg
);
...
...
@@ -2043,20 +2056,10 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
if
(
p_program
->
i_number
!=
0
)
{
ts_pid_t
*
pmt
=
&
p_sys
->
pid
[
p_program
->
i_pid
];
vlc_bool_t
b_add
=
VLC_TRUE
;
if
(
!
pmt
->
b_valid
)
if
(
pmt
->
b_valid
)
{
PIDInit
(
pmt
,
VLC_TRUE
,
pat
->
psi
);
pmt
->
psi
->
handle
=
dvbpsi_AttachPMT
(
p_program
->
i_number
,
(
dvbpsi_pmt_callback
)
PMTCallBack
,
p_demux
);
pmt
->
psi
->
prg
[
0
]
->
i_number
=
p_program
->
i_number
;
TAB_APPEND
(
p_sys
->
i_pmt
,
p_sys
->
pmt
,
pmt
);
}
else
{
vlc_bool_t
b_add
=
VLC_TRUE
;
int
i_prg
;
for
(
i_prg
=
0
;
i_prg
<
pmt
->
psi
->
i_prg
;
i_prg
++
)
{
...
...
@@ -2066,11 +2069,19 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
break
;
}
}
if
(
b_add
)
{
PIDInit
(
pmt
,
VLC_TRUE
,
pat
->
psi
);
pmt
->
psi
->
prg
[
pmt
->
psi
->
i_prg
-
1
]
->
i_number
=
p_program
->
i_number
;
}
}
else
{
TAB_APPEND
(
p_sys
->
i_pmt
,
p_sys
->
pmt
,
pmt
);
}
if
(
b_add
)
{
PIDInit
(
pmt
,
VLC_TRUE
,
pat
->
psi
);
pmt
->
psi
->
prg
[
pmt
->
psi
->
i_prg
-
1
]
->
handle
=
dvbpsi_AttachPMT
(
p_program
->
i_number
,
(
dvbpsi_pmt_callback
)
PMTCallBack
,
p_demux
);
pmt
->
psi
->
prg
[
pmt
->
psi
->
i_prg
-
1
]
->
i_number
=
p_program
->
i_number
;
}
}
}
...
...
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