| 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_SENDER_H264_VT_ENCODER_H_ | 5 #ifndef MEDIA_CAST_SENDER_H264_VT_ENCODER_H_ |
| 6 #define MEDIA_CAST_SENDER_H264_VT_ENCODER_H_ | 6 #define MEDIA_CAST_SENDER_H264_VT_ENCODER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const StatusChangeCallback& status_change_cb); | 41 const StatusChangeCallback& status_change_cb); |
| 42 ~H264VideoToolboxEncoder() final; | 42 ~H264VideoToolboxEncoder() final; |
| 43 | 43 |
| 44 // media::cast::VideoEncoder implementation | 44 // media::cast::VideoEncoder implementation |
| 45 bool EncodeVideoFrame( | 45 bool EncodeVideoFrame( |
| 46 const scoped_refptr<media::VideoFrame>& video_frame, | 46 const scoped_refptr<media::VideoFrame>& video_frame, |
| 47 const base::TimeTicks& reference_time, | 47 const base::TimeTicks& reference_time, |
| 48 const FrameEncodedCallback& frame_encoded_callback) final; | 48 const FrameEncodedCallback& frame_encoded_callback) final; |
| 49 void SetBitRate(int new_bit_rate) final; | 49 void SetBitRate(int new_bit_rate) final; |
| 50 void GenerateKeyFrame() final; | 50 void GenerateKeyFrame() final; |
| 51 scoped_ptr<VideoFrameFactory> CreateVideoFrameFactory() final; | 51 std::unique_ptr<VideoFrameFactory> CreateVideoFrameFactory() final; |
| 52 void EmitFrames() final; | 52 void EmitFrames() final; |
| 53 | 53 |
| 54 // base::PowerObserver | 54 // base::PowerObserver |
| 55 void OnSuspend() final; | 55 void OnSuspend() final; |
| 56 void OnResume() final; | 56 void OnResume() final; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 // VideoFrameFactory tied to the VideoToolbox encoder. | 59 // VideoFrameFactory tied to the VideoToolbox encoder. |
| 60 class VideoFrameFactoryImpl; | 60 class VideoFrameFactoryImpl; |
| 61 | 61 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // NOTE: Weak pointers must be invalidated before all other member variables. | 122 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 123 base::WeakPtrFactory<H264VideoToolboxEncoder> weak_factory_; | 123 base::WeakPtrFactory<H264VideoToolboxEncoder> weak_factory_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(H264VideoToolboxEncoder); | 125 DISALLOW_COPY_AND_ASSIGN(H264VideoToolboxEncoder); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 } // namespace cast | 128 } // namespace cast |
| 129 } // namespace media | 129 } // namespace media |
| 130 | 130 |
| 131 #endif // MEDIA_CAST_SENDER_H264_VT_ENCODER_H_ | 131 #endif // MEDIA_CAST_SENDER_H264_VT_ENCODER_H_ |
| OLD | NEW |