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