Commit 9ef8db17 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf Committed by Felix Paul Kühne

Support parsing IAS* in AVI

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 94ea7a9c
......@@ -407,7 +407,7 @@ static int Open( vlc_object_t * p_this )
tk->i_scale = p_strh->i_scale;
tk->i_samplesize = p_strh->i_samplesize;
msg_Dbg( p_demux, "stream[%d] rate:%d scale:%d samplesize:%d",
i, tk->i_rate, tk->i_scale, tk->i_samplesize );
i, tk->i_rate, tk->i_scale, tk->i_samplesize );
switch( p_strh->i_type )
{
......@@ -454,6 +454,15 @@ static int Open( vlc_object_t * p_this )
fmt.audio.i_bitspersample = p_auds->p_wf->wBitsPerSample;
fmt.b_packetized = !tk->i_blocksize;
avi_chunk_list_t *p_info = AVI_ChunkFind( p_riff, AVIFOURCC_INFO, 0 );
if( p_info )
{
int i_chunk = AVIFOURCC_IAS1 + ((i - 1) << 24);
avi_chunk_STRING_t *p_lang = AVI_ChunkFind( p_info, i_chunk, 0 );
if( p_lang != NULL )
fmt.psz_language = FromACP( p_lang->p_str );
}
msg_Dbg( p_demux,
"stream[%d] audio(0x%x - %s) %d channels %dHz %dbits",
i, p_auds->p_wf->wFormatTag,vlc_fourcc_GetDescription(AUDIO_ES,tk->i_codec),
......
......@@ -762,8 +762,19 @@ static const struct
{ AVIFOURCC_ISTR, "Starring" },
{ AVIFOURCC_IFRM, "Total number of parts" },
{ AVIFOURCC_strn, "Stream name" },
{ AVIFOURCC_IAS1, "First Language" },
{ AVIFOURCC_IAS2, "Second Language" },
{ AVIFOURCC_IAS3, "Third Language" },
{ AVIFOURCC_IAS4, "Fourth Language" },
{ AVIFOURCC_IAS5, "Fifth Language" },
{ AVIFOURCC_IAS6, "Sixth Language" },
{ AVIFOURCC_IAS7, "Seventh Language" },
{ AVIFOURCC_IAS8, "Eighth Language" },
{ AVIFOURCC_IAS9, "Ninth Language" },
{ 0, "???" }
};
static int AVI_ChunkRead_strz( stream_t *s, avi_chunk_t *p_chk )
{
int i_index;
......@@ -872,6 +883,15 @@ static const struct
{ AVIFOURCC_ICNT, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_ISTR, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IFRM, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IAS1, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IAS2, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IAS3, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IAS4, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IAS5, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IAS6, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IAS7, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IAS8, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_IAS9, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
{ AVIFOURCC_strn, AVI_ChunkRead_strz, AVI_ChunkFree_strz },
......
......@@ -344,6 +344,15 @@ int AVI_ChunkFetchIndexes( stream_t *, avi_chunk_t *p_riff );
#define AVIFOURCC_ISTR VLC_FOURCC('I','S','T','R')
#define AVIFOURCC_IFRM VLC_FOURCC('I','F','R','M')
#define AVIFOURCC_IAS1 VLC_FOURCC('I','A','S','1')
#define AVIFOURCC_IAS2 VLC_FOURCC('I','A','S','2')
#define AVIFOURCC_IAS3 VLC_FOURCC('I','A','S','3')
#define AVIFOURCC_IAS4 VLC_FOURCC('I','A','S','4')
#define AVIFOURCC_IAS5 VLC_FOURCC('I','A','S','5')
#define AVIFOURCC_IAS6 VLC_FOURCC('I','A','S','6')
#define AVIFOURCC_IAS7 VLC_FOURCC('I','A','S','7')
#define AVIFOURCC_IAS8 VLC_FOURCC('I','A','S','8')
#define AVIFOURCC_IAS9 VLC_FOURCC('I','A','S','9')
#define AVITWOCC_wb VLC_TWOCC('w','b')
#define AVITWOCC_db VLC_TWOCC('d','b')
......
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