OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ |
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 scoped_refptr<Impl> impl_; | 93 scoped_refptr<Impl> impl_; |
94 | 94 |
95 // We cannot immediately return error conditions to the WebRTC user of this | 95 // We cannot immediately return error conditions to the WebRTC user of this |
96 // class, as there is no error callback in the webrtc::VideoEncoder interface. | 96 // class, as there is no error callback in the webrtc::VideoEncoder interface. |
97 // Instead, we cache an error status here and return it the next time an | 97 // Instead, we cache an error status here and return it the next time an |
98 // interface entry point is called. | 98 // interface entry point is called. |
99 int32_t impl_status_; | 99 int32_t impl_status_; |
100 | 100 |
101 // Weak pointer factory for posting back VEA::Client notifications to | 101 // Weak pointer factory for posting back VEA::Client notifications to |
102 // RTCVideoEncoder. | 102 // RTCVideoEncoder. |
103 base::WeakPtrFactory<RTCVideoEncoder> weak_this_factory_; | 103 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 104 base::WeakPtrFactory<RTCVideoEncoder> weak_factory_; |
104 | 105 |
105 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder); | 106 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder); |
106 }; | 107 }; |
107 | 108 |
108 } // namespace content | 109 } // namespace content |
109 | 110 |
110 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ | 111 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ |
OLD | NEW |