OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 */ |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 kH264DecoderEventError = 1, | 43 kH264DecoderEventError = 1, |
44 kH264DecoderEventMax = 16, | 44 kH264DecoderEventMax = 16, |
45 }; | 45 }; |
46 | 46 |
47 #if defined(WEBRTC_INITIALIZE_FFMPEG) | 47 #if defined(WEBRTC_INITIALIZE_FFMPEG) |
48 | 48 |
49 rtc::CriticalSection ffmpeg_init_lock; | 49 rtc::CriticalSection ffmpeg_init_lock; |
50 bool ffmpeg_initialized = false; | 50 bool ffmpeg_initialized = false; |
51 | 51 |
52 // Called by FFmpeg to do mutex operations if initialized using | 52 // Called by FFmpeg to do mutex operations if initialized using |
53 // |InitializeFFmpeg|. | 53 // |InitializeFFmpeg|. Disabling thread safety analysis because void** does not |
| 54 // play nicely with thread_annotations.h macros. |
54 int LockManagerOperation(void** lock, AVLockOp op) | 55 int LockManagerOperation(void** lock, AVLockOp op) |
55 EXCLUSIVE_LOCK_FUNCTION() UNLOCK_FUNCTION() { | 56 NO_THREAD_SAFETY_ANALYSIS { |
56 switch (op) { | 57 switch (op) { |
57 case AV_LOCK_CREATE: | 58 case AV_LOCK_CREATE: |
58 *lock = new rtc::CriticalSection(); | 59 *lock = new rtc::CriticalSection(); |
59 return 0; | 60 return 0; |
60 case AV_LOCK_OBTAIN: | 61 case AV_LOCK_OBTAIN: |
61 static_cast<rtc::CriticalSection*>(*lock)->Enter(); | 62 static_cast<rtc::CriticalSection*>(*lock)->Enter(); |
62 return 0; | 63 return 0; |
63 case AV_LOCK_RELEASE: | 64 case AV_LOCK_RELEASE: |
64 static_cast<rtc::CriticalSection*>(*lock)->Leave(); | 65 static_cast<rtc::CriticalSection*>(*lock)->Leave(); |
65 return 0; | 66 return 0; |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 void H264DecoderImpl::ReportError() { | 417 void H264DecoderImpl::ReportError() { |
417 if (has_reported_error_) | 418 if (has_reported_error_) |
418 return; | 419 return; |
419 RTC_HISTOGRAM_ENUMERATION("WebRTC.Video.H264DecoderImpl.Event", | 420 RTC_HISTOGRAM_ENUMERATION("WebRTC.Video.H264DecoderImpl.Event", |
420 kH264DecoderEventError, | 421 kH264DecoderEventError, |
421 kH264DecoderEventMax); | 422 kH264DecoderEventMax); |
422 has_reported_error_ = true; | 423 has_reported_error_ = true; |
423 } | 424 } |
424 | 425 |
425 } // namespace webrtc | 426 } // namespace webrtc |
OLD | NEW |