Loading apex/manifest.json +1 −1 Original line number Diff line number Diff line { "name": "com.android.media", "version": 300801100 "version": 300801200 } apex/manifest_codec.json +1 −1 Original line number Diff line number Diff line { "name": "com.android.media.swcodec", "version": 300801100 "version": 300801200 } media/libstagefright/MediaCodec.cpp +11 −5 Original line number Diff line number Diff line Loading @@ -1482,9 +1482,9 @@ status_t MediaCodec::release() { return PostAndAwaitResponse(msg, &response); } status_t MediaCodec::releaseAsync() { status_t MediaCodec::releaseAsync(const sp<AMessage> ¬ify) { sp<AMessage> msg = new AMessage(kWhatRelease, this); msg->setInt32("async", 1); msg->setMessage("async", notify); sp<AMessage> response; return PostAndAwaitResponse(msg, &response); } Loading Loading @@ -2695,6 +2695,11 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { if (mReplyID != nullptr) { (new AMessage)->postReply(mReplyID); } if (mAsyncReleaseCompleteNotification != nullptr) { flushMediametrics(); mAsyncReleaseCompleteNotification->post(); mAsyncReleaseCompleteNotification.clear(); } break; } Loading Loading @@ -3081,8 +3086,8 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { break; } int32_t async = 0; if (msg->findInt32("async", &async) && async) { sp<AMessage> asyncNotify; if (msg->findMessage("async", &asyncNotify) && asyncNotify != nullptr) { if (mSurface != NULL) { if (!mReleaseSurface) { mReleaseSurface.reset(new ReleaseSurface); Loading Loading @@ -3114,10 +3119,11 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { pushBlankBuffersToNativeWindow(mSurface.get()); } if (async) { if (asyncNotify != nullptr) { mResourceManagerProxy->markClientForPendingRemoval(); (new AMessage)->postReply(mReplyID); mReplyID = 0; mAsyncReleaseCompleteNotification = asyncNotify; } break; Loading media/libstagefright/include/media/stagefright/MediaCodec.h +2 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ struct MediaCodec : public AHandler { // object. status_t release(); status_t releaseAsync(); status_t releaseAsync(const sp<AMessage> ¬ify); status_t flush(); Loading Loading @@ -383,6 +383,7 @@ private: sp<AMessage> mInputFormat; sp<AMessage> mCallback; sp<AMessage> mOnFrameRenderedNotification; sp<AMessage> mAsyncReleaseCompleteNotification; sp<ResourceManagerServiceProxy> mResourceManagerProxy; Loading services/audiopolicy/common/managerdefinitions/include/ClientDescriptor.h +8 −3 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ namespace android { class AudioPolicyMix; class DeviceDescriptor; class HwAudioOutputDescriptor; class SwAudioOutputDescriptor; Loading Loading @@ -90,11 +91,12 @@ public: product_strategy_t strategy, VolumeSource volumeSource, audio_output_flags_t flags, bool isPreferredDeviceForExclusiveUse, std::vector<wp<SwAudioOutputDescriptor>> secondaryOutputs) : std::vector<wp<SwAudioOutputDescriptor>> secondaryOutputs, wp<AudioPolicyMix> primaryMix) : ClientDescriptor(portId, uid, sessionId, attributes, config, preferredDeviceId, isPreferredDeviceForExclusiveUse), mStream(stream), mStrategy(strategy), mVolumeSource(volumeSource), mFlags(flags), mSecondaryOutputs(std::move(secondaryOutputs)) {} mSecondaryOutputs(std::move(secondaryOutputs)), mPrimaryMix(primaryMix) {} ~TrackClientDescriptor() override = default; using ClientDescriptor::dump; Loading @@ -108,6 +110,9 @@ public: return mSecondaryOutputs; }; VolumeSource volumeSource() const { return mVolumeSource; } const sp<AudioPolicyMix> getPrimaryMix() const { return mPrimaryMix.promote(); }; void setActive(bool active) override { Loading Loading @@ -136,7 +141,7 @@ private: const VolumeSource mVolumeSource; const audio_output_flags_t mFlags; const std::vector<wp<SwAudioOutputDescriptor>> mSecondaryOutputs; const wp<AudioPolicyMix> mPrimaryMix; /** * required for duplicating thread, prevent from removing active client from an output * involved in a duplication. Loading Loading
apex/manifest.json +1 −1 Original line number Diff line number Diff line { "name": "com.android.media", "version": 300801100 "version": 300801200 }
apex/manifest_codec.json +1 −1 Original line number Diff line number Diff line { "name": "com.android.media.swcodec", "version": 300801100 "version": 300801200 }
media/libstagefright/MediaCodec.cpp +11 −5 Original line number Diff line number Diff line Loading @@ -1482,9 +1482,9 @@ status_t MediaCodec::release() { return PostAndAwaitResponse(msg, &response); } status_t MediaCodec::releaseAsync() { status_t MediaCodec::releaseAsync(const sp<AMessage> ¬ify) { sp<AMessage> msg = new AMessage(kWhatRelease, this); msg->setInt32("async", 1); msg->setMessage("async", notify); sp<AMessage> response; return PostAndAwaitResponse(msg, &response); } Loading Loading @@ -2695,6 +2695,11 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { if (mReplyID != nullptr) { (new AMessage)->postReply(mReplyID); } if (mAsyncReleaseCompleteNotification != nullptr) { flushMediametrics(); mAsyncReleaseCompleteNotification->post(); mAsyncReleaseCompleteNotification.clear(); } break; } Loading Loading @@ -3081,8 +3086,8 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { break; } int32_t async = 0; if (msg->findInt32("async", &async) && async) { sp<AMessage> asyncNotify; if (msg->findMessage("async", &asyncNotify) && asyncNotify != nullptr) { if (mSurface != NULL) { if (!mReleaseSurface) { mReleaseSurface.reset(new ReleaseSurface); Loading Loading @@ -3114,10 +3119,11 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { pushBlankBuffersToNativeWindow(mSurface.get()); } if (async) { if (asyncNotify != nullptr) { mResourceManagerProxy->markClientForPendingRemoval(); (new AMessage)->postReply(mReplyID); mReplyID = 0; mAsyncReleaseCompleteNotification = asyncNotify; } break; Loading
media/libstagefright/include/media/stagefright/MediaCodec.h +2 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ struct MediaCodec : public AHandler { // object. status_t release(); status_t releaseAsync(); status_t releaseAsync(const sp<AMessage> ¬ify); status_t flush(); Loading Loading @@ -383,6 +383,7 @@ private: sp<AMessage> mInputFormat; sp<AMessage> mCallback; sp<AMessage> mOnFrameRenderedNotification; sp<AMessage> mAsyncReleaseCompleteNotification; sp<ResourceManagerServiceProxy> mResourceManagerProxy; Loading
services/audiopolicy/common/managerdefinitions/include/ClientDescriptor.h +8 −3 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ namespace android { class AudioPolicyMix; class DeviceDescriptor; class HwAudioOutputDescriptor; class SwAudioOutputDescriptor; Loading Loading @@ -90,11 +91,12 @@ public: product_strategy_t strategy, VolumeSource volumeSource, audio_output_flags_t flags, bool isPreferredDeviceForExclusiveUse, std::vector<wp<SwAudioOutputDescriptor>> secondaryOutputs) : std::vector<wp<SwAudioOutputDescriptor>> secondaryOutputs, wp<AudioPolicyMix> primaryMix) : ClientDescriptor(portId, uid, sessionId, attributes, config, preferredDeviceId, isPreferredDeviceForExclusiveUse), mStream(stream), mStrategy(strategy), mVolumeSource(volumeSource), mFlags(flags), mSecondaryOutputs(std::move(secondaryOutputs)) {} mSecondaryOutputs(std::move(secondaryOutputs)), mPrimaryMix(primaryMix) {} ~TrackClientDescriptor() override = default; using ClientDescriptor::dump; Loading @@ -108,6 +110,9 @@ public: return mSecondaryOutputs; }; VolumeSource volumeSource() const { return mVolumeSource; } const sp<AudioPolicyMix> getPrimaryMix() const { return mPrimaryMix.promote(); }; void setActive(bool active) override { Loading Loading @@ -136,7 +141,7 @@ private: const VolumeSource mVolumeSource; const audio_output_flags_t mFlags; const std::vector<wp<SwAudioOutputDescriptor>> mSecondaryOutputs; const wp<AudioPolicyMix> mPrimaryMix; /** * required for duplicating thread, prevent from removing active client from an output * involved in a duplication. Loading