Add getError and setError to propagate error code from WVMMediaExtractor up to player.

Error code from the plugin is not propagated from WVMExtractorImpl.cpp to the MediaPlayer.
The two APIs addresses this issue and provide a path for the player to retrieve the last error.

Change-Id: I60040eaf2d396379eecca46bfe333c44a39c35ec
related-to-bug: 7073630
This commit is contained in:
Edwin Wong
2012-09-06 13:46:34 -07:00
parent d3c2b6f098
commit d72b67cdeb
2 changed files with 79 additions and 18 deletions

View File

@@ -13,7 +13,6 @@
#include <media/stagefright/DataSource.h>
#include <utils/RefBase.h>
// DLL entry - given a data source, instantiate a WVMExtractor object
namespace android {
@@ -52,11 +51,17 @@ public:
static void SocketInfoCallback(int fd, int op, void *context);
static void cleanup();
status_t getError() ;
void setError(status_t err);
protected:
virtual ~WVMExtractorImpl();
void Initialize();
private:
Mutex mLock;
status_t readAVCCMetaData(sp<MetaData> videoMetaData);
status_t readESDSMetaData(sp<MetaData> audioMetaData);
@@ -77,6 +82,8 @@ private:
int64_t mDuration; // usec.
status_t mError;
status_t mSetupStatus;
status_t readMetaData();