1 /* 2 * Copyright 2010, Stephan Aßmus <superstippi@gmx.de>. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef TRACK_SUPPLIER_H 6 #define TRACK_SUPPLIER_H 7 8 9 #include <MediaDefs.h> 10 #include <MediaFormats.h> 11 12 #include "AudioTrackSupplier.h" 13 #include "SubTitles.h" 14 #include "VideoTrackSupplier.h" 15 16 17 class BMessage; 18 class BString; 19 20 21 class TrackSupplier { 22 public: 23 TrackSupplier(); 24 virtual ~TrackSupplier(); 25 26 virtual status_t InitCheck() = 0; 27 28 virtual status_t GetFileFormatInfo( 29 media_file_format* fileFormat) = 0; 30 virtual status_t GetCopyright(BString* copyright) = 0; 31 virtual status_t GetMetaData(BMessage* metaData) = 0; 32 33 virtual int32 CountAudioTracks() = 0; 34 virtual int32 CountVideoTracks() = 0; 35 virtual int32 CountSubTitleTracks() = 0; 36 37 virtual status_t GetAudioMetaData(int32 index, 38 BMessage* metaData) = 0; 39 virtual status_t GetVideoMetaData(int32 index, 40 BMessage* metaData) = 0; 41 42 virtual AudioTrackSupplier* CreateAudioTrackForIndex(int32 index) = 0; 43 virtual VideoTrackSupplier* CreateVideoTrackForIndex(int32 index) = 0; 44 virtual const SubTitles* SubTitleTrackForIndex(int32 index) = 0; 45 }; 46 47 48 #endif // TRACK_SUPPLIER_H 49