| 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_EXTERNAL_VIDEO_ENCODER_H_ | 5 #ifndef MEDIA_CAST_SENDER_EXTERNAL_VIDEO_ENCODER_H_ |
| 6 #define MEDIA_CAST_SENDER_EXTERNAL_VIDEO_ENCODER_H_ | 6 #define MEDIA_CAST_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 14 matching lines...) Expand all Loading... |
| 25 const scoped_refptr<CastEnvironment>& cast_environment, | 25 const scoped_refptr<CastEnvironment>& cast_environment, |
| 26 const VideoSenderConfig& video_config, | 26 const VideoSenderConfig& video_config, |
| 27 const gfx::Size& frame_size, | 27 const gfx::Size& frame_size, |
| 28 const CastInitializationCallback& initialization_cb, | 28 const CastInitializationCallback& initialization_cb, |
| 29 const CreateVideoEncodeAcceleratorCallback& create_vea_cb, | 29 const CreateVideoEncodeAcceleratorCallback& create_vea_cb, |
| 30 const CreateVideoEncodeMemoryCallback& create_video_encode_memory_cb); | 30 const CreateVideoEncodeMemoryCallback& create_video_encode_memory_cb); |
| 31 | 31 |
| 32 ~ExternalVideoEncoder() override; | 32 ~ExternalVideoEncoder() override; |
| 33 | 33 |
| 34 // VideoEncoder implementation. | 34 // VideoEncoder implementation. |
| 35 bool CanEncodeVariedFrameSizes() const override; |
| 35 bool EncodeVideoFrame( | 36 bool EncodeVideoFrame( |
| 36 const scoped_refptr<media::VideoFrame>& video_frame, | 37 const scoped_refptr<media::VideoFrame>& video_frame, |
| 37 const base::TimeTicks& reference_time, | 38 const base::TimeTicks& reference_time, |
| 38 const FrameEncodedCallback& frame_encoded_callback) override; | 39 const FrameEncodedCallback& frame_encoded_callback) override; |
| 39 void SetBitRate(int new_bit_rate) override; | 40 void SetBitRate(int new_bit_rate) override; |
| 40 void GenerateKeyFrame() override; | 41 void GenerateKeyFrame() override; |
| 41 void LatestFrameIdToReference(uint32 frame_id) override; | 42 void LatestFrameIdToReference(uint32 frame_id) override; |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 class VEAClientImpl; | 45 class VEAClientImpl; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 65 // NOTE: Weak pointers must be invalidated before all other member variables. | 66 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 66 base::WeakPtrFactory<ExternalVideoEncoder> weak_factory_; | 67 base::WeakPtrFactory<ExternalVideoEncoder> weak_factory_; |
| 67 | 68 |
| 68 DISALLOW_COPY_AND_ASSIGN(ExternalVideoEncoder); | 69 DISALLOW_COPY_AND_ASSIGN(ExternalVideoEncoder); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace cast | 72 } // namespace cast |
| 72 } // namespace media | 73 } // namespace media |
| 73 | 74 |
| 74 #endif // MEDIA_CAST_SENDER_EXTERNAL_VIDEO_ENCODER_H_ | 75 #endif // MEDIA_CAST_SENDER_EXTERNAL_VIDEO_ENCODER_H_ |
| OLD | NEW |