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

Unified Diff: media/video/capture/win/video_capture_device_win.cc

Issue 512713002: VideoCaptureDeviceWin: correct some typos and docs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/win/video_capture_device_win.cc
diff --git a/media/video/capture/win/video_capture_device_win.cc b/media/video/capture/win/video_capture_device_win.cc
index a7d1f104cdc2bbaf16f2ec9849809dc77bf6cb4d..49748d8324d8b51aee41f5f635551678277b2772 100644
--- a/media/video/capture/win/video_capture_device_win.cc
+++ b/media/video/capture/win/video_capture_device_win.cc
@@ -53,7 +53,8 @@ HRESULT VideoCaptureDeviceWin::GetDeviceFilter(
continue;
}
- // Find the description or friendly name.
+ // Find the device via DevicePath, Description or FriendlyName, whichever is
+ // available first.
static const wchar_t* kPropertyNames[] = {
L"DevicePath", L"Description", L"FriendlyName"
};
@@ -101,20 +102,20 @@ bool VideoCaptureDeviceWin::PinMatchesCategory(IPin* pin, REFGUID category) {
return found;
}
-// Finds a IPin on a IBaseFilter given the direction an category.
+// Finds an IPin on an IBaseFilter given the direction and category.
// static
ScopedComPtr<IPin> VideoCaptureDeviceWin::GetPin(IBaseFilter* filter,
PIN_DIRECTION pin_dir,
REFGUID category) {
ScopedComPtr<IPin> pin;
- ScopedComPtr<IEnumPins> pin_emum;
- HRESULT hr = filter->EnumPins(pin_emum.Receive());
- if (pin_emum == NULL)
+ ScopedComPtr<IEnumPins> pin_enum;
+ HRESULT hr = filter->EnumPins(pin_enum.Receive());
+ if (pin_enum == NULL)
return pin;
// Get first unconnected pin.
- hr = pin_emum->Reset(); // set to first pin
- while ((hr = pin_emum->Next(1, pin.Receive(), NULL)) == S_OK) {
+ hr = pin_enum->Reset(); // set to first pin
+ while ((hr = pin_enum->Next(1, pin.Receive(), NULL)) == S_OK) {
PIN_DIRECTION this_pin_dir = static_cast<PIN_DIRECTION>(-1);
hr = pin->QueryDirection(&this_pin_dir);
if (pin_dir == this_pin_dir) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698