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

Side by Side Diff: webrtc/modules/video_capture/windows/sink_filter_ds.cc

Issue 2620303003: Replace ASSERT by RTC_DCHECK in all non-test code. (Closed)
Patch Set: Address final nits. Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « webrtc/media/engine/fakewebrtcvoiceengine.h ('k') | webrtc/p2p/base/asyncstuntcpsocket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/video_capture/windows/sink_filter_ds.h" 11 #include "webrtc/modules/video_capture/windows/sink_filter_ds.h"
12 12
13 #include "webrtc/base/checks.h"
13 #include "webrtc/base/platform_thread.h" 14 #include "webrtc/base/platform_thread.h"
14 #include "webrtc/modules/video_capture/windows/help_functions_ds.h" 15 #include "webrtc/modules/video_capture/windows/help_functions_ds.h"
15 #include "webrtc/system_wrappers/include/trace.h" 16 #include "webrtc/system_wrappers/include/trace.h"
16 17
17 #include <Dvdmedia.h> // VIDEOINFOHEADER2 18 #include <Dvdmedia.h> // VIDEOINFOHEADER2
18 #include <initguid.h> 19 #include <initguid.h>
19 20
20 #define DELETE_RESET(p) { delete (p) ; (p) = NULL ;} 21 #define DELETE_RESET(p) { delete (p) ; (p) = NULL ;}
21 22
22 DEFINE_GUID(CLSID_SINKFILTER, 0x88cdbbdc, 0xa73b, 0x4afa, 0xac, 0xbf, 0x15, 0xd5 , 23 DEFINE_GUID(CLSID_SINKFILTER, 0x88cdbbdc, 0xa73b, 0x4afa, 0xac, 0xbf, 0x15, 0xd5 ,
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 331
331 rtc::SetCurrentThreadName("webrtc_video_capture"); 332 rtc::SetCurrentThreadName("webrtc_video_capture");
332 } 333 }
333 334
334 reinterpret_cast <CaptureSinkFilter *>(m_pFilter)->LockReceive(); 335 reinterpret_cast <CaptureSinkFilter *>(m_pFilter)->LockReceive();
335 hr = CBaseInputPin::Receive (pIMediaSample); 336 hr = CBaseInputPin::Receive (pIMediaSample);
336 337
337 if (SUCCEEDED (hr)) 338 if (SUCCEEDED (hr))
338 { 339 {
339 const LONG length = pIMediaSample->GetActualDataLength(); 340 const LONG length = pIMediaSample->GetActualDataLength();
340 ASSERT(length >= 0); 341 RTC_DCHECK(length >= 0);
341 342
342 unsigned char* pBuffer = NULL; 343 unsigned char* pBuffer = NULL;
343 if(S_OK != pIMediaSample->GetPointer(&pBuffer)) 344 if(S_OK != pIMediaSample->GetPointer(&pBuffer))
344 { 345 {
345 reinterpret_cast <CaptureSinkFilter *>(m_pFilter)->UnlockReceive(); 346 reinterpret_cast <CaptureSinkFilter *>(m_pFilter)->UnlockReceive();
346 return S_FALSE; 347 return S_FALSE;
347 } 348 }
348 349
349 // NOTE: filter unlocked within Send call 350 // NOTE: filter unlocked within Send call
350 reinterpret_cast <CaptureSinkFilter *> (m_pFilter)->ProcessCapturedFrame ( 351 reinterpret_cast <CaptureSinkFilter *> (m_pFilter)->ProcessCapturedFrame (
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 } 507 }
507 508
508 STDMETHODIMP CaptureSinkFilter::GetClassID( OUT CLSID * pCLSID ) 509 STDMETHODIMP CaptureSinkFilter::GetClassID( OUT CLSID * pCLSID )
509 { 510 {
510 (* pCLSID) = CLSID_SINKFILTER; 511 (* pCLSID) = CLSID_SINKFILTER;
511 return S_OK; 512 return S_OK;
512 } 513 }
513 514
514 } // namespace videocapturemodule 515 } // namespace videocapturemodule
515 } // namespace webrtc 516 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/engine/fakewebrtcvoiceengine.h ('k') | webrtc/p2p/base/asyncstuntcpsocket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698