#include "matroska/KaxTrackVideo.h"
#include "matroska/KaxTrackEntryData.h"
#include "matroska/KaxContentEncoding.h"
+#include "matroska/KaxVersion.h"
#include "ebml/StdIOCallback.h"
{
};
+class chapter_translation_t
+{
+public:
+ KaxChapterTranslateID translated;
+ unsigned int codec_id;
+ std::vector<uint64_t> editions;
+};
+
class chapter_item_t
{
public:
std::vector<chapter_edition_t> stored_editions;
int i_default_edition;
+ std::vector<chapter_translation_t> translations;
std::vector<KaxSegmentFamily> families;
demux_sys_t & sys;
{
EbmlElement *el;
EbmlMaster *m;
- unsigned int i;
+ size_t i, j;
int i_upper_level = 0;
msg_Dbg( &sys.demuxer, "| + Information" );
msg_Dbg( &sys.demuxer, "| | + Date=%s", psz_date_utc );
}
}
+#endif
+#if LIBMATROSKA_VERSION >= 0x000704
+ else if( MKV_IS_ID( l, KaxChapterTranslate ) )
+ {
+ KaxChapterTranslate *p_trans = static_cast<KaxChapterTranslate*>( l );
+ chapter_translation_t translated;
+
+ p_trans->Read( es, p_trans->Generic().Context, i_upper_level, el, true );
+ for( j = 0; j < p_trans->ListSize(); j++ )
+ {
+ EbmlElement *l = (*p_trans)[j];
+
+ if( MKV_IS_ID( l, KaxChapterTranslateEditionUID ) )
+ {
+ translated.editions.push_back( uint64( *static_cast<KaxChapterTranslateEditionUID*>( l ) ) );
+ }
+ else if( MKV_IS_ID( l, KaxChapterTranslateCodec ) )
+ {
+ translated.codec_id = uint32( *static_cast<KaxChapterTranslateCodec*>( l ) );
+ }
+ else if( MKV_IS_ID( l, KaxChapterTranslateID ) )
+ {
+ translated.translated = *( new KaxChapterTranslateID( *static_cast<KaxChapterTranslateID*>( l ) ) );
+ }
+ }
+
+ translations.push_back( translated );
+ }
#endif
else
{