New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 631231 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

VideoFrame::WrapVideoFrame() does not participate in ownership of wrapped frame

Project Member Reported by chfremer@chromium.org, Jul 25 2016

Issue description

When wrapping an instance of VideoFrame in another VideoFrame 
using the method VideoFrame::WrapVideoFrame() [1], the wrapper 
does not automatically participate in (shared) ownership of the 
wrapped instance. Instead, at all usage sites, ownership is 
attached externally through "AddDestructionObserver()" and an 
empty method is used in combination with Base::Bind to hold a 
reference to the instance inside a Base::Closure. This solution 
seems far from clean.

A clean solution would be to have VideoFrame be a pure interface 
and then use the decorator pattern to provide different 
implementations for "regular" instances that hold data and 
"wrapping" (decorator) instances that mostly delegate to a wrapped 
instance but allow for some modifications.

[1] https://cs.chromium.org/chromium/src/media/base/video_frame.cc?l=406&cl=GROK&gsn=WrapVideoFrame

 
Components: Internals>Media>Video
Status: Assigned (was: Untriaged)

Sign in to add a comment