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

Issue 1204063005: Reland: Video Capture: extract storage info from pixel format in VideoCaptureFormat. (Closed)

Created:
5 years, 6 months ago by mcasas
Modified:
5 years, 6 months ago
Reviewers:
dcheng
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, miu+watch_chromium.org, posciak+watch_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland: Video Capture: extract storage info from pixel format in VideoCaptureFormat. Relanding https://codereview.chromium.org/1179323002/ with dcheng@ comments addressed. Original description --------------------------------------------------- Video Capture: extract storage info from pixel format in VideoCaptureFormat. Video Capture Devices treat both Texture and GpuMemoryBuffer as a VideoPixelFormat, but they are storage types. Moreover, this merging prevents capture devices from indicating a combination of Storage and Capture formats, i.e. Texture + ARGB, or GpuMemoryBuffer+YUY2. This CL separates both concepts and updates necessary call points. It also extends the translation VideoCaptureFormat --> VideoFrame in VideoCaptureDeviceClient and in VideoCaptureBufferPool. VideoCaptureBufferPool::ReserveOutputBuffer() also gets a param to specify the StorageType. This separation also allows for VideoCaptureBufferPool to operate using VideoPixel{Format, Storage} ISO VideoFrame types, which spares the constant conversion between ones and others. Test: All video captures working exactly as before. BUG=440843 -------------------------------------------------------------------------- TBR=dalecurtis@chromium.org, miu@chromium.org, hubbe@chromium.org Rationale: they already LGTM PS1 and the changes from there onwards are either cosmetic (git cl format, DCHECK_EQ(expected, actual)) or discussed with dcheng@. Committed: https://crrev.com/f1beda1770242bdc85112e1b2cd40b172de9cac0 Cr-Commit-Position: refs/heads/master@{#336208}

Patch Set 1 : Uploading verbatim original reverted CL #

Total comments: 6

Patch Set 2 : dcheng@ comments #

Total comments: 10

Patch Set 3 : dcheng@ second round of comments #

Total comments: 4

Patch Set 4 : dcheng@s https://codereview.chromium.org/1210743003/#ps20001 #

Total comments: 5

Patch Set 5 : dcheng@ nit on DCHECK_EQ(expected, actual) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+326 lines, -268 lines) Patch
M content/browser/media/capture/aura_window_capture_machine.cc View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_aura_unittest.cc View 1 chunk +8 lines, -2 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_unittest.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/media/media_internals_unittest.cc View 1 2 1 chunk +8 lines, -8 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool.h View 1 2 4 chunks +10 lines, -10 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool.cc View 1 2 9 chunks +24 lines, -67 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc View 1 2 5 chunks +27 lines, -14 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 1 2 12 chunks +33 lines, -25 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.h View 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.cc View 1 2 3 4 10 chunks +39 lines, -31 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/common/media/media_param_traits.cc View 1 2 3 3 chunks +18 lines, -23 lines 0 comments Download
M content/common/media/video_capture_messages.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M media/base/video_capture_types.h View 1 2 4 chunks +20 lines, -2 lines 0 comments Download
M media/base/video_capture_types.cc View 1 2 4 chunks +66 lines, -41 lines 0 comments Download
M media/capture/screen_capture_device_core.cc View 1 chunk +7 lines, -5 lines 0 comments Download
M media/capture/thread_safe_capture_oracle.cc View 2 chunks +10 lines, -6 lines 0 comments Download
M media/video/capture/fake_video_capture_device.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/video/capture/fake_video_capture_device.cc View 1 2 5 chunks +19 lines, -15 lines 0 comments Download
M media/video/capture/fake_video_capture_device_unittest.cc View 1 chunk +7 lines, -4 lines 0 comments Download
M media/video/capture/video_capture_device.h View 1 chunk +3 lines, -2 lines 0 comments Download
M media/video/capture/video_capture_device_unittest.cc View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (16 generated)
mcasas
dcheng@ PTAL https://codereview.chromium.org/1204063005/diff/1/content/browser/renderer_host/media/video_capture_device_client.cc File content/browser/renderer_host/media/video_capture_device_client.cc (right): https://codereview.chromium.org/1204063005/diff/1/content/browser/renderer_host/media/video_capture_device_client.cc#newcode219 content/browser/renderer_host/media/video_capture_device_client.cc:219: DCHECK_EQ(frame_format.pixel_storage, media::PIXEL_STORAGE_CPU); dcheng@: Same comment: this should ...
5 years, 6 months ago (2015-06-24 21:23:23 UTC) #2
dcheng
https://codereview.chromium.org/1204063005/diff/1/media/base/video_capture_types.h File media/base/video_capture_types.h (right): https://codereview.chromium.org/1204063005/diff/1/media/base/video_capture_types.h#newcode40 media/base/video_capture_types.h:40: enum VideoPixelStorage { On 2015/06/24 at 21:23:23, mcasas wrote: ...
5 years, 6 months ago (2015-06-24 21:41:48 UTC) #4
dcheng
https://codereview.chromium.org/1204063005/diff/40001/content/common/media/media_param_traits.cc File content/common/media/media_param_traits.cc (right): https://codereview.chromium.org/1204063005/diff/40001/content/common/media/media_param_traits.cc#newcode78 content/common/media/media_param_traits.cc:78: !ReadParam(m, iter, &r->pixel_storage)) On 2015/06/24 at 21:41:47, dcheng wrote: ...
5 years, 6 months ago (2015-06-24 21:43:33 UTC) #5
mcasas
(Still have some issues telling IPC how to Read() VideoPixelFormat and VideoPixelStorage) https://codereview.chromium.org/1204063005/diff/1/media/base/video_capture_types.h File media/base/video_capture_types.h ...
5 years, 6 months ago (2015-06-25 01:19:51 UTC) #17
dcheng
https://codereview.chromium.org/1204063005/diff/1/media/base/video_capture_types.h File media/base/video_capture_types.h (right): https://codereview.chromium.org/1204063005/diff/1/media/base/video_capture_types.h#newcode40 media/base/video_capture_types.h:40: enum VideoPixelStorage { On 2015/06/25 at 01:19:51, mcasas wrote: ...
5 years, 6 months ago (2015-06-25 02:02:18 UTC) #18
miu
On 2015/06/25 02:02:18, dcheng wrote: > https://codereview.chromium.org/1204063005/diff/1/media/base/video_capture_types.h > > > enum class VideoPixelStorage { > ...
5 years, 6 months ago (2015-06-25 03:05:27 UTC) #19
mcasas
dcheng@ took your changes in, thanks! PTAL miu@ after your comment the code was moved ...
5 years, 6 months ago (2015-06-25 13:51:03 UTC) #21
dcheng
https://codereview.chromium.org/1204063005/diff/290001/content/browser/renderer_host/media/video_capture_device_client.cc File content/browser/renderer_host/media/video_capture_device_client.cc (right): https://codereview.chromium.org/1204063005/diff/290001/content/browser/renderer_host/media/video_capture_device_client.cc#newcode548 content/browser/renderer_host/media/video_capture_device_client.cc:548: DCHECK_EQ(frame_format.pixel_storage, media::PIXEL_STORAGE_GPUMEMORYBUFFER); Nit: DCHECK_EQ(expected, actual) https://codereview.chromium.org/1204063005/diff/290001/media/base/video_capture_types.cc File media/base/video_capture_types.cc (right): ...
5 years, 6 months ago (2015-06-25 17:11:27 UTC) #22
dcheng
I meant to say: IPC changes LGTM with nits addressed.
5 years, 6 months ago (2015-06-25 17:11:45 UTC) #23
mcasas
https://codereview.chromium.org/1204063005/diff/290001/content/browser/renderer_host/media/video_capture_device_client.cc File content/browser/renderer_host/media/video_capture_device_client.cc (right): https://codereview.chromium.org/1204063005/diff/290001/content/browser/renderer_host/media/video_capture_device_client.cc#newcode548 content/browser/renderer_host/media/video_capture_device_client.cc:548: DCHECK_EQ(frame_format.pixel_storage, media::PIXEL_STORAGE_GPUMEMORYBUFFER); On 2015/06/25 17:11:27, dcheng wrote: > Nit: ...
5 years, 6 months ago (2015-06-25 18:23:03 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1204063005/310001
5 years, 6 months ago (2015-06-25 18:24:30 UTC) #27
dcheng
https://codereview.chromium.org/1204063005/diff/290001/media/base/video_capture_types.cc File media/base/video_capture_types.cc (right): https://codereview.chromium.org/1204063005/diff/290001/media/base/video_capture_types.cc#newcode45 media/base/video_capture_types.cc:45: (pixel_format >= 0) && (pixel_format < PIXEL_FORMAT_MAX) && On ...
5 years, 6 months ago (2015-06-25 18:24:38 UTC) #28
commit-bot: I haz the power
Committed patchset #5 (id:310001)
5 years, 6 months ago (2015-06-25 18:32:02 UTC) #29
commit-bot: I haz the power
5 years, 6 months ago (2015-06-25 18:33:08 UTC) #30
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/f1beda1770242bdc85112e1b2cd40b172de9cac0
Cr-Commit-Position: refs/heads/master@{#336208}

Powered by Google App Engine
This is Rietveld 408576698