[vlc-devel] commit: Added blu-ray proprietary codec ids to TS demuxer. (Laurent Aimar )
git version control
git at videolan.org
Tue Sep 9 22:10:50 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Sep 9 22:13:07 2008 +0200| [1d8f55174682149e4a0b7e89afedba61b849ff80] | committer: Laurent Aimar
Added blu-ray proprietary codec ids to TS demuxer.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1d8f55174682149e4a0b7e89afedba61b849ff80
---
modules/demux/ts.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index ce6b900..05484ec 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -3055,6 +3055,7 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
ts_pid_t **pp_clean = NULL;
int i_clean = 0, i;
+ bool b_hdmv = false;
msg_Dbg( p_demux, "PMTCallBack called" );
@@ -3141,6 +3142,26 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
| p_dr->p_data[1];
msg_Dbg( p_demux, " * descriptor : CA (0x9) SysID 0x%x", i_sysid );
}
+ else if( p_dr->i_tag == 0x05 )
+ {
+ if( p_dr->i_tag == 0x05 )
+ {
+ /* Registration Descriptor */
+ if( p_dr->i_length != 4 )
+ {
+ msg_Warn( p_demux, "invalid Registration Descriptor" );
+ }
+ else
+ {
+ msg_Dbg( p_demux, " * descriptor : registration %4.4s", p_dr->p_data );
+ if( !memcmp( p_dr->p_data, "HDMV", 4 ) )
+ {
+ /* Blu-Ray */
+ b_hdmv = true;
+ }
+ }
+ }
+ }
else
{
msg_Dbg( p_demux, " * descriptor : unknown (0x%x)", p_dr->i_tag );
@@ -3354,6 +3375,12 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
pid->es->fmt.i_cat = AUDIO_ES;
pid->es->fmt.i_codec = VLC_FOURCC( 'a', '5', '2', ' ' );
}
+ else if( p_dr->i_tag == 0x81 )
+ {
+ /* ATSC with stream_type 0x06 */
+ pid->es->fmt.i_cat = AUDIO_ES;
+ pid->es->fmt.i_codec = VLC_FOURCC( 'a', '5', '2', ' ' );
+ }
else if( p_dr->i_tag == 0x7a )
{
/* DVB with stream_type 0x06 (ETS EN 300 468) */
@@ -3692,6 +3719,36 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
* Yes it's ugly but it's the only way to have DIV3 working */
pid->es->fmt.b_packetized = true;
}
+ else if( b_hdmv )
+ {
+ /* Blu-Ray mapping */
+ switch( p_es->i_type )
+ {
+ case 0x80:
+ pid->es->fmt.i_cat = AUDIO_ES;
+ pid->es->fmt.i_codec = VLC_FOURCC( 'l', 'p', 'c', 'm' );
+ break;
+ case 0x82:
+ case 0x85: /* DTS-HD High resolution audio */
+ case 0x86: /* DTS-HD Master audio */
+ case 0xA2: /* Secondary DTS audio */
+ pid->es->fmt.i_cat = AUDIO_ES;
+ pid->es->fmt.i_codec = VLC_FOURCC( 'd', 't', 's', ' ' );
+ break;
+ case 0x83: /* TrueHD AC3 */
+ case 0x84: /* E-AC3 */
+ case 0x87: /* E-AC3 */
+ case 0xA1: /* Secondary E-AC3 */
+ pid->es->fmt.i_cat = AUDIO_ES;
+ pid->es->fmt.i_codec = VLC_FOURCC( 'e', 'a', 'c', '3' );
+ break;
+ case 0x90: /* Presentation graphics */
+ case 0x91: /* Interactive graphics */
+ case 0x92: /* Subtitle */
+ default:
+ break;
+ }
+ }
if( pid->es->fmt.i_cat == AUDIO_ES ||
( pid->es->fmt.i_cat == SPU_ES &&
More information about the vlc-devel
mailing list