summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include/OggExtractor.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-05-07 10:35:13 -0700
committerAndreas Huber <andih@google.com>2010-05-07 12:01:45 -0700
commitee7ff20e69498ebd53dd9717a0f984188341a75e (patch)
tree2338621414d60b23ec50dd5f28fc413fb957a59e /media/libstagefright/include/OggExtractor.h
parentf9325834de1ae004212aec2fd03445b4eebfa766 (diff)
downloadframeworks_av-ee7ff20e69498ebd53dd9717a0f984188341a75e.zip
frameworks_av-ee7ff20e69498ebd53dd9717a0f984188341a75e.tar.gz
frameworks_av-ee7ff20e69498ebd53dd9717a0f984188341a75e.tar.bz2
A new OggExtractor/VorbisDecoder combo to support approximate seeking.
Change-Id: Id5d0c1c8b1adc62896bb5ed951f7b5cfda811e95 related-to-bug: 2654400
Diffstat (limited to 'media/libstagefright/include/OggExtractor.h')
-rw-r--r--media/libstagefright/include/OggExtractor.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/media/libstagefright/include/OggExtractor.h b/media/libstagefright/include/OggExtractor.h
new file mode 100644
index 0000000..7066669
--- /dev/null
+++ b/media/libstagefright/include/OggExtractor.h
@@ -0,0 +1,60 @@
+/*
+ * 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 OGG_EXTRACTOR_H_
+
+#define OGG_EXTRACTOR_H_
+
+#include <media/stagefright/MediaExtractor.h>
+
+namespace android {
+
+class DataSource;
+class String8;
+
+struct MyVorbisExtractor;
+struct OggSource;
+
+struct OggExtractor : public MediaExtractor {
+ OggExtractor(const sp<DataSource> &source);
+
+ virtual size_t countTracks();
+ virtual sp<MediaSource> getTrack(size_t index);
+ virtual sp<MetaData> getTrackMetaData(size_t index, uint32_t flags);
+
+ virtual sp<MetaData> getMetaData();
+
+protected:
+ virtual ~OggExtractor();
+
+private:
+ friend struct OggSource;
+
+ sp<DataSource> mDataSource;
+ status_t mInitCheck;
+
+ MyVorbisExtractor *mImpl;
+
+ OggExtractor(const OggExtractor &);
+ OggExtractor &operator=(const OggExtractor &);
+};
+
+bool SniffOgg(
+ const sp<DataSource> &source, String8 *mimeType, float *confidence);
+
+} // namespace android
+
+#endif // OGG_EXTRACTOR_H_