1 #include <stdio.h> 2 #include <DataIO.h> 3 #include "RawDecoderPlugin.h" 4 5 #define TRACE_THIS 1 6 #if TRACE_THIS 7 #define TRACE printf 8 #else 9 #define TRACE ((void)0) 10 #endif 11 12 RawDecoder::RawDecoder() 13 { 14 } 15 16 RawDecoder::~RawDecoder() 17 { 18 } 19 20 21 status_t 22 RawDecoder::Sniff(media_format *format, void **infoBuffer, int32 *infoSize) 23 { 24 if (format->type != B_MEDIA_RAW_AUDIO) 25 return B_ERROR; 26 27 fFormat = *format; 28 return B_OK; 29 } 30 31 32 status_t 33 RawDecoder::GetOutputFormat(media_format *format) 34 { 35 *format = fFormat; 36 return B_OK; 37 } 38 39 status_t 40 RawDecoder::Seek(media_seek_type seekTo, 41 int64 *frame, bigtime_t *time) 42 { 43 return B_OK; 44 } 45 46 47 status_t 48 RawDecoder::Decode(void *buffer, int64 *frameCount, 49 media_header *mediaHeader, media_decode_info *info) 50 { 51 return B_OK; 52 } 53 54 55 Decoder * 56 RawDecoderPlugin::NewDecoder() 57 { 58 return new RawDecoder; 59 } 60 61 62 MediaPlugin *instantiate_plugin() 63 { 64 return new RawDecoderPlugin; 65 } 66