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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 // media::cast::VideoEncoder implementation | 30 // media::cast::VideoEncoder implementation |
31 bool EncodeVideoFrame( | 31 bool EncodeVideoFrame( |
32 const scoped_refptr<media::VideoFrame>& video_frame, | 32 const scoped_refptr<media::VideoFrame>& video_frame, |
33 const base::TimeTicks& reference_time, | 33 const base::TimeTicks& reference_time, |
34 const FrameEncodedCallback& frame_encoded_callback) override; | 34 const FrameEncodedCallback& frame_encoded_callback) override; |
35 void SetBitRate(int new_bit_rate) override; | 35 void SetBitRate(int new_bit_rate) override; |
36 void GenerateKeyFrame() override; | 36 void GenerateKeyFrame() override; |
37 void LatestFrameIdToReference(uint32 frame_id) override; | 37 void LatestFrameIdToReference(uint32 frame_id) override; |
38 scoped_ptr<VideoFrameFactory> CreateVideoFrameFactory() override; | 38 scoped_ptr<VideoFrameFactory> CreateVideoFrameFactory() override; |
| 39 void EmitFrames() override; |
39 | 40 |
40 private: | 41 private: |
41 // Initialize the compression session. | 42 // Initialize the compression session. |
42 bool Initialize(const VideoSenderConfig& video_config); | 43 bool Initialize(const VideoSenderConfig& video_config); |
43 | 44 |
44 // Configure the compression session. | 45 // Configure the compression session. |
45 void ConfigureSession(const VideoSenderConfig& video_config); | 46 void ConfigureSession(const VideoSenderConfig& video_config); |
46 | 47 |
47 // Teardown the encoder. | 48 // Teardown the encoder. |
48 void Teardown(); | 49 void Teardown(); |
(...skipping 28 matching lines...) Expand all Loading... |
77 // Force next frame to be a keyframe. | 78 // Force next frame to be a keyframe. |
78 bool encode_next_frame_as_keyframe_; | 79 bool encode_next_frame_as_keyframe_; |
79 | 80 |
80 DISALLOW_COPY_AND_ASSIGN(H264VideoToolboxEncoder); | 81 DISALLOW_COPY_AND_ASSIGN(H264VideoToolboxEncoder); |
81 }; | 82 }; |
82 | 83 |
83 } // namespace cast | 84 } // namespace cast |
84 } // namespace media | 85 } // namespace media |
85 | 86 |
86 #endif // MEDIA_CAST_SENDER_H264_VT_ENCODER_H_ | 87 #endif // MEDIA_CAST_SENDER_H264_VT_ENCODER_H_ |
OLD | NEW |