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
a1427a41
Commit
a1427a41
authored
Aug 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/dvbinfo: print receive timestamp
parent
09aa8971
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
examples/dvbinfo/dvbinfo.c
examples/dvbinfo/dvbinfo.c
+1
-1
examples/dvbinfo/libdvbpsi.c
examples/dvbinfo/libdvbpsi.c
+8
-3
examples/dvbinfo/libdvbpsi.h
examples/dvbinfo/libdvbpsi.h
+1
-1
No files found.
examples/dvbinfo/dvbinfo.c
View file @
a1427a41
...
...
@@ -255,7 +255,7 @@ static void dvbinfo_process(dvbinfo_capture_t *capture)
}
}
if
(
!
libdvbpsi_process
(
stream
,
buffer
->
p_data
,
buffer
->
i_size
))
if
(
!
libdvbpsi_process
(
stream
,
buffer
->
p_data
,
buffer
->
i_size
,
buffer
->
i_date
))
b_error
=
true
;
/* reuse buffer */
...
...
examples/dvbinfo/libdvbpsi.c
View file @
a1427a41
...
...
@@ -1364,7 +1364,7 @@ static ssize_t check_sync_word(uint8_t *buf, ssize_t length)
return
i_lost
;
}
bool
libdvbpsi_process
(
ts_stream_t
*
stream
,
uint8_t
*
buf
,
ssize_t
length
)
bool
libdvbpsi_process
(
ts_stream_t
*
stream
,
uint8_t
*
buf
,
ssize_t
length
,
mtime_t
date
)
{
mtime_t
i_prev_pcr
=
0
;
/* 33 bits */
int
i_old_cc
=
-
1
;
...
...
@@ -1377,7 +1377,8 @@ bool libdvbpsi_process(ts_stream_t *stream, uint8_t *buf, ssize_t length)
{
stream
->
i_lost_bytes
+=
i_lost
;
i
+=
i_lost
;
fprintf
(
stderr
,
"dvbinfo: Lost %"
PRId64
" bytes out of %"
PRId64
" in buffer
\n
"
,
(
int64_t
)
i_lost
,
(
int64_t
)
length
);
fprintf
(
stderr
,
"%"
PRId64
": lost %"
PRId64
" bytes out of %"
PRId64
" in buffer
\n
"
,
date
,
(
int64_t
)
i_lost
,
(
int64_t
)
length
);
if
(
i
>=
length
)
return
true
;
}
...
...
@@ -1396,7 +1397,11 @@ bool libdvbpsi_process(ts_stream_t *stream, uint8_t *buf, ssize_t length)
/* received times */
stream
->
pid
[
i_pid
].
i_prev_received
=
stream
->
pid
[
i_pid
].
i_received
;
stream
->
pid
[
i_pid
].
i_received
=
mdate
();
stream
->
pid
[
i_pid
].
i_received
=
date
;
if
(
stream
->
level
<
DVBPSI_MSG_DEBUG
)
fprintf
(
stderr
,
"%"
PRId64
" packet %"
PRId64
" pid %d (0x%x) cc %d
\n
"
,
date
,
stream
->
i_packets
,
i_pid
,
i_pid
,
i_cc
);
if
(
i_pid
==
0x0
)
/* PAT */
dvbpsi_PushPacket
(
stream
->
pat
.
handle
,
p_tmp
);
...
...
examples/dvbinfo/libdvbpsi.h
View file @
a1427a41
...
...
@@ -31,7 +31,7 @@ typedef struct ts_stream_t ts_stream_t;
/* */
ts_stream_t
*
libdvbpsi_init
(
int
debug
);
bool
libdvbpsi_process
(
ts_stream_t
*
stream
,
uint8_t
*
buf
,
ssize_t
length
);
bool
libdvbpsi_process
(
ts_stream_t
*
stream
,
uint8_t
*
buf
,
ssize_t
length
,
mtime_t
date
);
void
libdvbpsi_summary
(
ts_stream_t
*
stream
);
void
libdvbpsi_exit
(
ts_stream_t
*
stream
);
...
...
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