Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Unified Diff: media/cast/sender/video_frame_factory.h

Issue 1100643002: [cast] Handle frame size changes directly in the VideoToolbox encoder (v2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set the video frame factory's pool to null before destroying the compression session. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/sender/video_encoder_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/video_frame_factory.h
diff --git a/media/cast/sender/video_frame_factory.h b/media/cast/sender/video_frame_factory.h
index d55deb7cd32d76eae84c8b2ad601fd0b61f50996..f6b5889d3eafccfa96eb62b3eaa1a6b307dc3918 100644
--- a/media/cast/sender/video_frame_factory.h
+++ b/media/cast/sender/video_frame_factory.h
@@ -27,9 +27,7 @@ namespace cast {
// Clients are responsible for serialzing access to a |VideoFrameFactory|.
// Generally speaking, it is expected that a client will be using these objects
// from a rendering thread or callback (which may execute on different threads
-// but never concurrently with itself). Forcing every implementation to take a
-// lock, even with no contention, is an unnecessary cost, especially on mobile
-// platforms.
+// but never concurrently with itself).
class VideoFrameFactory {
public:
virtual ~VideoFrameFactory() {}
@@ -39,7 +37,10 @@ class VideoFrameFactory {
// with the encoder. The format is guaranteed to be I420 or NV12.
//
// This can transiently return null if the encoder is not yet initialized or
- // is re-initializing.
+ // is re-initializing. Note however that if an encoder does support optimized
+ // frames, its |VideoFrameFactory| must eventually return frames. In practice,
+ // this means that |MaybeCreateFrame| must somehow signal the encoder to
+ // perform whatever initialization is needed to eventually produce frames.
virtual scoped_refptr<VideoFrame> MaybeCreateFrame(
const gfx::Size& frame_size, base::TimeDelta timestamp) = 0;
};
« no previous file with comments | « media/cast/sender/video_encoder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698