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

Side by Side Diff: media/capture/video/win/sink_filter_win.cc

Issue 2428263004: 16 bpp video stream capture, render and createImageBitmap(video) using (CPU) shared memory buffers (Closed)
Patch Set: Split webrtc_depth_capture_browsertest. Thanks phoglund@, Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/capture/video/win/sink_filter_win.h" 5 #include "media/capture/video/win/sink_filter_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/capture/video/win/sink_input_pin_win.h" 8 #include "media/capture/video/win/sink_input_pin_win.h"
9 9
10 namespace media { 10 namespace media {
11 11
12 // Define GUID for I420. This is the color format we would like to support but 12 // Define GUID for I420. This is the color format we would like to support but
13 // it is not defined in the DirectShow SDK. 13 // it is not defined in the DirectShow SDK.
14 // http://msdn.microsoft.com/en-us/library/dd757532.aspx 14 // http://msdn.microsoft.com/en-us/library/dd757532.aspx
15 // 30323449-0000-0010-8000-00AA00389B71. 15 // 30323449-0000-0010-8000-00AA00389B71.
16 GUID kMediaSubTypeI420 = {0x30323449, 16 GUID kMediaSubTypeI420 = {0x30323449,
17 0x0000, 17 0x0000,
18 0x0010, 18 0x0010,
19 {0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71}}; 19 {0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71}};
20 20
21 // UYVY synonym with BT709 color components, used in HD video. This variation 21 // UYVY synonym with BT709 color components, used in HD video. This variation
22 // might appear in non-USB capture cards and it's implemented as a normal YUV 22 // might appear in non-USB capture cards and it's implemented as a normal YUV
23 // pixel format with the characters HDYC encoded in the first array word. 23 // pixel format with the characters HDYC encoded in the first array word.
24 GUID kMediaSubTypeHDYC = {0x43594448, 24 GUID kMediaSubTypeHDYC = {0x43594448,
25 0x0000, 25 0x0000,
26 0x0010, 26 0x0010,
27 {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 27 {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
28 28
29 GUID kMediaSubTypeZ16 = {0x2036315a,
30 0x0000,
31 0x0010,
32 {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
33 GUID kMediaSubTypeINVZ = {0x5a564e49,
34 0x2d90,
35 0x4a58,
36 {0x92, 0x0b, 0x77, 0x3f, 0x1f, 0x2c, 0x55, 0x6b}};
37 GUID kMediaSubTypeY16 = {0x20363159,
38 0x0000,
39 0x0010,
40 {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
41
29 SinkFilterObserver::~SinkFilterObserver() { 42 SinkFilterObserver::~SinkFilterObserver() {
30 } 43 }
31 44
32 SinkFilter::SinkFilter(SinkFilterObserver* observer) : input_pin_(NULL) { 45 SinkFilter::SinkFilter(SinkFilterObserver* observer) : input_pin_(NULL) {
33 input_pin_ = new SinkInputPin(this, observer); 46 input_pin_ = new SinkInputPin(this, observer);
34 } 47 }
35 48
36 void SinkFilter::SetRequestedMediaFormat(VideoPixelFormat pixel_format, 49 void SinkFilter::SetRequestedMediaFormat(VideoPixelFormat pixel_format,
37 float frame_rate, 50 float frame_rate,
38 const BITMAPINFOHEADER& info_header) { 51 const BITMAPINFOHEADER& info_header) {
(...skipping 11 matching lines...) Expand all
50 STDMETHODIMP SinkFilter::GetClassID(CLSID* clsid) { 63 STDMETHODIMP SinkFilter::GetClassID(CLSID* clsid) {
51 *clsid = __uuidof(SinkFilter); 64 *clsid = __uuidof(SinkFilter);
52 return S_OK; 65 return S_OK;
53 } 66 }
54 67
55 SinkFilter::~SinkFilter() { 68 SinkFilter::~SinkFilter() {
56 input_pin_->SetOwner(NULL); 69 input_pin_->SetOwner(NULL);
57 } 70 }
58 71
59 } // namespace media 72 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698