summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2012-09-25 11:43:02 +0300
committerMartin Storsjo <martin@martin.st>2012-11-19 19:07:37 +0200
commit717fd3d4328abf524978ce9c125ab8ae8d6bffad (patch)
treec00d5f5f760b25ff784984d551c9f54a1fa0ca1e /include
parent33cf49b168a88a88167c46b01787a57b49cd875f (diff)
downloadframeworks_av-717fd3d4328abf524978ce9c125ab8ae8d6bffad.zip
frameworks_av-717fd3d4328abf524978ce9c125ab8ae8d6bffad.tar.gz
frameworks_av-717fd3d4328abf524978ce9c125ab8ae8d6bffad.tar.bz2
MediaCodec: Add a method for getting the component name
If the codec was chosen based on mime type, the caller does not know what component actually was chosen. This allows getting essential information (such as supported color formats, for a video encoder) for this component. Change-Id: Ie471f40f8104b37d27ced3dba5a54facc6504b1b
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MediaCodec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h
index cacfa54..b1e57cf 100644
--- a/include/media/stagefright/MediaCodec.h
+++ b/include/media/stagefright/MediaCodec.h
@@ -113,6 +113,8 @@ struct MediaCodec : public AHandler {
// pending, an error is pending.
void requestActivityNotification(const sp<AMessage> &notify);
+ status_t getName(AString *componentName) const;
+
protected:
virtual ~MediaCodec();
virtual void onMessageReceived(const sp<AMessage> &msg);
@@ -154,6 +156,7 @@ private:
kWhatCodecNotify = 'codc',
kWhatRequestIDRFrame = 'ridr',
kWhatRequestActivityNotification = 'racN',
+ kWhatGetName = 'getN',
};
enum {
@@ -178,6 +181,7 @@ private:
sp<ALooper> mLooper;
sp<ALooper> mCodecLooper;
sp<ACodec> mCodec;
+ AString mComponentName;
uint32_t mReplyID;
uint32_t mFlags;
sp<SurfaceTextureClient> mNativeWindow;