Loading media/codec2/sfplugin/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ cc_library_shared { "libstagefright_xmlparser", "libui", "libutils", "server_configurable_flags", ], export_shared_lib_headers: [ Loading media/codec2/sfplugin/CCodecBufferChannel.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include <android/hardware/cas/native/1.0/IDescrambler.h> #include <android/hardware/drm/1.0/types.h> #include <android-base/parseint.h> #include <android-base/properties.h> #include <android-base/stringprintf.h> #include <binder/MemoryBase.h> Loading @@ -52,6 +53,7 @@ #include <media/stagefright/SurfaceUtils.h> #include <media/MediaCodecBuffer.h> #include <mediadrm/ICrypto.h> #include <server_configurable_flags/get_flags.h> #include <system/window.h> #include "CCodecBufferChannel.h" Loading @@ -75,7 +77,6 @@ using DrmBufferType = hardware::drm::V1_0::BufferType; namespace { constexpr size_t kSmoothnessFactor = 4; constexpr size_t kRenderingDepth = 3; // This is for keeping IGBP's buffer dropping logic in legacy mode other // than making it non-blocking. Do not change this value. Loading Loading @@ -149,10 +150,11 @@ CCodecBufferChannel::CCodecBufferChannel( mFirstValidFrameIndex(0u), mIsSurfaceToDisplay(false), mHasPresentFenceTimes(false), mRenderingDepth(0u), mMetaMode(MODE_NONE), mInputMetEos(false), mSendEncryptedInfoBuffer(false) { mOutputSurface.lock()->maxDequeueBuffers = kSmoothnessFactor + kRenderingDepth; mOutputSurface.lock()->maxDequeueBuffers = kSmoothnessFactor; { Mutexed<Input>::Locked input(mInput); input->buffers.reset(new DummyInputBuffers("")); Loading @@ -173,6 +175,9 @@ CCodecBufferChannel::CCodecBufferChannel( Mutexed<BlockPools>::Locked pools(mBlockPools); pools->outputPoolId = C2BlockPool::BASIC_LINEAR; } std::string value = server_configurable_flags::GetServerConfigurableFlag( "media_native", "ccodec_rendering_depth", "0"); android::base::ParseInt(value, &mRenderingDepth); } CCodecBufferChannel::~CCodecBufferChannel() { Loading Loading @@ -1387,7 +1392,7 @@ status_t CCodecBufferChannel::start( { Mutexed<OutputSurface>::Locked output(mOutputSurface); maxDequeueCount = output->maxDequeueBuffers = numOutputSlots + reorderDepth.value + kRenderingDepth; reorderDepth.value + mRenderingDepth; outputSurface = output->surface ? output->surface->getIGraphicBufferProducer() : nullptr; if (outputSurface) { Loading Loading @@ -2055,7 +2060,7 @@ bool CCodecBufferChannel::handleWork( { Mutexed<OutputSurface>::Locked output(mOutputSurface); maxDequeueCount = output->maxDequeueBuffers = numOutputSlots + reorderDepth + kRenderingDepth; numOutputSlots + reorderDepth + mRenderingDepth; if (output->surface) { output->surface->setMaxDequeuedBufferCount(output->maxDequeueBuffers); } Loading media/codec2/sfplugin/CCodecBufferChannel.h +1 −0 Original line number Diff line number Diff line Loading @@ -344,6 +344,7 @@ private: std::map<uint64_t, int> rotation; }; Mutexed<OutputSurface> mOutputSurface; int mRenderingDepth; struct BlockPools { C2Allocator::id_t inputAllocatorId; Loading services/camera/libcameraservice/device3/Camera3Device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1906,7 +1906,7 @@ float Camera3Device::getMaxPreviewFps(sp<camera3::Camera3OutputStreamInterface> camera_metadata_entry minDurations = mDeviceInfo.find(ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS); for (size_t i = 0; i < minDurations.count; i += 4) { if (minDurations.data.i64[i] == stream->getFormat() if (minDurations.data.i64[i] == stream->getOriginalFormat() && minDurations.data.i64[i+1] == stream->getWidth() && minDurations.data.i64[i+2] == stream->getHeight()) { int64_t minFrameDuration = minDurations.data.i64[i+3]; Loading services/camera/libcameraservice/utils/TagMonitor.cpp +2 −2 File changed.Contains only whitespace changes. Show changes Loading
media/codec2/sfplugin/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ cc_library_shared { "libstagefright_xmlparser", "libui", "libutils", "server_configurable_flags", ], export_shared_lib_headers: [ Loading
media/codec2/sfplugin/CCodecBufferChannel.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include <android/hardware/cas/native/1.0/IDescrambler.h> #include <android/hardware/drm/1.0/types.h> #include <android-base/parseint.h> #include <android-base/properties.h> #include <android-base/stringprintf.h> #include <binder/MemoryBase.h> Loading @@ -52,6 +53,7 @@ #include <media/stagefright/SurfaceUtils.h> #include <media/MediaCodecBuffer.h> #include <mediadrm/ICrypto.h> #include <server_configurable_flags/get_flags.h> #include <system/window.h> #include "CCodecBufferChannel.h" Loading @@ -75,7 +77,6 @@ using DrmBufferType = hardware::drm::V1_0::BufferType; namespace { constexpr size_t kSmoothnessFactor = 4; constexpr size_t kRenderingDepth = 3; // This is for keeping IGBP's buffer dropping logic in legacy mode other // than making it non-blocking. Do not change this value. Loading Loading @@ -149,10 +150,11 @@ CCodecBufferChannel::CCodecBufferChannel( mFirstValidFrameIndex(0u), mIsSurfaceToDisplay(false), mHasPresentFenceTimes(false), mRenderingDepth(0u), mMetaMode(MODE_NONE), mInputMetEos(false), mSendEncryptedInfoBuffer(false) { mOutputSurface.lock()->maxDequeueBuffers = kSmoothnessFactor + kRenderingDepth; mOutputSurface.lock()->maxDequeueBuffers = kSmoothnessFactor; { Mutexed<Input>::Locked input(mInput); input->buffers.reset(new DummyInputBuffers("")); Loading @@ -173,6 +175,9 @@ CCodecBufferChannel::CCodecBufferChannel( Mutexed<BlockPools>::Locked pools(mBlockPools); pools->outputPoolId = C2BlockPool::BASIC_LINEAR; } std::string value = server_configurable_flags::GetServerConfigurableFlag( "media_native", "ccodec_rendering_depth", "0"); android::base::ParseInt(value, &mRenderingDepth); } CCodecBufferChannel::~CCodecBufferChannel() { Loading Loading @@ -1387,7 +1392,7 @@ status_t CCodecBufferChannel::start( { Mutexed<OutputSurface>::Locked output(mOutputSurface); maxDequeueCount = output->maxDequeueBuffers = numOutputSlots + reorderDepth.value + kRenderingDepth; reorderDepth.value + mRenderingDepth; outputSurface = output->surface ? output->surface->getIGraphicBufferProducer() : nullptr; if (outputSurface) { Loading Loading @@ -2055,7 +2060,7 @@ bool CCodecBufferChannel::handleWork( { Mutexed<OutputSurface>::Locked output(mOutputSurface); maxDequeueCount = output->maxDequeueBuffers = numOutputSlots + reorderDepth + kRenderingDepth; numOutputSlots + reorderDepth + mRenderingDepth; if (output->surface) { output->surface->setMaxDequeuedBufferCount(output->maxDequeueBuffers); } Loading
media/codec2/sfplugin/CCodecBufferChannel.h +1 −0 Original line number Diff line number Diff line Loading @@ -344,6 +344,7 @@ private: std::map<uint64_t, int> rotation; }; Mutexed<OutputSurface> mOutputSurface; int mRenderingDepth; struct BlockPools { C2Allocator::id_t inputAllocatorId; Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1906,7 +1906,7 @@ float Camera3Device::getMaxPreviewFps(sp<camera3::Camera3OutputStreamInterface> camera_metadata_entry minDurations = mDeviceInfo.find(ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS); for (size_t i = 0; i < minDurations.count; i += 4) { if (minDurations.data.i64[i] == stream->getFormat() if (minDurations.data.i64[i] == stream->getOriginalFormat() && minDurations.data.i64[i+1] == stream->getWidth() && minDurations.data.i64[i+2] == stream->getHeight()) { int64_t minFrameDuration = minDurations.data.i64[i+3]; Loading
services/camera/libcameraservice/utils/TagMonitor.cpp +2 −2 File changed.Contains only whitespace changes. Show changes