1ca16f5cbSbeveloper #include "DecoderPlugin.h" 2ca16f5cbSbeveloper 3ca16f5cbSbeveloper class RawDecoder : public Decoder 4ca16f5cbSbeveloper { 5ca16f5cbSbeveloper public: 6*a0a20160SAxel Dörfler void GetCodecInfo(media_codec_info &info); 7*a0a20160SAxel Dörfler 825305239Sbeveloper status_t Setup(media_format *ioEncodedFormat, 9bce1ab5eSbeveloper const void *infoBuffer, int32 infoSize); 10ca16f5cbSbeveloper 1125305239Sbeveloper status_t NegotiateOutputFormat(media_format *ioDecodedFormat); 1225305239Sbeveloper 13d8591482Sbeveloper status_t Seek(uint32 seekTo, 14bce1ab5eSbeveloper int64 seekFrame, int64 *frame, 15bce1ab5eSbeveloper bigtime_t seekTime, bigtime_t *time); 16ca16f5cbSbeveloper 17ca16f5cbSbeveloper status_t Decode(void *buffer, int64 *frameCount, 18ca16f5cbSbeveloper media_header *mediaHeader, media_decode_info *info); 19bb1d6ef2Sbeveloper 20ca16f5cbSbeveloper private: 21bb1d6ef2Sbeveloper status_t NegotiateVideoOutputFormat(media_format *ioDecodedFormat); 22bb1d6ef2Sbeveloper status_t NegotiateAudioOutputFormat(media_format *ioDecodedFormat); 23bb1d6ef2Sbeveloper 24bb1d6ef2Sbeveloper private: 25bb1d6ef2Sbeveloper int32 fFrameRate; 26bb1d6ef2Sbeveloper int32 fInputFrameSize; 27bb1d6ef2Sbeveloper int32 fOutputFrameSize; 28bb1d6ef2Sbeveloper int32 fInputSampleSize; 29bb1d6ef2Sbeveloper int32 fOutputSampleSize; 30bb1d6ef2Sbeveloper int32 fOutputBufferFrameCount; 31bb1d6ef2Sbeveloper void (*fSwapInput)(void *data, int32 count); 32bb1d6ef2Sbeveloper void (*fConvert)(void *dst, void *src, int32 count); 33bb1d6ef2Sbeveloper void (*fSwapOutput)(void *data, int32 count); 34bb1d6ef2Sbeveloper 35bb1d6ef2Sbeveloper char * fChunkBuffer; 36bb1d6ef2Sbeveloper int32 fChunkSize; 37bb1d6ef2Sbeveloper 38bb1d6ef2Sbeveloper bigtime_t fStartTime; 39bb1d6ef2Sbeveloper 4025305239Sbeveloper media_format fInputFormat; 41ca16f5cbSbeveloper }; 42ca16f5cbSbeveloper 43ca16f5cbSbeveloper 44ca16f5cbSbeveloper class RawDecoderPlugin : public DecoderPlugin 45ca16f5cbSbeveloper { 46ca16f5cbSbeveloper public: 47ca16f5cbSbeveloper Decoder * NewDecoder(); 48*a0a20160SAxel Dörfler status_t RegisterDecoder(); 49ca16f5cbSbeveloper }; 50