summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-03-16 10:53:50 -0700
committerAndreas Huber <andih@google.com>2012-03-16 11:01:11 -0700
commitded61aa958278147b5a150c189f86d025165f095 (patch)
treec7c1f15595be728b0fc9ad49e0c05b84710ea19a /media/libstagefright/include
parent49f306f863b14f8bfc3b405ebfd3a2fb2b403c15 (diff)
downloadframeworks_av-ded61aa958278147b5a150c189f86d025165f095.zip
frameworks_av-ded61aa958278147b5a150c189f86d025165f095.tar.gz
frameworks_av-ded61aa958278147b5a150c189f86d025165f095.tar.bz2
Remove obsolete software codec header files and amr encoders.
Change-Id: Ifbdf252ee312c9cb5ab29498f1e06dae8f23faf7
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r--media/libstagefright/include/AACDecoder.h68
-rw-r--r--media/libstagefright/include/AMRNBDecoder.h59
-rw-r--r--media/libstagefright/include/AMRNBEncoder.h66
-rw-r--r--media/libstagefright/include/AMRWBDecoder.h62
-rw-r--r--media/libstagefright/include/AMRWBEncoder.h72
-rw-r--r--media/libstagefright/include/AVCDecoder.h93
-rw-r--r--media/libstagefright/include/G711Decoder.h57
-rw-r--r--media/libstagefright/include/M4vH263Decoder.h68
-rw-r--r--media/libstagefright/include/MP3Decoder.h67
-rw-r--r--media/libstagefright/include/VPXDecoder.h62
-rw-r--r--media/libstagefright/include/VorbisDecoder.h72
11 files changed, 0 insertions, 746 deletions
diff --git a/media/libstagefright/include/AACDecoder.h b/media/libstagefright/include/AACDecoder.h
deleted file mode 100644
index 886a3b7..0000000
--- a/media/libstagefright/include/AACDecoder.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef AAC_DECODER_H_
-
-#define AAC_DECODER_H_
-
-#include <media/stagefright/MediaSource.h>
-
-struct tPVMP4AudioDecoderExternal;
-
-namespace android {
-
-struct MediaBufferGroup;
-struct MetaData;
-
-struct AACDecoder : public MediaSource {
- AACDecoder(const sp<MediaSource> &source);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
-protected:
- virtual ~AACDecoder();
-
-private:
- sp<MetaData> mMeta;
- sp<MediaSource> mSource;
- bool mStarted;
-
- MediaBufferGroup *mBufferGroup;
-
- tPVMP4AudioDecoderExternal *mConfig;
- void *mDecoderBuf;
- int64_t mAnchorTimeUs;
- int64_t mNumSamplesOutput;
- status_t mInitCheck;
- int64_t mNumDecodedBuffers;
- int32_t mUpsamplingFactor;
-
- MediaBuffer *mInputBuffer;
-
- status_t initCheck();
- AACDecoder(const AACDecoder &);
- AACDecoder &operator=(const AACDecoder &);
-};
-
-} // namespace android
-
-#endif // AAC_DECODER_H_
diff --git a/media/libstagefright/include/AMRNBDecoder.h b/media/libstagefright/include/AMRNBDecoder.h
deleted file mode 100644
index cf24eda..0000000
--- a/media/libstagefright/include/AMRNBDecoder.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef AMR_NB_DECODER_H_
-
-#define AMR_NB_DECODER_H_
-
-#include <media/stagefright/MediaSource.h>
-
-namespace android {
-
-struct MediaBufferGroup;
-
-struct AMRNBDecoder : public MediaSource {
- AMRNBDecoder(const sp<MediaSource> &source);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
-protected:
- virtual ~AMRNBDecoder();
-
-private:
- sp<MediaSource> mSource;
- bool mStarted;
-
- MediaBufferGroup *mBufferGroup;
-
- void *mState;
- int64_t mAnchorTimeUs;
- int64_t mNumSamplesOutput;
-
- MediaBuffer *mInputBuffer;
-
- AMRNBDecoder(const AMRNBDecoder &);
- AMRNBDecoder &operator=(const AMRNBDecoder &);
-};
-
-} // namespace android
-
-#endif // AMR_NB_DECODER_H_
diff --git a/media/libstagefright/include/AMRNBEncoder.h b/media/libstagefright/include/AMRNBEncoder.h
deleted file mode 100644
index 71160e6..0000000
--- a/media/libstagefright/include/AMRNBEncoder.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef AMR_NB_ENCODER_H_
-
-#define AMR_NB_ENCODER_H_
-
-#include <media/stagefright/MediaSource.h>
-#include <media/stagefright/MetaData.h>
-
-namespace android {
-
-struct MediaBufferGroup;
-
-struct AMRNBEncoder : public MediaSource {
- AMRNBEncoder(const sp<MediaSource> &source, const sp<MetaData> &meta);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
-protected:
- virtual ~AMRNBEncoder();
-
-private:
- sp<MediaSource> mSource;
- sp<MetaData> mMeta;
- bool mStarted;
-
- MediaBufferGroup *mBufferGroup;
-
- void *mEncState;
- void *mSidState;
- int64_t mAnchorTimeUs;
- int64_t mNumFramesOutput;
-
- MediaBuffer *mInputBuffer;
- int mMode;
-
- int16_t mInputFrame[160];
- int32_t mNumInputSamples;
-
- AMRNBEncoder(const AMRNBEncoder &);
- AMRNBEncoder &operator=(const AMRNBEncoder &);
-};
-
-} // namespace android
-
-#endif // AMR_NB_ENCODER_H_
diff --git a/media/libstagefright/include/AMRWBDecoder.h b/media/libstagefright/include/AMRWBDecoder.h
deleted file mode 100644
index 927c51c..0000000
--- a/media/libstagefright/include/AMRWBDecoder.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef AMR_WB_DECODER_H_
-
-#define AMR_WB_DECODER_H_
-
-#include <media/stagefright/MediaSource.h>
-
-namespace android {
-
-struct MediaBufferGroup;
-
-struct AMRWBDecoder : public MediaSource {
- AMRWBDecoder(const sp<MediaSource> &source);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
-protected:
- virtual ~AMRWBDecoder();
-
-private:
- sp<MediaSource> mSource;
- bool mStarted;
-
- MediaBufferGroup *mBufferGroup;
-
- void *mState;
- void *mDecoderBuf;
- int16_t *mDecoderCookie;
- int64_t mAnchorTimeUs;
- int64_t mNumSamplesOutput;
- int16_t mInputSampleBuffer[477];
-
- MediaBuffer *mInputBuffer;
-
- AMRWBDecoder(const AMRWBDecoder &);
- AMRWBDecoder &operator=(const AMRWBDecoder &);
-};
-
-} // namespace android
-
-#endif // AMR_WB_DECODER_H_
diff --git a/media/libstagefright/include/AMRWBEncoder.h b/media/libstagefright/include/AMRWBEncoder.h
deleted file mode 100644
index f2d155f..0000000
--- a/media/libstagefright/include/AMRWBEncoder.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef AMR_WB_ENCODER_H
-#define AMR_WB_ENCODER_H
-
-#include <media/stagefright/MediaSource.h>
-#include <media/stagefright/MetaData.h>
-
-struct VO_AUDIO_CODECAPI;
-struct VO_MEM_OPERATOR;
-
-namespace android {
-
-struct MediaBufferGroup;
-
-class AMRWBEncoder: public MediaSource {
- public:
- AMRWBEncoder(const sp<MediaSource> &source, const sp<MetaData> &meta);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
- virtual sp<MetaData> getFormat();
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
-
- protected:
- virtual ~AMRWBEncoder();
-
- private:
- sp<MediaSource> mSource;
- sp<MetaData> mMeta;
- bool mStarted;
- MediaBufferGroup *mBufferGroup;
- MediaBuffer *mInputBuffer;
- status_t mInitCheck;
- int32_t mBitRate;
- void *mEncoderHandle;
- VO_AUDIO_CODECAPI *mApiHandle;
- VO_MEM_OPERATOR *mMemOperator;
-
- int64_t mAnchorTimeUs;
- int64_t mNumFramesOutput;
-
- int16_t mInputFrame[320];
- int32_t mNumInputSamples;
-
- status_t initCheck();
-
- AMRWBEncoder& operator=(const AMRWBEncoder &rhs);
- AMRWBEncoder(const AMRWBEncoder& copy);
-
-};
-
-}
-
-#endif //#ifndef AMR_WB_ENCODER_H
-
diff --git a/media/libstagefright/include/AVCDecoder.h b/media/libstagefright/include/AVCDecoder.h
deleted file mode 100644
index eb3b142..0000000
--- a/media/libstagefright/include/AVCDecoder.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef AVC_DECODER_H_
-
-#define AVC_DECODER_H_
-
-#include <media/stagefright/MediaBuffer.h>
-#include <media/stagefright/MediaSource.h>
-#include <utils/Vector.h>
-
-struct tagAVCHandle;
-
-namespace android {
-
-struct AVCDecoder : public MediaSource,
- public MediaBufferObserver {
- AVCDecoder(const sp<MediaSource> &source);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
- virtual void signalBufferReturned(MediaBuffer *buffer);
-
-protected:
- virtual ~AVCDecoder();
-
-private:
- sp<MediaSource> mSource;
- bool mStarted;
-
- sp<MetaData> mFormat;
-
- Vector<MediaBuffer *> mCodecSpecificData;
-
- tagAVCHandle *mHandle;
- Vector<MediaBuffer *> mFrames;
- MediaBuffer *mInputBuffer;
-
- int64_t mAnchorTimeUs;
- int64_t mNumSamplesOutput;
- int64_t mPendingSeekTimeUs;
- MediaSource::ReadOptions::SeekMode mPendingSeekMode;
-
- int64_t mTargetTimeUs;
-
- bool mSPSSeen;
- bool mPPSSeen;
-
- void addCodecSpecificData(const uint8_t *data, size_t size);
-
- static int32_t ActivateSPSWrapper(
- void *userData, unsigned int sizeInMbs, unsigned int numBuffers);
-
- static int32_t BindFrameWrapper(
- void *userData, int32_t index, uint8_t **yuv);
-
- static void UnbindFrame(void *userData, int32_t index);
-
- int32_t activateSPS(
- unsigned int sizeInMbs, unsigned int numBuffers);
-
- int32_t bindFrame(int32_t index, uint8_t **yuv);
-
- void releaseFrames();
-
- MediaBuffer *drainOutputBuffer();
-
- AVCDecoder(const AVCDecoder &);
- AVCDecoder &operator=(const AVCDecoder &);
-};
-
-} // namespace android
-
-#endif // AVC_DECODER_H_
diff --git a/media/libstagefright/include/G711Decoder.h b/media/libstagefright/include/G711Decoder.h
deleted file mode 100644
index 8b5143a..0000000
--- a/media/libstagefright/include/G711Decoder.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef G711_DECODER_H_
-
-#define G711_DECODER_H_
-
-#include <media/stagefright/MediaSource.h>
-
-namespace android {
-
-struct MediaBufferGroup;
-
-struct G711Decoder : public MediaSource {
- G711Decoder(const sp<MediaSource> &source);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
-protected:
- virtual ~G711Decoder();
-
-private:
- sp<MediaSource> mSource;
- bool mStarted;
- bool mIsMLaw;
-
- MediaBufferGroup *mBufferGroup;
-
- static void DecodeALaw(int16_t *out, const uint8_t *in, size_t inSize);
- static void DecodeMLaw(int16_t *out, const uint8_t *in, size_t inSize);
-
- G711Decoder(const G711Decoder &);
- G711Decoder &operator=(const G711Decoder &);
-};
-
-} // namespace android
-
-#endif // G711_DECODER_H_
diff --git a/media/libstagefright/include/M4vH263Decoder.h b/media/libstagefright/include/M4vH263Decoder.h
deleted file mode 100644
index 7d73e30..0000000
--- a/media/libstagefright/include/M4vH263Decoder.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef M4V_H263_DECODER_H_
-
-#define M4V_H263_DECODER_H_
-
-#include <media/stagefright/MediaBuffer.h>
-#include <media/stagefright/MediaSource.h>
-
-struct tagvideoDecControls;
-
-namespace android {
-
-struct M4vH263Decoder : public MediaSource,
- public MediaBufferObserver {
- M4vH263Decoder(const sp<MediaSource> &source);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
- virtual void signalBufferReturned(MediaBuffer *buffer);
-
-protected:
- virtual ~M4vH263Decoder();
-
-private:
- sp<MediaSource> mSource;
- bool mStarted;
- int32_t mWidth, mHeight;
-
- sp<MetaData> mFormat;
-
- tagvideoDecControls *mHandle;
- MediaBuffer *mFrames[2];
- MediaBuffer *mInputBuffer;
-
- int64_t mNumSamplesOutput;
- int64_t mTargetTimeUs;
-
- void allocateFrames(int32_t width, int32_t height);
- void releaseFrames();
-
- M4vH263Decoder(const M4vH263Decoder &);
- M4vH263Decoder &operator=(const M4vH263Decoder &);
-};
-
-} // namespace android
-
-#endif // M4V_H263_DECODER_H_
diff --git a/media/libstagefright/include/MP3Decoder.h b/media/libstagefright/include/MP3Decoder.h
deleted file mode 100644
index 4086fb6..0000000
--- a/media/libstagefright/include/MP3Decoder.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef MP3_DECODER_H_
-
-#define MP3_DECODER_H_
-
-#include <media/stagefright/MediaSource.h>
-
-struct tPVMP3DecoderExternal;
-
-namespace android {
-
-struct MediaBufferGroup;
-
-struct MP3Decoder : public MediaSource {
- MP3Decoder(const sp<MediaSource> &source);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
-protected:
- virtual ~MP3Decoder();
-
-private:
- sp<MediaSource> mSource;
- sp<MetaData> mMeta;
- int32_t mNumChannels;
-
- bool mStarted;
-
- MediaBufferGroup *mBufferGroup;
-
- tPVMP3DecoderExternal *mConfig;
- void *mDecoderBuf;
- int64_t mAnchorTimeUs;
- int64_t mNumFramesOutput;
-
- MediaBuffer *mInputBuffer;
-
- void init();
-
- MP3Decoder(const MP3Decoder &);
- MP3Decoder &operator=(const MP3Decoder &);
-};
-
-} // namespace android
-
-#endif // MP3_DECODER_H_
diff --git a/media/libstagefright/include/VPXDecoder.h b/media/libstagefright/include/VPXDecoder.h
deleted file mode 100644
index 3b8362d..0000000
--- a/media/libstagefright/include/VPXDecoder.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VPX_DECODER_H_
-
-#define VPX_DECODER_H_
-
-#include <media/stagefright/MediaSource.h>
-#include <utils/Vector.h>
-
-namespace android {
-
-struct MediaBufferGroup;
-
-struct VPXDecoder : public MediaSource {
- VPXDecoder(const sp<MediaSource> &source);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
-protected:
- virtual ~VPXDecoder();
-
-private:
- sp<MediaSource> mSource;
- bool mStarted;
- int32_t mWidth, mHeight;
- size_t mBufferSize;
-
- void *mCtx;
- MediaBufferGroup *mBufferGroup;
-
- int64_t mTargetTimeUs;
-
- sp<MetaData> mFormat;
-
- VPXDecoder(const VPXDecoder &);
- VPXDecoder &operator=(const VPXDecoder &);
-};
-
-} // namespace android
-
-#endif // VPX_DECODER_H_
-
diff --git a/media/libstagefright/include/VorbisDecoder.h b/media/libstagefright/include/VorbisDecoder.h
deleted file mode 100644
index 13e8b77..0000000
--- a/media/libstagefright/include/VorbisDecoder.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VORBIS_DECODER_H_
-
-#define VORBIS_DECODER_H_
-
-#include <media/stagefright/MediaSource.h>
-
-struct vorbis_dsp_state;
-struct vorbis_info;
-
-namespace android {
-
-struct MediaBufferGroup;
-
-struct VorbisDecoder : public MediaSource {
- VorbisDecoder(const sp<MediaSource> &source);
-
- virtual status_t start(MetaData *params);
- virtual status_t stop();
-
- virtual sp<MetaData> getFormat();
-
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options);
-
-protected:
- virtual ~VorbisDecoder();
-
-private:
- enum {
- kMaxNumSamplesPerBuffer = 8192 * 2
- };
-
- sp<MediaSource> mSource;
- bool mStarted;
-
- MediaBufferGroup *mBufferGroup;
-
- int32_t mNumChannels;
- int32_t mSampleRate;
- int64_t mAnchorTimeUs;
- int64_t mNumFramesOutput;
- int32_t mNumFramesLeftOnPage;
-
- vorbis_dsp_state *mState;
- vorbis_info *mVi;
-
- int decodePacket(MediaBuffer *packet, MediaBuffer *out);
-
- VorbisDecoder(const VorbisDecoder &);
- VorbisDecoder &operator=(const VorbisDecoder &);
-};
-
-} // namespace android
-
-#endif // VORBIS_DECODER_H_
-