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

Issue 48113011: Remove media::VideoFrame from media::VideoCaptureDevice::Client interface (Closed)

Created:
7 years, 1 month ago by sheu
Modified:
7 years, 1 month ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, apatrick_chromium, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org, ncarter (slow), Pawel Osciak
Base URL:
https://chromium.googlesource.com/chromium/src.git@git-svn
Visibility:
Public.

Description

Remove media::VideoFrame from media::VideoCaptureDevice::Client interface The VideoCaptureDevice::Client interface will have to return buffers that are not wrapped in media::VideoFrame objects, for upcoming compatibility with capturing to texture mailboxes. Implement this by making the ReserveForProducer() entry point return a new Client::Buffer object that caches the memory and size of the reservation. The lifetime of the reservation is managed by the lifetime of the Buffer object, not by the media::VideoFrame that we previously returned. Pursuant to this, VideoCaptureBufferPool is changed to remove entry points that return pre-constructed media::VideoFrame objects. The responsibility for managing the rotation/letterboxing state of buffers is also moved out of VideoCaptureBufferPool into its user, VideoCaptureController. Also: media::VideoFrame::WrapExternalSharedMemory() is renamed to media::VideoFrame::WrapExternalPackedMemory(), as not all users will expect to wrap shared memory. media::VideoFrame::PlaneAllocationSize() is added to facilitate querying the planar size of just one plane of a packed allocation. BUG=269312 TEST=local build, run apprtc on CrOS snow, unittests and apprtc on desktop Linux Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=236279

Patch Set 1 : 4969ee91 Initial. #

Total comments: 12

Patch Set 2 : 5b80a5e9 scoped_refptr-ization. #

Total comments: 18

Patch Set 3 : 60d13335 Export buffer_id #

Total comments: 2

Patch Set 4 : 6f1243c3 DCHECK, rebase. #

Total comments: 8

Patch Set 5 : 8c5b9836 Nits. #

Total comments: 6

Patch Set 6 : 64f89b12 More nits. #

Patch Set 7 : d0fa6fbe Rebase, final. #

Patch Set 8 : ffdbaeb83 Trybot failures. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+635 lines, -466 lines) Patch
M content/browser/renderer_host/media/desktop_capture_device_unittest.cc View 1 2 3 chunks +12 lines, -9 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool.h View 1 2 3 chunks +4 lines, -20 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool.cc View 1 2 3 4 3 chunks +44 lines, -78 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc View 1 2 3 chunks +110 lines, -91 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.cc View 1 2 3 4 5 6 7 12 chunks +152 lines, -93 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 1 2 7 chunks +86 lines, -55 lines 0 comments Download
M content/browser/renderer_host/media/web_contents_video_capture_device.cc View 1 2 7 chunks +33 lines, -16 lines 0 comments Download
M content/browser/renderer_host/media/web_contents_video_capture_device_unittest.cc View 1 2 3 4 5 6 7 3 chunks +38 lines, -14 lines 0 comments Download
M content/common/gpu/media/gpu_video_encode_accelerator.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/rtc_video_encoder.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/video_capture_impl.cc View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M media/base/video_frame.h View 1 2 2 chunks +13 lines, -6 lines 0 comments Download
M media/base/video_frame.cc View 1 2 3 4 5 3 chunks +43 lines, -11 lines 0 comments Download
M media/video/capture/android/video_capture_device_android.cc View 1 2 3 1 chunk +7 lines, -3 lines 0 comments Download
M media/video/capture/linux/video_capture_device_linux.cc View 1 2 2 chunks +10 lines, -5 lines 0 comments Download
M media/video/capture/video_capture_device.h View 1 2 3 chunks +44 lines, -31 lines 0 comments Download
M media/video/capture/video_capture_device_unittest.cc View 1 2 4 chunks +22 lines, -23 lines 0 comments Download
M media/video/capture/win/video_capture_device_mf_win.cc View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M media/video/capture/win/video_capture_device_win.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
sheu
I'm gonna add on wjia@ when we know this is the direction we want to ...
7 years, 1 month ago (2013-10-29 00:22:22 UTC) #1
ncarter (slow)
From a high level this looks like the right approach. The two points I'm not ...
7 years, 1 month ago (2013-10-29 18:42:16 UTC) #2
sheu
7 years, 1 month ago (2013-10-31 01:09:15 UTC) #3
sheu
Updated, PTAL. I had to refcount stuff :-( https://chromiumcodereview.appspot.com/48113011/diff/70001/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc File content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc (right): https://chromiumcodereview.appspot.com/48113011/diff/70001/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc#newcode21 content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc:21: class ...
7 years, 1 month ago (2013-11-05 20:02:09 UTC) #4
ncarter (slow)
Early comment, not quite done reviewing yet ... https://codereview.chromium.org/48113011/diff/170001/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): https://codereview.chromium.org/48113011/diff/170001/content/browser/renderer_host/media/video_capture_controller.cc#newcode505 content/browser/renderer_host/media/video_capture_controller.cc:505: buffer_id ...
7 years, 1 month ago (2013-11-07 02:25:28 UTC) #5
sheu
jiayl@, nick@: PTAL. I've got a rebase on this on top of the latest change ...
7 years, 1 month ago (2013-11-08 19:26:32 UTC) #6
jiayl
https://chromiumcodereview.appspot.com/48113011/diff/170001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://chromiumcodereview.appspot.com/48113011/diff/170001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode134 content/browser/renderer_host/media/video_capture_buffer_pool.cc:134: // largest one that's not big enough, in case ...
7 years, 1 month ago (2013-11-08 22:16:45 UTC) #7
sheu
Comments addressed. I'll upload a version rebased against jiayl@'s CL once that lands. PTAL: jiayl@, ...
7 years, 1 month ago (2013-11-09 00:59:29 UTC) #8
ncarter (slow)
https://chromiumcodereview.appspot.com/48113011/diff/170001/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): https://chromiumcodereview.appspot.com/48113011/diff/170001/content/browser/renderer_host/media/video_capture_controller.cc#newcode521 content/browser/renderer_host/media/video_capture_controller.cc:521: // TODO(jiayl): Generalize the |rotation| mechanism. On 2013/11/09 00:59:30, ...
7 years, 1 month ago (2013-11-09 01:10:34 UTC) #9
ncarter (slow)
Only one comment now; I'm good with this otherwise. Let me know when the merged ...
7 years, 1 month ago (2013-11-09 01:26:32 UTC) #10
sheu
Updated and rebased. PTAL https://chromiumcodereview.appspot.com/48113011/diff/170001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://chromiumcodereview.appspot.com/48113011/diff/170001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode129 content/browser/renderer_host/media/video_capture_buffer_pool.cc:129: // RecognizeReservedBuffer() can have some ...
7 years, 1 month ago (2013-11-11 22:37:43 UTC) #11
jiayl
LGTM. You will need a media owner's approval, e.g. fischman
7 years, 1 month ago (2013-11-12 19:23:48 UTC) #12
ncarter (slow)
LGTM. Really nice work. https://codereview.chromium.org/48113011/diff/360001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://codereview.chromium.org/48113011/diff/360001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode54 content/browser/renderer_host/media/video_capture_buffer_pool.cc:54: } Should probably add a ...
7 years, 1 month ago (2013-11-12 21:14:21 UTC) #13
sheu
wjia@: PTAL at... pretty much everything. Thanks! https://codereview.chromium.org/48113011/diff/360001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://codereview.chromium.org/48113011/diff/360001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode54 content/browser/renderer_host/media/video_capture_buffer_pool.cc:54: } On ...
7 years, 1 month ago (2013-11-18 22:42:10 UTC) #14
wjia(left Chromium)
Nice! https://codereview.chromium.org/48113011/diff/470001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://codereview.chromium.org/48113011/diff/470001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode122 content/browser/renderer_host/media/video_capture_buffer_pool.cc:122: for (BufferMap::iterator it = buffers_.begin(); it != buffers_.end(); ...
7 years, 1 month ago (2013-11-19 01:47:35 UTC) #15
sheu
Updated. PTAL fischman@: PTAL at media/base/*. https://codereview.chromium.org/48113011/diff/470001/content/browser/renderer_host/media/video_capture_buffer_pool.cc File content/browser/renderer_host/media/video_capture_buffer_pool.cc (right): https://codereview.chromium.org/48113011/diff/470001/content/browser/renderer_host/media/video_capture_buffer_pool.cc#newcode122 content/browser/renderer_host/media/video_capture_buffer_pool.cc:122: for (BufferMap::iterator it ...
7 years, 1 month ago (2013-11-19 20:28:16 UTC) #16
sheu
7 years, 1 month ago (2013-11-19 20:28:35 UTC) #17
sheu
fischman@: PTAL at media/base/*
7 years, 1 month ago (2013-11-19 20:29:03 UTC) #18
Ami GONE FROM CHROMIUM
LGTM % nits for media/base. https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.cc File media/base/video_frame.cc (right): https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.cc#newcode272 media/base/video_frame.cc:272: RoundUp(coded_size.width(), 2) * RoundUp(coded_size.height(), ...
7 years, 1 month ago (2013-11-19 21:01:51 UTC) #19
sheu
https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.h File media/base/video_frame.h (right): https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.h#newcode201 media/base/video_frame.h:201: size_t plane, On 2013/11/19 21:01:52, Ami Fischman wrote: > ...
7 years, 1 month ago (2013-11-19 21:30:26 UTC) #20
ncarter (slow)
https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.cc File media/base/video_frame.cc (right): https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.cc#newcode272 media/base/video_frame.cc:272: RoundUp(coded_size.width(), 2) * RoundUp(coded_size.height(), 2); On 2013/11/19 21:01:52, Ami ...
7 years, 1 month ago (2013-11-19 21:32:22 UTC) #21
sheu
https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.cc File media/base/video_frame.cc (right): https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.cc#newcode272 media/base/video_frame.cc:272: RoundUp(coded_size.width(), 2) * RoundUp(coded_size.height(), 2); On 2013/11/19 21:32:22, ncarter ...
7 years, 1 month ago (2013-11-19 21:35:15 UTC) #22
ncarter (slow)
https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.h File media/base/video_frame.h (right): https://codereview.chromium.org/48113011/diff/560001/media/base/video_frame.h#newcode201 media/base/video_frame.h:201: size_t plane, On 2013/11/19 21:30:27, sheu wrote: > On ...
7 years, 1 month ago (2013-11-19 21:36:41 UTC) #23
wjia(left Chromium)
lgtm
7 years, 1 month ago (2013-11-19 22:30:37 UTC) #24
Ami GONE FROM CHROMIUM
SGTM On Tue, Nov 19, 2013 at 1:36 PM, <nick@chromium.org> wrote: > > https://codereview.chromium.org/48113011/diff/560001/ > ...
7 years, 1 month ago (2013-11-19 22:33:26 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/48113011/690001
7 years, 1 month ago (2013-11-19 23:44:18 UTC) #26
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=37121
7 years, 1 month ago (2013-11-20 02:39:54 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sheu@chromium.org/48113011/820001
7 years, 1 month ago (2013-11-20 17:33:08 UTC) #28
commit-bot: I haz the power
7 years, 1 month ago (2013-11-20 20:47:19 UTC) #29
Message was sent while issue was closed.
Change committed as 236279

Powered by Google App Engine
This is Rietveld 408576698