Commit 747f24a1 authored by Laurent Aimar's avatar Laurent Aimar

* all: added support for a52 in PES private stream, but untested.

parent aefcff5d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* system.h: MPEG demultiplexing. * system.h: MPEG demultiplexing.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2002 VideoLAN * Copyright (C) 1999-2002 VideoLAN
* $Id: system.h,v 1.8 2003/07/13 12:35:13 massiot Exp $ * $Id: system.h,v 1.9 2003/08/14 23:32:51 fenrir Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
#define MPEG2_VIDEO_ES 0x02 #define MPEG2_VIDEO_ES 0x02
#define MPEG1_AUDIO_ES 0x03 #define MPEG1_AUDIO_ES 0x03
#define MPEG2_AUDIO_ES 0x04 #define MPEG2_AUDIO_ES 0x04
/* This one is "private PES". It may carry teletext and DVB, and we ought /* This one is "private PES". It may carry teletext, DVD subtitles, A52
* to check for the presence of a descriptor, but we don't. */ * We have to check for the presence of a descriptor to have the codec */
#define PESDVB_AUDIO_ES 0x06 #define PES_PRIVATE_ES 0x06
#define MPEG4_VIDEO_ES 0x10 #define MPEG4_VIDEO_ES 0x10
#define MPEG4_AUDIO_ES 0x11 #define MPEG4_AUDIO_ES 0x11
......
...@@ -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.33 2003/08/13 14:06:37 fenrir Exp $ * $Id: ts.c,v 1.34 2003/08/14 23:32:51 fenrir 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>
...@@ -1388,10 +1388,16 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input, ...@@ -1388,10 +1388,16 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
i_stream_id = 0xfa; i_stream_id = 0xfa;
break; break;
case MSCODEC_VIDEO_ES: case MSCODEC_VIDEO_ES:
i_fourcc = VLC_FOURCC(0,0,0,0); // fixed later i_fourcc = VLC_FOURCC(0,0,0,0); /* fixed later */
i_cat = VIDEO_ES; i_cat = VIDEO_ES;
i_stream_id = 0xa0; i_stream_id = 0xa0;
break; break;
case PES_PRIVATE_ES:
/* We need to check a descriptor to find the real codec */
i_fourcc = VLC_FOURCC(0,0,0,0); /* fixed later */
i_cat = UNKNOWN_ES;
i_stream_id = 0xbd;
break;
default: default:
i_fourcc = 0; i_fourcc = 0;
i_cat = UNKNOWN_ES; i_cat = UNKNOWN_ES;
...@@ -1549,8 +1555,8 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input, ...@@ -1549,8 +1555,8 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
if( p_dr && p_dr->i_length >= 8 ) if( p_dr && p_dr->i_length >= 8 )
{ {
int i_bih_size; int i_bih_size;
/* 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]; */ i_fourcc = VLC_FOURCC( p_dr->p_data[0], p_dr->p_data[1],
i_fourcc = VLC_FOURCC( p_dr->p_data[0], p_dr->p_data[1], p_dr->p_data[2], p_dr->p_data[3] ); p_dr->p_data[2], p_dr->p_data[3] );
i_bih_size = (p_dr->p_data[8] << 8) | p_dr->p_data[9]; 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;
...@@ -1577,6 +1583,32 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input, ...@@ -1577,6 +1583,32 @@ static void TS_DVBPSI_HandlePMT( input_thread_t * p_input,
i_cat = UNKNOWN_ES; i_cat = UNKNOWN_ES;
} }
} }
else if( p_es->i_type == PES_PRIVATE_ES )
{
dvbpsi_descriptor_t *p_dr = p_es->p_first_descriptor;
/* We have to find a descriptor giving the right codec */
for(p_dr = p_es->p_first_descriptor; p_dr; p_dr = p_dr->p_next)
{
if( p_dr->i_tag == 0x6a )
{
/* A52 */
i_fourcc = VLC_FOURCC( 'a', '5', '2', ' ' );
i_cat = AUDIO_ES;
}
else if( p_dr->i_tag == 0x59 )
{
/* DVB subtitle */
i_fourcc = VLC_FOURCC( 'd', 'v', 'b', 's' );
i_cat = SPU_ES;
}
}
if( i_fourcc == VLC_FOURCC(0,0,0,0) )
{
msg_Warn( p_input,
"Unknown codec/type for Private PES stream" );
}
}
if( i_cat == AUDIO_ES || i_cat == SPU_ES ) if( i_cat == AUDIO_ES || i_cat == SPU_ES )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment