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
91fb2fdd
Commit
91fb2fdd
authored
May 06, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/mpeg/ts.c: fixed my last f*ckage + a bit of clean-up.
parent
9adb4abd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
162 additions
and
164 deletions
+162
-164
modules/demux/mpeg/ts.c
modules/demux/mpeg/ts.c
+162
-164
No files found.
modules/demux/mpeg/ts.c
View file @
91fb2fdd
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* mpeg_ts.c : Transport Stream input module for vlc
* mpeg_ts.c : Transport Stream input module for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* Copyright (C) 2000-2001 VideoLAN
* $Id: ts.c,v 1.2
2 2003/05/05 22:48:22
gbazin Exp $
* $Id: ts.c,v 1.2
3 2003/05/06 21:01:58
gbazin Exp $
*
*
* Authors: Henri Fallon <henri@via.ecp.fr>
* Authors: Henri Fallon <henri@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr>
...
@@ -1273,8 +1273,9 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
...
@@ -1273,8 +1273,9 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
p_pgrm_demux
=
(
pgrm_ts_data_t
*
)
p_pgrm
->
p_demux_data
;
p_pgrm_demux
=
(
pgrm_ts_data_t
*
)
p_pgrm
->
p_demux_data
;
p_pgrm_demux
->
i_pcr_pid
=
p_new_pmt
->
i_pcr_pid
;
p_pgrm_demux
->
i_pcr_pid
=
p_new_pmt
->
i_pcr_pid
;
if
(
(
p_new_pmt
->
b_current_next
&&
(
p_new_pmt
->
i_version
!=
p_pgrm_demux
->
i_pmt_version
)
)
||
if
(
(
p_new_pmt
->
b_current_next
&&
p_pgrm_demux
->
i_pmt_version
==
PMT_UNINITIALIZED
)
(
p_new_pmt
->
i_version
!=
p_pgrm_demux
->
i_pmt_version
)
)
||
p_pgrm_demux
->
i_pmt_version
==
PMT_UNINITIALIZED
)
{
{
dvbpsi_descriptor_t
*
p_dr
=
p_new_pmt
->
p_first_descriptor
;
dvbpsi_descriptor_t
*
p_dr
=
p_new_pmt
->
p_first_descriptor
;
/* IOD */
/* IOD */
...
@@ -1289,7 +1290,15 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
...
@@ -1289,7 +1290,15 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
p_es
=
p_new_pmt
->
p_first_es
;
p_es
=
p_new_pmt
->
p_first_es
;
while
(
p_es
)
while
(
p_es
)
{
{
int
i_fourcc
,
i_cat
,
i_stream_id
;
vlc_fourcc_t
i_fourcc
;
int
i_size
,
i_cat
,
i_stream_id
=
0
;
es_ts_data_t
demux_data
;
BITMAPINFOHEADER
*
p_bih
=
NULL
;
WAVEFORMATEX
*
p_wf
=
NULL
;
char
psz_desc
[
30
];
memset
(
&
demux_data
,
0
,
sizeof
(
es_ts_data_t
)
);
*
psz_desc
=
0
;
switch
(
p_es
->
i_type
)
switch
(
p_es
->
i_type
)
{
{
...
@@ -1372,168 +1381,144 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
...
@@ -1372,168 +1381,144 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
i_stream_id
=
0
;
i_stream_id
=
0
;
}
}
/* Add this ES */
if
(
p_es
->
i_type
==
MPEG4_VIDEO_ES
||
p_new_es
=
input_AddES
(
p_input
,
p_pgrm
,
(
u16
)
p_es
->
i_pid
,
p_es
->
i_type
==
MPEG4_AUDIO_ES
)
i_cat
,
NULL
,
sizeof
(
es_ts_data_t
)
);
if
(
p_new_es
==
NULL
)
{
msg_Err
(
p_input
,
"could not add ES %d"
,
p_es
->
i_pid
);
p_input
->
b_error
=
1
;
return
;
}
p_new_es
->
i_fourcc
=
i_fourcc
;
p_new_es
->
i_stream_id
=
i_stream_id
;
((
es_ts_data_t
*
)
p_new_es
->
p_demux_data
)
->
i_continuity_counter
=
0xFF
;
if
(
p_es
->
i_type
==
MPEG4_VIDEO_ES
||
p_es
->
i_type
==
MPEG4_AUDIO_ES
)
{
{
/* mpeg4 stream, search sl_descriptor */
/* mpeg4 stream, search sl_descriptor */
dvbpsi_descriptor_t
*
p_dr
=
p_es
->
p_first_descriptor
;
dvbpsi_descriptor_t
*
p_dr
=
p_es
->
p_first_descriptor
;
es_ts_data_t
*
p_es_demux
=
(
es_ts_data_t
*
)
p_new_es
->
p_demux_data
;
while
(
p_dr
&&
(
p_dr
->
i_tag
!=
0x1f
)
)
while
(
p_dr
&&
(
p_dr
->
i_tag
!=
0x1f
)
)
p_dr
=
p_dr
->
p_next
;
p_dr
=
p_dr
->
p_next
;
if
(
p_dr
&&
p_dr
->
i_length
==
2
)
if
(
p_dr
&&
p_dr
->
i_length
==
2
)
{
{
int
i_es_descr_index
;
int
i_es_descr_index
;
p_es_demux
->
i_es_id
=
demux_data
.
i_es_id
=
(
p_dr
->
p_data
[
0
]
<<
8
)
|
p_dr
->
p_data
[
1
];
(
p_dr
->
p_data
[
0
]
<<
8
)
|
p_dr
->
p_data
[
1
];
p_es_demux
->
p_es_descr
=
NULL
;
demux_data
.
p_es_descr
=
NULL
;
msg_Warn
(
p_input
,
"found SL_descriptor"
);
msg_Warn
(
p_input
,
"found SL_descriptor"
);
for
(
i_es_descr_index
=
0
;
i_es_descr_index
<
255
;
i_es_descr_index
++
)
for
(
i_es_descr_index
=
0
;
i_es_descr_index
<
255
;
i_es_descr_index
++
)
{
{
if
(
p_pgrm_demux
->
iod
.
es_descr
[
i_es_descr_index
].
b_ok
&&
if
(
p_pgrm_demux
->
iod
.
es_descr
[
i_es_descr_index
].
b_ok
&&
p_pgrm_demux
->
iod
.
es_descr
[
i_es_descr_index
].
i_es_id
==
p_es_demux
->
i_es_id
)
p_pgrm_demux
->
iod
.
es_descr
[
i_es_descr_index
].
i_es_id
==
demux_data
.
i_es_id
)
{
{
p_es_demux
->
p_es_descr
=
&
p_pgrm_demux
->
iod
.
es_descr
[
i_es_descr_index
];
demux_data
.
p_es_descr
=
&
p_pgrm_demux
->
iod
.
es_descr
[
i_es_descr_index
];
break
;
break
;
}
}
}
}
}
}
if
(
p_es_demux
->
p_es_descr
!=
NULL
)
if
(
demux_data
.
p_es_descr
!=
NULL
)
{
{
vlc_fourcc_t
i_fourcc
;
#define DESCR demux_data.p_es_descr->dec_descr
int
i_cat
;
demux_data
.
b_mpeg4
=
1
;
p_es_demux
->
b_mpeg4
=
1
;
/* fix fourcc */
/* fix fourcc */
switch
(
p_es_demux
->
p_es_descr
->
dec_descr
.
i_streamType
)
switch
(
DESCR
.
i_streamType
)
{
{
case
0x04
:
/* VisualStream */
case
0x04
:
/* VisualStream */
i_cat
=
VIDEO_ES
;
i_cat
=
VIDEO_ES
;
switch
(
p_es_demux
->
p_es_descr
->
dec_descr
.
i_objectTypeIndication
)
switch
(
DESCR
.
i_objectTypeIndication
)
{
{
case
0x20
:
case
0x20
:
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'v'
);
// mpeg4
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'v'
);
// mpeg4
break
;
case
0x60
:
case
0x61
:
case
0x62
:
case
0x63
:
case
0x64
:
case
0x65
:
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'v'
);
// mpeg2
break
;
case
0x6a
:
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'v'
);
// mpeg1
break
;
case
0x6c
:
i_fourcc
=
VLC_FOURCC
(
'j'
,
'p'
,
'e'
,
'g'
);
// mpeg1
break
;
default:
i_fourcc
=
0
;
break
;
}
break
;
break
;
case
0x05
:
/* AudioStream */
case
0x60
:
i_cat
=
AUDIO_ES
;
case
0x61
:
switch
(
p_es_demux
->
p_es_descr
->
dec_descr
.
i_objectTypeIndication
)
case
0x62
:
{
case
0x63
:
case
0x40
:
case
0x64
:
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
);
// mpeg4
case
0x65
:
break
;
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'v'
);
// mpeg2
case
0x66
:
break
;
case
0x67
:
case
0x6a
:
case
0x68
:
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'v'
);
// mpeg1
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
);
// mpeg2 aac
break
;
break
;
case
0x6c
:
case
0x69
:
i_fourcc
=
VLC_FOURCC
(
'j'
,
'p'
,
'e'
,
'g'
);
// mpeg1
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'a'
);
// mpeg2
break
;
case
0x6b
:
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'a'
);
// mpeg1
break
;
default:
i_fourcc
=
0
;
break
;
}
break
;
break
;
default:
default:
i_cat
=
UNKNOWN_ES
;
i_fourcc
=
0
;
i_fourcc
=
0
;
break
;
break
;
}
}
break
;
p_new_es
->
i_fourcc
=
i_fourcc
;
case
0x05
:
/* AudioStream */
p_new_es
->
i_cat
=
i_cat
;
i_cat
=
AUDIO_ES
;
switch
(
i_cat
)
switch
(
DESCR
.
i_objectTypeIndication
)
{
{
case
VIDEO_ES
:
case
0x40
:
{
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
);
// mpeg4
int
i_size
;
BITMAPINFOHEADER
*
p_bih
;
i_size
=
sizeof
(
BITMAPINFOHEADER
)
+
p_es_demux
->
p_es_descr
->
dec_descr
.
i_decoder_specific_info_len
;
p_new_es
->
p_bitmapinfoheader
=
(
void
*
)
p_bih
=
malloc
(
i_size
);
p_bih
->
biSize
=
i_size
;
p_bih
->
biWidth
=
0
;
p_bih
->
biHeight
=
0
;
p_bih
->
biPlanes
=
1
;
p_bih
->
biBitCount
=
0
;
p_bih
->
biCompression
=
0
;
p_bih
->
biSizeImage
=
0
;
p_bih
->
biXPelsPerMeter
=
0
;
p_bih
->
biYPelsPerMeter
=
0
;
p_bih
->
biClrUsed
=
0
;
p_bih
->
biClrImportant
=
0
;
memcpy
(
&
p_bih
[
1
],
p_es_demux
->
p_es_descr
->
dec_descr
.
p_decoder_specific_info
,
p_es_demux
->
p_es_descr
->
dec_descr
.
i_decoder_specific_info_len
);
}
break
;
break
;
case
AUDIO_ES
:
case
0x66
:
{
case
0x67
:
int
i_size
;
case
0x68
:
WAVEFORMATEX
*
p_wf
;
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
);
// mpeg2 aac
break
;
i_size
=
sizeof
(
WAVEFORMATEX
)
+
case
0x69
:
p_es_demux
->
p_es_descr
->
dec_descr
.
i_decoder_specific_info_len
;
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'a'
);
// mpeg2
p_new_es
->
p_waveformatex
=
(
void
*
)
p_wf
=
malloc
(
i_size
);
break
;
p_wf
->
wFormatTag
=
0xffff
;
case
0x6b
:
p_wf
->
nChannels
=
0
;
i_fourcc
=
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'a'
);
// mpeg1
p_wf
->
nSamplesPerSec
=
0
;
p_wf
->
nAvgBytesPerSec
=
0
;
p_wf
->
nBlockAlign
=
1
;
p_wf
->
wBitsPerSample
=
0
;
p_wf
->
cbSize
=
p_es_demux
->
p_es_descr
->
dec_descr
.
i_decoder_specific_info_len
;
memcpy
(
&
p_wf
[
1
],
p_es_demux
->
p_es_descr
->
dec_descr
.
p_decoder_specific_info
,
p_es_demux
->
p_es_descr
->
dec_descr
.
i_decoder_specific_info_len
);
}
break
;
break
;
default:
default:
i_fourcc
=
0
;
break
;
break
;
}
break
;
default:
i_cat
=
UNKNOWN_ES
;
i_fourcc
=
0
;
break
;
}
switch
(
i_cat
)
{
case
VIDEO_ES
:
i_size
=
sizeof
(
BITMAPINFOHEADER
)
+
DESCR
.
i_decoder_specific_info_len
;
p_bih
=
malloc
(
i_size
);
p_bih
->
biSize
=
i_size
;
p_bih
->
biWidth
=
0
;
p_bih
->
biHeight
=
0
;
p_bih
->
biPlanes
=
1
;
p_bih
->
biBitCount
=
0
;
p_bih
->
biCompression
=
0
;
p_bih
->
biSizeImage
=
0
;
p_bih
->
biXPelsPerMeter
=
0
;
p_bih
->
biYPelsPerMeter
=
0
;
p_bih
->
biClrUsed
=
0
;
p_bih
->
biClrImportant
=
0
;
memcpy
(
&
p_bih
[
1
],
DESCR
.
p_decoder_specific_info
,
DESCR
.
i_decoder_specific_info_len
);
break
;
case
AUDIO_ES
:
i_size
=
sizeof
(
WAVEFORMATEX
)
+
DESCR
.
i_decoder_specific_info_len
;
p_wf
=
malloc
(
i_size
);
p_wf
->
wFormatTag
=
0xffff
;
p_wf
->
nChannels
=
0
;
p_wf
->
nSamplesPerSec
=
0
;
p_wf
->
nAvgBytesPerSec
=
0
;
p_wf
->
nBlockAlign
=
1
;
p_wf
->
wBitsPerSample
=
0
;
p_wf
->
cbSize
=
DESCR
.
i_decoder_specific_info_len
;
memcpy
(
&
p_wf
[
1
],
DESCR
.
p_decoder_specific_info
,
DESCR
.
i_decoder_specific_info_len
);
break
;
default:
break
;
}
}
}
}
else
else
{
{
msg_Warn
(
p_input
,
"mpeg4 stream without (valid) sl_descriptor"
);
msg_Warn
(
p_input
,
p_es_demux
->
b_mpeg4
=
0
;
"mpeg4 stream without (valid) sl_descriptor"
);
demux_data
.
b_mpeg4
=
0
;
}
}
}
}
...
@@ -1541,24 +1526,20 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
...
@@ -1541,24 +1526,20 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
{
{
/* crapy ms codec stream, search private descriptor */
/* crapy ms codec stream, search private descriptor */
dvbpsi_descriptor_t
*
p_dr
=
p_es
->
p_first_descriptor
;
dvbpsi_descriptor_t
*
p_dr
=
p_es
->
p_first_descriptor
;
es_ts_data_t
*
p_es_demux
=
(
es_ts_data_t
*
)
p_new_es
->
p_demux_data
;
while
(
p_dr
&&
(
p_dr
->
i_tag
!=
0xa0
)
)
while
(
p_dr
&&
(
p_dr
->
i_tag
!=
0xa0
)
)
p_dr
=
p_dr
->
p_next
;
p_dr
=
p_dr
->
p_next
;
if
(
p_dr
&&
p_dr
->
i_length
>=
8
)
if
(
p_dr
&&
p_dr
->
i_length
>=
8
)
{
{
int
i_size
;
int
i_bih_size
;
int
i_bih_size
;
BITMAPINFOHEADER
*
p_bih
;
i_fourcc
=
(
p_dr
->
p_data
[
0
]
<<
24
)
|
(
p_dr
->
p_data
[
1
]
<<
16
)
|
(
p_dr
->
p_data
[
2
]
<<
8
)
|
p_dr
->
p_data
[
3
];
p_new_es
->
i_fourcc
=
(
p_dr
->
p_data
[
0
]
<<
24
)
|
(
p_dr
->
p_data
[
1
]
<<
16
)
|
i_bih_size
=
(
p_dr
->
p_data
[
8
]
<<
8
)
|
p_dr
->
p_data
[
9
];
(
p_dr
->
p_data
[
2
]
<<
8
)
|
(
p_dr
->
p_data
[
3
]
);
i_bih_size
=
(
(
p_dr
->
p_data
[
8
]
<<
8
)
|
(
p_dr
->
p_data
[
9
]
)
);
i_size
=
sizeof
(
BITMAPINFOHEADER
)
+
i_bih_size
;
i_size
=
sizeof
(
BITMAPINFOHEADER
)
+
i_bih_size
;
p_
new_es
->
p_bitmapinfoheader
=
(
void
*
)
p_
bih
=
malloc
(
i_size
);
p_bih
=
malloc
(
i_size
);
p_bih
->
biSize
=
i_size
;
p_bih
->
biSize
=
i_size
;
p_bih
->
biWidth
=
(
p_dr
->
p_data
[
4
]
<<
8
)
|
p_dr
->
p_data
[
5
];
p_bih
->
biWidth
=
(
p_dr
->
p_data
[
4
]
<<
8
)
|
p_dr
->
p_data
[
5
];
p_bih
->
biHeight
=
(
p_dr
->
p_data
[
6
]
<<
8
)
|
p_dr
->
p_data
[
7
];
p_bih
->
biHeight
=
(
p_dr
->
p_data
[
6
]
<<
8
)
|
p_dr
->
p_data
[
7
];
...
@@ -1570,24 +1551,22 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
...
@@ -1570,24 +1551,22 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
p_bih
->
biYPelsPerMeter
=
0
;
p_bih
->
biYPelsPerMeter
=
0
;
p_bih
->
biClrUsed
=
0
;
p_bih
->
biClrUsed
=
0
;
p_bih
->
biClrImportant
=
0
;
p_bih
->
biClrImportant
=
0
;
memcpy
(
&
p_bih
[
1
],
memcpy
(
&
p_bih
[
1
],
&
p_dr
->
p_data
[
10
],
i_bih_size
);
&
p_dr
->
p_data
[
10
],
i_bih_size
);
}
}
else
else
{
{
msg_Warn
(
p_input
,
"private ms-codec stream without bih private sl_descriptor"
);
msg_Warn
(
p_input
,
"private ms-codec stream without bih "
p_new_es
->
i_fourcc
=
0
;
"private sl_descriptor"
);
p_new_es
->
i_cat
=
UNKNOWN_ES
;
i_fourcc
=
0
;
i_cat
=
UNKNOWN_ES
;
}
}
}
}
if
(
(
p_new_es
->
i_cat
==
AUDIO_ES
)
if
(
i_cat
==
AUDIO_ES
||
i_cat
==
SPU_ES
)
||
(
p_new_es
->
i_cat
==
SPU_ES
)
)
{
{
dvbpsi_descriptor_t
*
p_dr
=
p_es
->
p_first_descriptor
;
dvbpsi_descriptor_t
*
p_dr
=
p_es
->
p_first_descriptor
;
while
(
p_dr
&&
(
p_dr
->
i_tag
!=
0x0a
)
)
while
(
p_dr
&&
(
p_dr
->
i_tag
!=
0x0a
)
)
p_dr
=
p_dr
->
p_next
;
p_dr
=
p_dr
->
p_next
;
if
(
p_dr
)
if
(
p_dr
)
{
{
dvbpsi_iso639_dr_t
*
p_decoded
=
dvbpsi_iso639_dr_t
*
p_decoded
=
...
@@ -1596,19 +1575,19 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
...
@@ -1596,19 +1575,19 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
{
{
const
iso639_lang_t
*
p_iso
;
const
iso639_lang_t
*
p_iso
;
p_iso
=
GetLang_2T
((
char
*
)
p_decoded
->
i_iso_639_code
);
p_iso
=
GetLang_2T
((
char
*
)
p_decoded
->
i_iso_639_code
);
if
(
p_iso
)
if
(
p_iso
)
{
{
if
(
p_iso
->
psz_native_name
[
0
]
)
if
(
p_iso
->
psz_native_name
[
0
]
)
str
cpy
(
p_new_es
->
psz_desc
,
str
ncpy
(
psz_desc
,
p_iso
->
psz_native_name
);
p_iso
->
psz_native_name
,
20
);
else
else
str
cpy
(
p_new_es
->
psz_desc
,
str
ncpy
(
psz_desc
,
p_iso
->
psz_eng_name
);
p_iso
->
psz_eng_name
,
20
);
}
}
else
else
{
{
strncpy
(
p_new_es
->
psz_desc
,
strncpy
(
psz_desc
,
p_decoded
->
i_iso_639_code
,
3
);
p_decoded
->
i_iso_639_code
,
3
);
}
}
}
}
}
}
...
@@ -1616,23 +1595,42 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
...
@@ -1616,23 +1595,42 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
{
{
case
MPEG1_AUDIO_ES
:
case
MPEG1_AUDIO_ES
:
case
MPEG2_AUDIO_ES
:
case
MPEG2_AUDIO_ES
:
strcat
(
p
_new_es
->
p
sz_desc
,
" (mpeg)"
);
strcat
(
psz_desc
,
" (mpeg)"
);
break
;
break
;
case
LPCM_AUDIO_ES
:
case
LPCM_AUDIO_ES
:
case
LPCMB_AUDIO_ES
:
case
LPCMB_AUDIO_ES
:
strcat
(
p
_new_es
->
p
sz_desc
,
" (lpcm)"
);
strcat
(
psz_desc
,
" (lpcm)"
);
break
;
break
;
case
A52_AUDIO_ES
:
case
A52_AUDIO_ES
:
case
A52DVB_AUDIO_ES
:
case
A52DVB_AUDIO_ES
:
case
A52B_AUDIO_ES
:
case
A52B_AUDIO_ES
:
strcat
(
p
_new_es
->
p
sz_desc
,
" (A52)"
);
strcat
(
psz_desc
,
" (A52)"
);
break
;
break
;
case
MPEG4_AUDIO_ES
:
case
MPEG4_AUDIO_ES
:
strcat
(
p
_new_es
->
p
sz_desc
,
" (aac)"
);
strcat
(
psz_desc
,
" (aac)"
);
break
;
break
;
}
}
}
}
/* Add this ES */
p_new_es
=
input_AddES
(
p_input
,
p_pgrm
,
(
u16
)
p_es
->
i_pid
,
i_cat
,
psz_desc
,
sizeof
(
es_ts_data_t
)
);
if
(
p_new_es
==
NULL
)
{
msg_Err
(
p_input
,
"could not add ES %d"
,
p_es
->
i_pid
);
p_input
->
b_error
=
1
;
return
;
}
p_new_es
->
i_fourcc
=
i_fourcc
;
p_new_es
->
i_stream_id
=
i_stream_id
;
p_new_es
->
p_bitmapinfoheader
=
(
void
*
)
p_bih
;
p_new_es
->
p_waveformatex
=
(
void
*
)
p_wf
;
memcpy
(
p_new_es
->
p_demux_data
,
&
demux_data
,
sizeof
(
es_ts_data_t
)
);
((
es_ts_data_t
*
)
p_new_es
->
p_demux_data
)
->
i_continuity_counter
=
0xFF
;
p_es
=
p_es
->
p_next
;
p_es
=
p_es
->
p_next
;
}
}
...
...
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