Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dvblast
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
dvblast
Commits
d34f9f8e
Commit
d34f9f8e
authored
Nov 15, 2009
by
Marian Ďurkovič
Committed by
Christophe Massiot
Nov 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ALL: Cache SDT and handle it in demux_Change.
parent
e80d2a5a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
76 deletions
+77
-76
demux.c
demux.c
+77
-74
dvblast.c
dvblast.c
+0
-1
dvblast.h
dvblast.h
+0
-1
No files found.
demux.c
View file @
d34f9f8e
...
@@ -74,6 +74,7 @@ static dvbpsi_handle p_pat_dvbpsi_handle;
...
@@ -74,6 +74,7 @@ static dvbpsi_handle p_pat_dvbpsi_handle;
static
dvbpsi_handle
p_sdt_dvbpsi_handle
;
static
dvbpsi_handle
p_sdt_dvbpsi_handle
;
static
dvbpsi_handle
p_eit_dvbpsi_handle
;
static
dvbpsi_handle
p_eit_dvbpsi_handle
;
static
dvbpsi_pat_t
*
p_current_pat
=
NULL
;
static
dvbpsi_pat_t
*
p_current_pat
=
NULL
;
static
dvbpsi_sdt_t
*
p_current_sdt
=
NULL
;
static
int
i_demux_fd
;
static
int
i_demux_fd
;
/*****************************************************************************
/*****************************************************************************
...
@@ -98,12 +99,13 @@ static void SendPAT( void );
...
@@ -98,12 +99,13 @@ static void SendPAT( void );
static
void
SendSDT
(
void
);
static
void
SendSDT
(
void
);
static
void
SendPMT
(
sid_t
*
p_sid
);
static
void
SendPMT
(
sid_t
*
p_sid
);
static
void
NewPAT
(
output_t
*
p_output
);
static
void
NewPAT
(
output_t
*
p_output
);
static
void
NewSDT
(
output_t
*
p_output
);
static
void
NewPMT
(
output_t
*
p_output
);
static
void
NewPMT
(
output_t
*
p_output
);
static
void
PATCallback
(
void
*
_unused
,
dvbpsi_pat_t
*
p_pat
);
static
void
PATCallback
(
void
*
_unused
,
dvbpsi_pat_t
*
p_pat
);
static
void
SDTCallback
(
void
*
_unused
,
dvbpsi_sdt_t
*
p_sdt
);
static
void
PMTCallback
(
void
*
_unused
,
dvbpsi_pmt_t
*
p_pmt
);
static
void
PMTCallback
(
void
*
_unused
,
dvbpsi_pmt_t
*
p_pmt
);
static
void
PSITableCallback
(
void
*
_unused
,
dvbpsi_handle
h_dvbpsi
,
static
void
PSITableCallback
(
void
*
_unused
,
dvbpsi_handle
h_dvbpsi
,
uint8_t
i_table_id
,
uint16_t
i_extension
);
uint8_t
i_table_id
,
uint16_t
i_extension
);
static
void
SDTCallback
(
void
*
_unused
,
dvbpsi_sdt_t
*
p_sdt
);
/*****************************************************************************
/*****************************************************************************
* demux_Open
* demux_Open
...
@@ -140,17 +142,6 @@ void demux_Open( void )
...
@@ -140,17 +142,6 @@ void demux_Open( void )
}
}
}
}
/*****************************************************************************
* demux_Hup
*****************************************************************************/
void
demux_Hup
(
void
)
{
if
(
b_enable_epg
)
{
p_sdt_dvbpsi_handle
->
b_discontinuity
=
1
;
}
}
/*****************************************************************************
/*****************************************************************************
* demux_Run
* demux_Run
*****************************************************************************/
*****************************************************************************/
...
@@ -404,6 +395,7 @@ void demux_Change( output_t *p_output, uint16_t i_sid,
...
@@ -404,6 +395,7 @@ void demux_Change( output_t *p_output, uint16_t i_sid,
if
(
i_sid
!=
i_old_sid
)
if
(
i_sid
!=
i_old_sid
)
{
{
NewSDT
(
p_output
);
NewPAT
(
p_output
);
NewPAT
(
p_output
);
NewPMT
(
p_output
);
NewPMT
(
p_output
);
}
}
...
@@ -827,6 +819,65 @@ static void NewPAT( output_t *p_output )
...
@@ -827,6 +819,65 @@ static void NewPAT( output_t *p_output )
dvbpsi_EmptyPAT
(
&
pat
);
dvbpsi_EmptyPAT
(
&
pat
);
}
}
/*****************************************************************************
* NewSDT
*****************************************************************************/
static
void
NewSDT
(
output_t
*
p_output
)
{
dvbpsi_sdt_t
sdt
;
dvbpsi_sdt_service_t
*
p_service
,
*
p_new_service
;
dvbpsi_descriptor_t
*
p_descriptor
;
if
(
p_output
->
p_sdt_section
!=
NULL
)
dvbpsi_DeletePSISections
(
p_output
->
p_sdt_section
);
p_output
->
p_sdt_section
=
NULL
;
if
(
!
p_output
->
i_sid
)
return
;
if
(
p_current_sdt
==
NULL
)
return
;
for
(
p_service
=
p_current_sdt
->
p_first_service
;
p_service
!=
NULL
;
p_service
=
p_service
->
p_next
)
if
(
p_service
->
i_service_id
==
p_output
->
i_sid
)
break
;
if
(
p_service
==
NULL
)
{
if
(
p_output
->
p_pat_section
!=
NULL
&&
p_output
->
p_pat_section
->
i_length
==
9
)
{
dvbpsi_DeletePSISections
(
p_output
->
p_pat_section
);
p_output
->
p_pat_section
=
NULL
;
p_output
->
i_pat_version
++
;
}
return
;
}
if
(
b_unique_tsid
)
dvbpsi_InitSDT
(
&
sdt
,
p_output
->
i_ts_id
,
p_current_sdt
->
i_version
,
p_current_sdt
->
b_current_next
,
p_current_sdt
->
i_network_id
);
else
dvbpsi_InitSDT
(
&
sdt
,
p_current_sdt
->
i_ts_id
,
p_current_sdt
->
i_version
,
p_current_sdt
->
b_current_next
,
p_current_sdt
->
i_network_id
);
p_new_service
=
dvbpsi_SDTAddService
(
&
sdt
,
p_service
->
i_service_id
,
p_service
->
b_eit_schedule
,
p_service
->
b_eit_present
,
p_service
->
i_running_status
,
0
);
for
(
p_descriptor
=
p_service
->
p_first_descriptor
;
p_descriptor
!=
NULL
;
p_descriptor
=
p_descriptor
->
p_next
)
dvbpsi_SDTServiceAddDescriptor
(
p_new_service
,
p_descriptor
->
i_tag
,
p_descriptor
->
i_length
,
p_descriptor
->
p_data
);
p_output
->
p_sdt_section
=
dvbpsi_GenSDTSections
(
&
sdt
);
dvbpsi_EmptySDT
(
&
sdt
);
}
/*****************************************************************************
/*****************************************************************************
* NewPMT
* NewPMT
*****************************************************************************/
*****************************************************************************/
...
@@ -1294,75 +1345,27 @@ static void PSITableCallback( void *_unused, dvbpsi_handle h_dvbpsi,
...
@@ -1294,75 +1345,27 @@ static void PSITableCallback( void *_unused, dvbpsi_handle h_dvbpsi,
static
void
SDTCallback
(
void
*
_unused
,
dvbpsi_sdt_t
*
p_sdt
)
static
void
SDTCallback
(
void
*
_unused
,
dvbpsi_sdt_t
*
p_sdt
)
{
{
dvbpsi_sdt_t
*
p_old_sdt
=
p_current_sdt
;
int
i
;
int
i
;
dvbpsi_sdt_service_t
*
p_service
;
if
(
p_current_sdt
!=
NULL
&&
dvbpsi_descriptor_t
*
p_descriptor
;
(
!
p_sdt
->
b_current_next
||
p_sdt
->
i_version
==
p_current_sdt
->
i_version
)
)
dvbpsi_sdt_t
*
p_new_sdt
=
NULL
;
dvbpsi_sdt_service_t
*
p_new_service
;
msg_Dbg
(
NULL
,
"new SDT, version %d"
,
p_sdt
->
i_version
);
for
(
i
=
0
;
i
<
i_nb_outputs
;
i
++
)
{
if
(
!
pp_outputs
[
i
]
->
i_maddr
||
!
pp_outputs
[
i
]
->
i_sid
)
continue
;
if
(
pp_outputs
[
i
]
->
p_sdt_section
)
{
{
dvbpsi_DeletePSISections
(
pp_outputs
[
i
]
->
p_sdt_section
);
dvbpsi_DeleteSDT
(
p_sdt
);
pp_outputs
[
i
]
->
p_sdt_section
=
NULL
;
return
;
}
}
for
(
p_service
=
p_sdt
->
p_first_service
;
p_service
!=
NULL
;
msg_Dbg
(
NULL
,
"new SDT, version %d"
,
p_sdt
->
i_version
);
p_service
=
p_service
->
p_next
)
{
if
(
pp_outputs
[
i
]
->
i_sid
==
p_service
->
i_service_id
)
{
p_new_sdt
=
malloc
(
sizeof
(
dvbpsi_sdt_t
));
if
(
b_unique_tsid
)
dvbpsi_InitSDT
(
p_new_sdt
,
pp_outputs
[
i
]
->
i_ts_id
,
p_sdt
->
i_version
,
p_sdt
->
b_current_next
,
p_sdt
->
i_network_id
);
else
dvbpsi_InitSDT
(
p_new_sdt
,
p_sdt
->
i_ts_id
,
p_sdt
->
i_version
,
p_sdt
->
b_current_next
,
p_sdt
->
i_network_id
);
p_new_service
=
dvbpsi_SDTAddService
(
p_new_sdt
,
p_service
->
i_service_id
,
p_service
->
b_eit_schedule
,
p_service
->
b_eit_present
,
p_service
->
i_running_status
,
0
);
p_descriptor
=
p_service
->
p_first_descriptor
;
while
(
p_descriptor
!=
NULL
)
{
dvbpsi_SDTServiceAddDescriptor
(
p_new_service
,
p_descriptor
->
i_tag
,
p_descriptor
->
i_length
,
p_descriptor
->
p_data
);
p_descriptor
=
p_descriptor
->
p_next
;
}
pp_outputs
[
i
]
->
p_sdt_section
p_current_sdt
=
p_sdt
;
=
dvbpsi_GenSDTSections
(
p_new_sdt
);
dvbpsi_DeleteSDT
(
p_new_sdt
);
for
(
i
=
0
;
i
<
i_nb_outputs
;
i
++
)
break
;
}
}
if
(
p_service
==
NULL
)
{
if
(
pp_outputs
[
i
]
->
p_pat_section
!=
NULL
&&
pp_outputs
[
i
]
->
p_pat_section
->
i_length
==
9
)
{
{
dvbpsi_DeletePSISections
(
pp_outputs
[
i
]
->
p_pat_section
);
if
(
pp_outputs
[
i
]
->
i_maddr
)
pp_outputs
[
i
]
->
p_pat_section
=
NULL
;
NewSDT
(
pp_outputs
[
i
]
);
pp_outputs
[
i
]
->
i_pat_version
++
;
}
}
}
}
dvbpsi_DeleteSDT
(
p_sdt
);
if
(
p_old_sdt
!=
NULL
)
dvbpsi_DeleteSDT
(
p_old_sdt
);
}
}
dvblast.c
View file @
d34f9f8e
...
@@ -394,7 +394,6 @@ int main( int i_argc, char **pp_argv )
...
@@ -394,7 +394,6 @@ int main( int i_argc, char **pp_argv )
b_hup_received
=
0
;
b_hup_received
=
0
;
msg_Warn
(
NULL
,
"HUP received, reloading"
);
msg_Warn
(
NULL
,
"HUP received, reloading"
);
ReadConfiguration
(
psz_conf_file
);
ReadConfiguration
(
psz_conf_file
);
demux_Hup
();
}
}
demux_Run
();
demux_Run
();
...
...
dvblast.h
View file @
d34f9f8e
...
@@ -123,7 +123,6 @@ uint8_t dvb_FrontendStatus( uint8_t *p_answer, ssize_t *pi_size );
...
@@ -123,7 +123,6 @@ uint8_t dvb_FrontendStatus( uint8_t *p_answer, ssize_t *pi_size );
void
demux_Open
(
void
);
void
demux_Open
(
void
);
void
demux_Run
(
void
);
void
demux_Run
(
void
);
void
demux_Hup
(
void
);
void
demux_Change
(
output_t
*
p_output
,
uint16_t
i_sid
,
void
demux_Change
(
output_t
*
p_output
,
uint16_t
i_sid
,
uint16_t
*
pi_pids
,
int
i_nb_pids
);
uint16_t
*
pi_pids
,
int
i_nb_pids
);
void
demux_ResendCAPMTs
(
void
);
void
demux_ResendCAPMTs
(
void
);
...
...
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