OLD | NEW |
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/video/capture/win/sink_filter_win.h" | 5 #include "media/video/capture/win/sink_filter_win.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "media/video/capture/win/sink_input_pin_win.h" | 8 #include "media/video/capture/win/sink_input_pin_win.h" |
9 | 9 |
10 // Define GUID for I420. This is the color format we would like to support but | 10 // Define GUID for I420. This is the color format we would like to support but |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 SinkFilter::SinkFilter(SinkFilterObserver* observer) | 22 SinkFilter::SinkFilter(SinkFilterObserver* observer) |
23 : input_pin_(NULL) { | 23 : input_pin_(NULL) { |
24 input_pin_ = new SinkInputPin(this, observer); | 24 input_pin_ = new SinkInputPin(this, observer); |
25 } | 25 } |
26 | 26 |
27 SinkFilter::~SinkFilter() { | 27 SinkFilter::~SinkFilter() { |
28 input_pin_->SetOwner(NULL); | 28 input_pin_->SetOwner(NULL); |
29 } | 29 } |
30 | 30 |
31 void SinkFilter::SetRequestedMediaCapability( | 31 void SinkFilter::SetRequestedMediaFormat(const VideoCaptureFormat& format) { |
32 const VideoCaptureCapability& capability) { | 32 input_pin_->SetRequestedMediaFormat(format); |
33 input_pin_->SetRequestedMediaCapability(capability); | |
34 } | 33 } |
35 | 34 |
36 const VideoCaptureCapability& SinkFilter::ResultingCapability() { | 35 const VideoCaptureFormat& SinkFilter::ResultingFormat() { |
37 return input_pin_->ResultingCapability(); | 36 return input_pin_->ResultingFormat(); |
38 } | 37 } |
39 | 38 |
40 size_t SinkFilter::NoOfPins() { | 39 size_t SinkFilter::NoOfPins() { |
41 return 1; | 40 return 1; |
42 } | 41 } |
43 | 42 |
44 IPin* SinkFilter::GetPin(int index) { | 43 IPin* SinkFilter::GetPin(int index) { |
45 return index == 0 ? input_pin_ : NULL; | 44 return index == 0 ? input_pin_ : NULL; |
46 } | 45 } |
47 | 46 |
48 STDMETHODIMP SinkFilter::GetClassID(CLSID* clsid) { | 47 STDMETHODIMP SinkFilter::GetClassID(CLSID* clsid) { |
49 *clsid = __uuidof(SinkFilter); | 48 *clsid = __uuidof(SinkFilter); |
50 return S_OK; | 49 return S_OK; |
51 } | 50 } |
52 | 51 |
53 } // namespace media | 52 } // namespace media |
OLD | NEW |