summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-04-19 16:25:20 -0700
committerAndreas Huber <andih@google.com>2012-04-19 16:53:42 -0700
commita53d87c7b1428fe02f535c31dafd64cb1362fde9 (patch)
tree91d1c0a816d28e2b4103522753119ae0b7b5a3e5 /include
parent8d6086781c79620ce6133df7bd27f0efdee6b4e6 (diff)
downloadframeworks_av-a53d87c7b1428fe02f535c31dafd64cb1362fde9.zip
frameworks_av-a53d87c7b1428fe02f535c31dafd64cb1362fde9.tar.gz
frameworks_av-a53d87c7b1428fe02f535c31dafd64cb1362fde9.tar.bz2
Add the ability to query the amount of cached data to NuMediaExtractor.
Change-Id: I0966270a2bd36698330beaa03f47d02fc6a40c44 related-to-bug: 6364341
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/NuMediaExtractor.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/media/stagefright/NuMediaExtractor.h b/include/media/stagefright/NuMediaExtractor.h
index 9c61113..d46ce36 100644
--- a/include/media/stagefright/NuMediaExtractor.h
+++ b/include/media/stagefright/NuMediaExtractor.h
@@ -28,6 +28,7 @@ namespace android {
struct ABuffer;
struct AMessage;
+struct DataSource;
struct MediaBuffer;
struct MediaExtractor;
struct MediaSource;
@@ -60,6 +61,8 @@ struct NuMediaExtractor : public RefBase {
status_t getSampleTime(int64_t *sampleTimeUs);
status_t getSampleMeta(sp<MetaData> *sampleMeta);
+ bool getCachedDuration(int64_t *durationUs, bool *eos) const;
+
protected:
virtual ~NuMediaExtractor();
@@ -78,13 +81,21 @@ private:
uint32_t mTrackFlags; // bitmask of "TrackFlags"
};
+ sp<DataSource> mDataSource;
+
sp<MediaExtractor> mImpl;
+ bool mIsWidevineExtractor;
Vector<TrackInfo> mSelectedTracks;
+ int64_t mTotalBitrate; // in bits/sec
+ int64_t mDurationUs;
ssize_t fetchTrackSamples(int64_t seekTimeUs = -1ll);
void releaseTrackSamples();
+ bool getTotalBitrate(int64_t *bitRate) const;
+ void updateDurationAndBitrate();
+
DISALLOW_EVIL_CONSTRUCTORS(NuMediaExtractor);
};