Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
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
libdvbpsi
Commits
c4e614ab
Commit
c4e614ab
authored
Dec 03, 2015
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/get_pcr_pid.c: use new api
parent
f7380f22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
examples/get_pcr_pid.c
examples/get_pcr_pid.c
+6
-8
No files found.
examples/get_pcr_pid.c
View file @
c4e614ab
...
@@ -42,17 +42,15 @@
...
@@ -42,17 +42,15 @@
#ifdef DVBPSI_DIST
#ifdef DVBPSI_DIST
#include "../src/dvbpsi.h"
#include "../src/dvbpsi.h"
#include "../src/descriptor.h"
#include "../src/descriptor.h"
#include "../src/
demux
.h"
#include "../src/
psi
.h"
#include "../src/tables/pat.h"
#include "../src/tables/pat.h"
#include "../src/tables/pmt.h"
#include "../src/tables/pmt.h"
#include "../src/psi.h"
#else
#else
#include <dvbpsi/dvbpsi.h>
#include <dvbpsi/dvbpsi.h>
#include <dvbpsi/descriptor.h>
#include <dvbpsi/descriptor.h>
#include <dvbpsi/
demux
.h>
#include <dvbpsi/
psi
.h>
#include <dvbpsi/pat.h>
#include <dvbpsi/pat.h>
#include <dvbpsi/pmt.h>
#include <dvbpsi/pmt.h>
#include <dvbpsi/psi.h>
#endif
#endif
/*****************************************************************************
/*****************************************************************************
...
@@ -126,7 +124,7 @@ static void PATCallback( void *_unused, dvbpsi_pat_t *p_pat )
...
@@ -126,7 +124,7 @@ static void PATCallback( void *_unused, dvbpsi_pat_t *p_pat )
p_pmt_dvbpsi_fds
[
i_nb_programs
]
=
dvbpsi_new
(
&
message
,
DVBPSI_MSG_DEBUG
);
p_pmt_dvbpsi_fds
[
i_nb_programs
]
=
dvbpsi_new
(
&
message
,
DVBPSI_MSG_DEBUG
);
if
(
p_pmt_dvbpsi_fds
[
i_nb_programs
])
if
(
p_pmt_dvbpsi_fds
[
i_nb_programs
])
{
{
if
(
dvbpsi_pmt_attach
(
p_pmt_dvbpsi_fds
[
i_nb_programs
],
if
(
dvbpsi_pmt_attach
(
p_pmt_dvbpsi_fds
[
i_nb_programs
],
0x02
,
0x0
,
p_program
->
i_number
,
PMTCallback
,
NULL
))
p_program
->
i_number
,
PMTCallback
,
NULL
))
i_nb_programs
++
;
i_nb_programs
++
;
}
}
...
@@ -206,7 +204,7 @@ int main( int i_argc, char **pp_argv )
...
@@ -206,7 +204,7 @@ int main( int i_argc, char **pp_argv )
if
(
p_pat_dvbpsi_fd
==
NULL
)
if
(
p_pat_dvbpsi_fd
==
NULL
)
goto
out
;
goto
out
;
if
(
!
dvbpsi_pat_attach
(
p_pat_dvbpsi_fd
,
PATCallback
,
NULL
))
if
(
!
dvbpsi_pat_attach
(
p_pat_dvbpsi_fd
,
0x0
,
0x0
,
PATCallback
,
NULL
))
goto
out
;
goto
out
;
p_buffer
=
malloc
(
TS_SIZE
*
READ_ONCE
);
p_buffer
=
malloc
(
TS_SIZE
*
READ_ONCE
);
...
@@ -241,7 +239,7 @@ int main( int i_argc, char **pp_argv )
...
@@ -241,7 +239,7 @@ int main( int i_argc, char **pp_argv )
{
{
if
(
p_pmt_dvbpsi_fds
[
i
])
if
(
p_pmt_dvbpsi_fds
[
i
])
{
{
dvbpsi_pmt_detach
(
p_pmt_dvbpsi_fds
[
i
]);
dvbpsi_pmt_detach
(
p_pmt_dvbpsi_fds
[
i
]
,
0x02
,
0x0
);
dvbpsi_delete
(
p_pmt_dvbpsi_fds
[
i
]);
dvbpsi_delete
(
p_pmt_dvbpsi_fds
[
i
]);
}
}
p_pmt_dvbpsi_fds
[
i
]
=
NULL
;
p_pmt_dvbpsi_fds
[
i
]
=
NULL
;
...
@@ -251,7 +249,7 @@ int main( int i_argc, char **pp_argv )
...
@@ -251,7 +249,7 @@ int main( int i_argc, char **pp_argv )
out:
out:
if
(
p_pat_dvbpsi_fd
)
if
(
p_pat_dvbpsi_fd
)
{
{
dvbpsi_pat_detach
(
p_pat_dvbpsi_fd
);
dvbpsi_pat_detach
(
p_pat_dvbpsi_fd
,
0x0
,
0x0
);
dvbpsi_delete
(
p_pat_dvbpsi_fd
);
dvbpsi_delete
(
p_pat_dvbpsi_fd
);
}
}
close
(
i_fd
);
close
(
i_fd
);
...
...
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