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

Issue 688423003: [Cast] VideoFrameFactory interface to vend frames with encoder affinity. (Closed)

Created:
6 years, 1 month ago by jfroy
Modified:
6 years, 1 month ago
CC:
chromium-reviews, hclam+watch_chromium.org, imcheng+watch_chromium.org, hguihot+watch_chromium.org, jasonroberts+watch_google.com, avayvod+watch_chromium.org, pwestin+watch_google.com, feature-media-reviews_chromium.org, miu+watch_chromium.org, hubbe+watch_chromium.org, mikhal+watch_chromium.org, Sergey Ulanov, tommi (sloooow) - chröme
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Cast] VideoFrameFactory interface to vend frames with encoder affinity. Certain encoder implementations may provide memory buffers with special properties in which clients are expected to write input frames. This patch introduces a simple new interface allowing a VideoEncoder to provide a factory object from which clients may obtain input video frames. Encoder implementations are free to return null, in which case VideoSender provides a default implementation based on VideoFramePool. The upcoming VideoToolbox encoder implementation for OS X and iOS will provide a custom implementation of this interface that will use the encoder's underlying CVPixelBufferPool. The buffers vended by that pool are backed by memory shared between the encoding process and the daemon interfacing with the hardware video encoder. Clients that write into these buffers will avoid a full frame copy of every input frame, which is a substantial saving in memory bandwidth and latency for 1080p@60 video. BUG=429057 R=miu, hclam, hubbe Committed: https://crrev.com/dcff178ab70511a4135895bc092ad3b871a0ae3d Cr-Commit-Position: refs/heads/master@{#304973}

Patch Set 1 #

Patch Set 2 : Include new video frame pool files to BUILD.gn #

Patch Set 3 : Add VideoFramePool to media_for_cast_ios. #

Patch Set 4 : Rebase #

Total comments: 23

Patch Set 5 : Reworked implementation based on review feedback. #

Total comments: 1

Patch Set 6 : Add bool SupportsCreateOptimizedFrame() #

Total comments: 1

Patch Set 7 : Default impl of CreateVideoFrameFactory in VideoEncoder. #

Patch Set 8 : Final patch cleanup. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -8 lines) Patch
M media/cast/BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M media/cast/cast.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M media/cast/cast_sender.h View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M media/cast/cast_sender_impl.cc View 1 2 3 4 5 5 chunks +22 lines, -4 lines 0 comments Download
M media/cast/sender/video_encoder.h View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
A + media/cast/sender/video_encoder.cc View 1 2 3 4 5 6 1 chunk +5 lines, -4 lines 0 comments Download
A media/cast/sender/video_frame_factory.h View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
M media/cast/sender/video_sender.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M media/cast/sender/video_sender.cc View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M media/cast/sender/video_sender_unittest.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (5 generated)
jfroy
This patch adds infrastructure to allow video encoders to vend optimal buffers into which input ...
6 years, 1 month ago (2014-10-31 02:03:55 UTC) #1
jfroy
6 years, 1 month ago (2014-11-14 18:21:08 UTC) #3
DaleCurtis
This is all cast/ code, so it's really up to you guys to figure out ...
6 years, 1 month ago (2014-11-14 19:09:48 UTC) #4
jfroy
On 2014/11/14 19:09:48, DaleCurtis wrote: > This is all cast/ code, so it's really up ...
6 years, 1 month ago (2014-11-14 19:22:31 UTC) #5
hubbe
On 2014/11/14 18:21:08, jfroy wrote: I think it's good, I'll let hclam review it as ...
6 years, 1 month ago (2014-11-14 19:22:54 UTC) #6
jfroy
On 2014/11/14 19:22:54, hubbe wrote: > On 2014/11/14 18:21:08, jfroy wrote: > > I think ...
6 years, 1 month ago (2014-11-14 19:31:46 UTC) #7
Alpha Left Google
I see some issues related to threading. I think it is dangerous to create a ...
6 years, 1 month ago (2014-11-17 20:23:14 UTC) #9
hubbe
On 2014/11/14 19:31:46, jfroy wrote: > On 2014/11/14 19:22:54, hubbe wrote: > > On 2014/11/14 ...
6 years, 1 month ago (2014-11-17 20:28:22 UTC) #10
jfroy
On 2014/11/17 20:28:22, hubbe wrote: > On 2014/11/14 19:31:46, jfroy wrote: > > On 2014/11/14 ...
6 years, 1 month ago (2014-11-17 20:48:47 UTC) #11
jfroy
On 2014/11/17 20:23:14, Alpha wrote: > I see some issues related to threading. I think ...
6 years, 1 month ago (2014-11-17 21:23:06 UTC) #12
Alpha Left Google
One more question: are you going to implement a new VideoEncoder? https://codereview.chromium.org/688423003/diff/60001/media/cast/cast_sender.h File media/cast/cast_sender.h (right): ...
6 years, 1 month ago (2014-11-18 02:57:58 UTC) #13
jfroy
On 2014/11/18 02:57:58, Alpha wrote: > One more question: are you going to implement a ...
6 years, 1 month ago (2014-11-18 18:03:59 UTC) #14
jfroy
I uploaded a reworked implementation based on review feedback. The factory is not ref counted ...
6 years, 1 month ago (2014-11-18 22:48:52 UTC) #15
Alpha Left Google
https://codereview.chromium.org/688423003/diff/80001/media/cast/cast_sender.h File media/cast/cast_sender.h (right): https://codereview.chromium.org/688423003/diff/80001/media/cast/cast_sender.h#newcode42 media/cast/cast_sender.h:42: virtual scoped_refptr<VideoFrame> CreateFrame(base::TimeDelta timestamp) = 0; This looks good. ...
6 years, 1 month ago (2014-11-19 19:22:19 UTC) #16
jfroy
I added bool SupportsCreateOptimizedFrame() and renamed CreateFrame() to CreateOptimizedFrame(). I also clarified the documentation some ...
6 years, 1 month ago (2014-11-19 21:56:49 UTC) #17
Alpha Left Google
lgtm
6 years, 1 month ago (2014-11-19 23:20:21 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/688423003/100001
6 years, 1 month ago (2014-11-19 23:22:57 UTC) #20
miu
One thing I don't quite understand: Typically, the media::VideoFrame instances passed to Cast are wrappers ...
6 years, 1 month ago (2014-11-19 23:24:47 UTC) #21
jfroy
On 2014/11/19 23:24:47, miu wrote: > One thing I don't quite understand: Typically, the media::VideoFrame ...
6 years, 1 month ago (2014-11-19 23:49:10 UTC) #23
miu
lgtm On 2014/11/19 23:49:10, jfroy wrote: > On 2014/11/19 23:24:47, miu wrote: > > does ...
6 years, 1 month ago (2014-11-20 00:00:25 UTC) #24
jfroy
On 2014/11/20 00:00:25, miu wrote: > lgtm > > On 2014/11/19 23:49:10, jfroy wrote: > ...
6 years, 1 month ago (2014-11-20 00:10:18 UTC) #25
jfroy
Default impl of CreateVideoFrameFactory in VideoEncoder.
6 years, 1 month ago (2014-11-20 02:16:46 UTC) #26
jfroy
Final patch cleanup.
6 years, 1 month ago (2014-11-20 02:24:38 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/688423003/140001
6 years, 1 month ago (2014-11-20 02:27:13 UTC) #29
commit-bot: I haz the power
Committed patchset #8 (id:140001)
6 years, 1 month ago (2014-11-20 04:31:49 UTC) #30
commit-bot: I haz the power
6 years, 1 month ago (2014-11-20 04:32:24 UTC) #31
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/dcff178ab70511a4135895bc092ad3b871a0ae3d
Cr-Commit-Position: refs/heads/master@{#304973}

Powered by Google App Engine
This is Rietveld 408576698