OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MEDIA_CAST_VIDEO_SENDER_EXTERNAL_VIDEO_ENCODER_H_ | 5 #ifndef MEDIA_CAST_VIDEO_SENDER_EXTERNAL_VIDEO_ENCODER_H_ |
6 #define MEDIA_CAST_VIDEO_SENDER_EXTERNAL_VIDEO_ENCODER_H_ | 6 #define MEDIA_CAST_VIDEO_SENDER_EXTERNAL_VIDEO_ENCODER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "media/cast/cast_config.h" | 10 #include "media/cast/cast_config.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 bool encoder_active_; | 64 bool encoder_active_; |
65 bool key_frame_requested_; | 65 bool key_frame_requested_; |
66 bool skip_next_frame_; | 66 bool skip_next_frame_; |
67 int skip_count_; | 67 int skip_count_; |
68 | 68 |
69 scoped_refptr<LocalVideoEncodeAcceleratorClient> video_accelerator_client_; | 69 scoped_refptr<LocalVideoEncodeAcceleratorClient> video_accelerator_client_; |
70 scoped_refptr<base::SingleThreadTaskRunner> encoder_task_runner_; | 70 scoped_refptr<base::SingleThreadTaskRunner> encoder_task_runner_; |
71 | 71 |
72 // Weak pointer factory for posting back LocalVideoEncodeAcceleratorClient | 72 // Weak pointer factory for posting back LocalVideoEncodeAcceleratorClient |
73 // notifications to ExternalVideoEncoder. | 73 // notifications to ExternalVideoEncoder. |
| 74 // NOTE: Weak pointers must be invalidated before all other member variables. |
74 base::WeakPtrFactory<ExternalVideoEncoder> weak_factory_; | 75 base::WeakPtrFactory<ExternalVideoEncoder> weak_factory_; |
75 | 76 |
76 DISALLOW_COPY_AND_ASSIGN(ExternalVideoEncoder); | 77 DISALLOW_COPY_AND_ASSIGN(ExternalVideoEncoder); |
77 }; | 78 }; |
78 | 79 |
79 } // namespace cast | 80 } // namespace cast |
80 } // namespace media | 81 } // namespace media |
81 | 82 |
82 #endif // MEDIA_CAST_VIDEO_SENDER_EXTERNAL_VIDEO_ENCODER_H_ | 83 #endif // MEDIA_CAST_VIDEO_SENDER_EXTERNAL_VIDEO_ENCODER_H_ |
OLD | NEW |