Loading media/libstagefright/C2OMXNode.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ status_t C2OMXNode::emptyBuffer( std::shared_ptr<C2Buffer> c2Buffer( // TODO: fence new Buffer2D(block->share( C2Rect(block->width(), block->height()), ::android::C2Fence())), C2Rect(block->width(), block->height()), ::C2Fence())), [handle, buffer, source = getSource()](C2Buffer *ptr) { delete ptr; native_handle_delete(handle); Loading media/libstagefright/codec2/1.0/InputSurfaceConnection.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ public: std::shared_ptr<C2Buffer> c2Buffer( // TODO: fence new Buffer2D(block->share( C2Rect(block->width(), block->height()), ::android::C2Fence())), C2Rect(block->width(), block->height()), ::C2Fence())), [handle, bufferId, src = mSource](C2Buffer *ptr) { delete ptr; native_handle_delete(handle); Loading media/libstagefright/codec2/SimpleC2Component.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ std::shared_ptr<C2Buffer> SimpleC2Component::createLinearBuffer( std::shared_ptr<C2Buffer> SimpleC2Component::createLinearBuffer( const std::shared_ptr<C2LinearBlock> &block, size_t offset, size_t size) { return C2Buffer::CreateLinearBuffer(block->share(offset, size, ::android::C2Fence())); return C2Buffer::CreateLinearBuffer(block->share(offset, size, ::C2Fence())); } std::shared_ptr<C2Buffer> SimpleC2Component::createGraphicBuffer( Loading @@ -383,7 +383,7 @@ std::shared_ptr<C2Buffer> SimpleC2Component::createGraphicBuffer( std::shared_ptr<C2Buffer> SimpleC2Component::createGraphicBuffer( const std::shared_ptr<C2GraphicBlock> &block, const C2Rect &crop) { return C2Buffer::CreateGraphicBuffer(block->share(crop, ::android::C2Fence())); return C2Buffer::CreateGraphicBuffer(block->share(crop, ::C2Fence())); } } // namespace android media/libstagefright/codec2/include/C2.h +9 −5 Original line number Diff line number Diff line Loading @@ -141,9 +141,13 @@ enum c2_blocking_t : int32_t { /// \defgroup utils Utilities /// @{ #define C2_DO_NOT_COPY(type, args...) \ type args& operator=(const type args&) = delete; \ type(const type args&) = delete; \ #define C2_DO_NOT_COPY(type) \ type& operator=(const type &) = delete; \ type(const type &) = delete; \ #define C2_DEFAULT_MOVE(type) \ type& operator=(type &&) = default; \ type(type &&) = default; \ #define C2_ALLOW_OVERFLOW __attribute__((no_sanitize("integer"))) #define C2_CONST __attribute__((const)) Loading Loading @@ -274,7 +278,7 @@ public: /** * Convert to a smaller counter type. This is always safe. */ template<typename U, typename E=typename std::enable_if<sizeof(U) < sizeof(T)>::type> template<typename U, typename E=typename std::enable_if<(sizeof(U) < sizeof(T))>::type> inline operator c2_cntr_t<U>() { return c2_cntr_t<U>(mValue); } Loading @@ -295,7 +299,7 @@ public: return c2_cntr_t<T>(mValue op compat::get(value)); \ } \ \ template<typename U, typename E=typename std::enable_if<sizeof(U) < sizeof(T)>::type> \ template<typename U, typename E=typename std::enable_if<(sizeof(U) < sizeof(T))>::type> \ attrib inline constexpr c2_cntr_t<U> operator op(const c2_cntr_t<U> &value) const { \ return c2_cntr_t<U>(U(mValue) op value.peeku()); \ } Loading media/libstagefright/codec2/include/C2Buffer.h +3 −6 Original line number Diff line number Diff line Loading @@ -1339,6 +1339,9 @@ struct C2Rect { uint32_t width; uint32_t height; constexpr inline C2Rect() : C2Rect(0, 0, 0, 0) { } constexpr inline C2Rect(uint32_t width_, uint32_t height_) : C2Rect(width_, height_, 0, 0) { } Loading Loading @@ -2262,10 +2265,4 @@ protected: /// @} // expose some objects in android namespace namespace android { /// \deprecated typedef ::C2Fence C2Fence; } #endif // C2BUFFER_H_ Loading
media/libstagefright/C2OMXNode.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ status_t C2OMXNode::emptyBuffer( std::shared_ptr<C2Buffer> c2Buffer( // TODO: fence new Buffer2D(block->share( C2Rect(block->width(), block->height()), ::android::C2Fence())), C2Rect(block->width(), block->height()), ::C2Fence())), [handle, buffer, source = getSource()](C2Buffer *ptr) { delete ptr; native_handle_delete(handle); Loading
media/libstagefright/codec2/1.0/InputSurfaceConnection.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ public: std::shared_ptr<C2Buffer> c2Buffer( // TODO: fence new Buffer2D(block->share( C2Rect(block->width(), block->height()), ::android::C2Fence())), C2Rect(block->width(), block->height()), ::C2Fence())), [handle, bufferId, src = mSource](C2Buffer *ptr) { delete ptr; native_handle_delete(handle); Loading
media/libstagefright/codec2/SimpleC2Component.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ std::shared_ptr<C2Buffer> SimpleC2Component::createLinearBuffer( std::shared_ptr<C2Buffer> SimpleC2Component::createLinearBuffer( const std::shared_ptr<C2LinearBlock> &block, size_t offset, size_t size) { return C2Buffer::CreateLinearBuffer(block->share(offset, size, ::android::C2Fence())); return C2Buffer::CreateLinearBuffer(block->share(offset, size, ::C2Fence())); } std::shared_ptr<C2Buffer> SimpleC2Component::createGraphicBuffer( Loading @@ -383,7 +383,7 @@ std::shared_ptr<C2Buffer> SimpleC2Component::createGraphicBuffer( std::shared_ptr<C2Buffer> SimpleC2Component::createGraphicBuffer( const std::shared_ptr<C2GraphicBlock> &block, const C2Rect &crop) { return C2Buffer::CreateGraphicBuffer(block->share(crop, ::android::C2Fence())); return C2Buffer::CreateGraphicBuffer(block->share(crop, ::C2Fence())); } } // namespace android
media/libstagefright/codec2/include/C2.h +9 −5 Original line number Diff line number Diff line Loading @@ -141,9 +141,13 @@ enum c2_blocking_t : int32_t { /// \defgroup utils Utilities /// @{ #define C2_DO_NOT_COPY(type, args...) \ type args& operator=(const type args&) = delete; \ type(const type args&) = delete; \ #define C2_DO_NOT_COPY(type) \ type& operator=(const type &) = delete; \ type(const type &) = delete; \ #define C2_DEFAULT_MOVE(type) \ type& operator=(type &&) = default; \ type(type &&) = default; \ #define C2_ALLOW_OVERFLOW __attribute__((no_sanitize("integer"))) #define C2_CONST __attribute__((const)) Loading Loading @@ -274,7 +278,7 @@ public: /** * Convert to a smaller counter type. This is always safe. */ template<typename U, typename E=typename std::enable_if<sizeof(U) < sizeof(T)>::type> template<typename U, typename E=typename std::enable_if<(sizeof(U) < sizeof(T))>::type> inline operator c2_cntr_t<U>() { return c2_cntr_t<U>(mValue); } Loading @@ -295,7 +299,7 @@ public: return c2_cntr_t<T>(mValue op compat::get(value)); \ } \ \ template<typename U, typename E=typename std::enable_if<sizeof(U) < sizeof(T)>::type> \ template<typename U, typename E=typename std::enable_if<(sizeof(U) < sizeof(T))>::type> \ attrib inline constexpr c2_cntr_t<U> operator op(const c2_cntr_t<U> &value) const { \ return c2_cntr_t<U>(U(mValue) op value.peeku()); \ } Loading
media/libstagefright/codec2/include/C2Buffer.h +3 −6 Original line number Diff line number Diff line Loading @@ -1339,6 +1339,9 @@ struct C2Rect { uint32_t width; uint32_t height; constexpr inline C2Rect() : C2Rect(0, 0, 0, 0) { } constexpr inline C2Rect(uint32_t width_, uint32_t height_) : C2Rect(width_, height_, 0, 0) { } Loading Loading @@ -2262,10 +2265,4 @@ protected: /// @} // expose some objects in android namespace namespace android { /// \deprecated typedef ::C2Fence C2Fence; } #endif // C2BUFFER_H_