Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
24adef14
Commit
24adef14
authored
Mar 04, 2011
by
Kieran Kunhya
Committed by
Michael Niedermayer
May 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export more transport stream information.
with minor addition to the comment by michael
parent
fa12fb3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
avformat.h
libavformat/avformat.h
+9
-0
mpegts.c
libavformat/mpegts.c
+6
-1
No files found.
libavformat/avformat.h
View file @
24adef14
...
...
@@ -647,6 +647,9 @@ typedef struct AVProgram {
unsigned
int
*
stream_index
;
unsigned
int
nb_stream_indexes
;
AVMetadata
*
metadata
;
int
program_num
;
int
pmt_pid
;
}
AVProgram
;
#define AVFMTCTX_NOHEADER 0x0001
/**< signal that no header is present
...
...
@@ -844,6 +847,12 @@ typedef struct AVFormatContext {
* decoding: number of frames used to probe fps
*/
int
fps_probe_size
;
/**
* Transport stream id.
* This will be moved into demuxer private options. Thus no API/ABI compatibility
*/
int
ts_id
;
}
AVFormatContext
;
typedef
struct
AVPacketList
{
...
...
libavformat/mpegts.c
View file @
24adef14
...
...
@@ -1137,6 +1137,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
SectionHeader
h1
,
*
h
=
&
h1
;
const
uint8_t
*
p
,
*
p_end
;
int
sid
,
pmt_pid
;
AVProgram
*
program
;
#ifdef DEBUG
av_dlog
(
ts
->
stream
,
"PAT:
\n
"
);
...
...
@@ -1149,6 +1150,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if
(
h
->
tid
!=
PAT_TID
)
return
;
ts
->
stream
->
ts_id
=
h
->
id
;
clear_programs
(
ts
);
for
(;;)
{
sid
=
get16
(
&
p
,
p_end
);
...
...
@@ -1163,7 +1166,9 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if
(
sid
==
0x0000
)
{
/* NIT info */
}
else
{
av_new_program
(
ts
->
stream
,
sid
);
program
=
av_new_program
(
ts
->
stream
,
sid
);
program
->
program_num
=
sid
;
program
->
pmt_pid
=
pmt_pid
;
if
(
ts
->
pids
[
pmt_pid
])
mpegts_close_filter
(
ts
,
ts
->
pids
[
pmt_pid
]);
mpegts_open_section_filter
(
ts
,
pmt_pid
,
pmt_cb
,
ts
,
1
);
...
...
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