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 "base/mac/scoped_cftyperef.h" | 8 #include "base/mac/scoped_cftyperef.h" |
9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
10 #include "media/base/mac/videotoolbox_glue.h" | 10 #include "media/base/mac/videotoolbox_glue.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 public: | 24 public: |
25 H264VideoToolboxEncoder( | 25 H264VideoToolboxEncoder( |
26 const scoped_refptr<CastEnvironment>& cast_environment, | 26 const scoped_refptr<CastEnvironment>& cast_environment, |
27 const VideoSenderConfig& video_config, | 27 const VideoSenderConfig& video_config, |
28 const gfx::Size& frame_size, | 28 const gfx::Size& frame_size, |
29 const CastInitializationCallback& initialization_cb); | 29 const CastInitializationCallback& initialization_cb); |
30 ~H264VideoToolboxEncoder() override; | 30 ~H264VideoToolboxEncoder() override; |
31 | 31 |
32 // media::cast::VideoEncoder implementation | 32 // media::cast::VideoEncoder implementation |
| 33 bool CanEncodeVariedFrameSizes() const override; |
33 bool EncodeVideoFrame( | 34 bool EncodeVideoFrame( |
34 const scoped_refptr<media::VideoFrame>& video_frame, | 35 const scoped_refptr<media::VideoFrame>& video_frame, |
35 const base::TimeTicks& reference_time, | 36 const base::TimeTicks& reference_time, |
36 const FrameEncodedCallback& frame_encoded_callback) override; | 37 const FrameEncodedCallback& frame_encoded_callback) override; |
37 void SetBitRate(int new_bit_rate) override; | 38 void SetBitRate(int new_bit_rate) override; |
38 void GenerateKeyFrame() override; | 39 void GenerateKeyFrame() override; |
39 void LatestFrameIdToReference(uint32 frame_id) override; | 40 void LatestFrameIdToReference(uint32 frame_id) override; |
40 scoped_ptr<VideoFrameFactory> CreateVideoFrameFactory() override; | 41 scoped_ptr<VideoFrameFactory> CreateVideoFrameFactory() override; |
41 void EmitFrames() override; | 42 void EmitFrames() override; |
42 | 43 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Force next frame to be a keyframe. | 82 // Force next frame to be a keyframe. |
82 bool encode_next_frame_as_keyframe_; | 83 bool encode_next_frame_as_keyframe_; |
83 | 84 |
84 DISALLOW_COPY_AND_ASSIGN(H264VideoToolboxEncoder); | 85 DISALLOW_COPY_AND_ASSIGN(H264VideoToolboxEncoder); |
85 }; | 86 }; |
86 | 87 |
87 } // namespace cast | 88 } // namespace cast |
88 } // namespace media | 89 } // namespace media |
89 | 90 |
90 #endif // MEDIA_CAST_SENDER_H264_VT_ENCODER_H_ | 91 #endif // MEDIA_CAST_SENDER_H264_VT_ENCODER_H_ |
OLD | NEW |