diff options
author | Steve Kondik <steve@cyngn.com> | 2015-11-18 16:26:56 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-20 20:21:18 -0800 |
commit | a64bf2af4ef3219d9d897cd1bbc7b67a7e4c3f4c (patch) | |
tree | 4d8fea06066885f0af7bd5944d6edf33bee2d829 /include/media | |
parent | 07f1086ff02439dc20f3bff6607be920630185e0 (diff) | |
download | frameworks_av-a64bf2af4ef3219d9d897cd1bbc7b67a7e4c3f4c.zip frameworks_av-a64bf2af4ef3219d9d897cd1bbc7b67a7e4c3f4c.tar.gz frameworks_av-a64bf2af4ef3219d9d897cd1bbc7b67a7e4c3f4c.tar.bz2 |
Revert "DataSource: Remove global variables in DataSource related to sniff"
* Don't change the ABI. Fun times.
This reverts commit 4440ef8efc77d1bd7838885e83d41e54deb5a3b8.
Change-Id: Ie9e0812f5e4ee700c29b76a413083858ec0255c9
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/stagefright/DataSource.h | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/include/media/stagefright/DataSource.h b/include/media/stagefright/DataSource.h index 56abe71..de5ddd3 100644 --- a/include/media/stagefright/DataSource.h +++ b/include/media/stagefright/DataSource.h @@ -36,40 +36,6 @@ class IDataSource; struct IMediaHTTPService; class String8; struct HTTPBase; -class DataSource; - -class Sniffer : public RefBase { -public: - Sniffer(); - - //////////////////////////////////////////////////////////////////////////// - - bool sniff(DataSource *source, String8 *mimeType, float *confidence, sp<AMessage> *meta); - - // The sniffer can optionally fill in "meta" with an AMessage containing - // a dictionary of values that helps the corresponding extractor initialize - // its state without duplicating effort already exerted by the sniffer. - typedef bool (*SnifferFunc)( - const sp<DataSource> &source, String8 *mimeType, - float *confidence, sp<AMessage> *meta); - - //if isExtendedExtractor = true, store the location of the sniffer to register - void registerSniffer_l(SnifferFunc func); - void registerDefaultSniffers(); - - virtual ~Sniffer() {} - -private: - Mutex mSnifferMutex; - List<SnifferFunc> mSniffers; - List<SnifferFunc> mExtraSniffers; - List<SnifferFunc>::iterator extendedSnifferPosition; - - void registerSnifferPlugin(); - - Sniffer(const Sniffer &); - Sniffer &operator=(const Sniffer &); -}; class DataSource : public RefBase { public: @@ -91,7 +57,7 @@ public: static sp<DataSource> CreateMediaHTTP(const sp<IMediaHTTPService> &httpService); static sp<DataSource> CreateFromIDataSource(const sp<IDataSource> &source); - DataSource() : mSniffer(new Sniffer()) {} + DataSource() {} virtual status_t initCheck() const = 0; @@ -145,7 +111,11 @@ public: protected: virtual ~DataSource() {} - sp<Sniffer> mSniffer; +private: + static Mutex gSnifferMutex; + static List<SnifferFunc> gSniffers; + static List<SnifferFunc> gExtraSniffers; + static bool gSniffersRegistered; static void RegisterSniffer_l(SnifferFunc func); static void RegisterSnifferPlugin(); |