From 717fd3d4328abf524978ce9c125ab8ae8d6bffad Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Tue, 25 Sep 2012 11:43:02 +0300 Subject: 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 --- include/media/stagefright/MediaCodec.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') 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 ¬ify); + status_t getName(AString *componentName) const; + protected: virtual ~MediaCodec(); virtual void onMessageReceived(const sp &msg); @@ -154,6 +156,7 @@ private: kWhatCodecNotify = 'codc', kWhatRequestIDRFrame = 'ridr', kWhatRequestActivityNotification = 'racN', + kWhatGetName = 'getN', }; enum { @@ -178,6 +181,7 @@ private: sp mLooper; sp mCodecLooper; sp mCodec; + AString mComponentName; uint32_t mReplyID; uint32_t mFlags; sp mNativeWindow; -- cgit v1.1