Commit 9a68a1af authored by Steve Lhomme's avatar Steve Lhomme

mkv.cpp: add some debugging messages for the users and tests for unsupported tracks

parent 76f6417b
......@@ -3993,13 +3993,13 @@ void matroska_segment_c::ParseSeekHead( KaxSeekHead *seekhead )
void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
{
size_t i, j, k, n;
bool bSupported = true;
mkv_track_t *tk;
msg_Dbg( &sys.demuxer, "| | + Track Entry" );
tk = new mkv_track_t();
tracks.push_back( tk );
/* Init the track */
memset( tk, 0, sizeof( mkv_track_t ) );
......@@ -4172,6 +4172,11 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
{
EbmlMaster *cencs = static_cast<EbmlMaster*>(l);
MkvTree( sys.demuxer, 3, "Content Encodings" );
if ( cencs->ListSize() > 1 )
{
msg_Err( &sys.demuxer, "Multiple Compression method not supported" );
bSupported = false;
}
for( j = 0; j < cencs->ListSize(); j++ )
{
EbmlElement *l2 = (*cencs)[j];
......@@ -4209,6 +4214,12 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
KaxContentCompAlgo &compalg = *(KaxContentCompAlgo*)l4;
MkvTree( sys.demuxer, 6, "Compression Algorithm: %i", uint32(compalg) );
tk->i_compression_type = uint32( compalg );
if ( ( tk->i_compression_type != MATROSKA_COMPRESSION_ZLIB ) &&
( tk->i_compression_type != MATROSKA_COMPRESSION_HEADER ) )
{
msg_Err( &sys.demuxer, "Track Compression method %d not supported", tk->i_compression_type );
bSupported = false;
}
}
else if( MKV_IS_ID( l4, KaxContentCompSettings ) )
{
......@@ -4401,6 +4412,16 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
typeid(*l).name() );
}
}
if ( bSupported )
{
tracks.push_back( tk );
}
else
{
msg_Err( &sys.demuxer, "Track Entry %d not supported", tk->i_number );
delete tk;
}
}
/*****************************************************************************
......@@ -5239,6 +5260,11 @@ bool matroska_segment_c::Preload( )
else if( MKV_IS_ID( el, KaxTracks ) )
{
ParseTracks( static_cast<KaxTracks*>( el ) );
if ( tracks.size() == 0 )
{
msg_Err( &sys.demuxer, "No tracks supported" );
return false;
}
}
else if( MKV_IS_ID( el, KaxSeekHead ) )
{
......
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