OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 * | 9 * |
10 * WEBRTC VP8 wrapper interface | 10 * WEBRTC VP8 wrapper interface |
(...skipping 14 matching lines...) Expand all Loading... | |
25 #include "webrtc/common_video/include/i420_buffer_pool.h" | 25 #include "webrtc/common_video/include/i420_buffer_pool.h" |
26 #include "webrtc/modules/video_coding/include/video_codec_interface.h" | 26 #include "webrtc/modules/video_coding/include/video_codec_interface.h" |
27 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" | 27 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" |
28 #include "webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h" | 28 #include "webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h" |
29 #include "webrtc/modules/video_coding/utility/frame_dropper.h" | 29 #include "webrtc/modules/video_coding/utility/frame_dropper.h" |
30 #include "webrtc/modules/video_coding/utility/quality_scaler.h" | 30 #include "webrtc/modules/video_coding/utility/quality_scaler.h" |
31 #include "webrtc/video_frame.h" | 31 #include "webrtc/video_frame.h" |
32 | 32 |
33 namespace webrtc { | 33 namespace webrtc { |
34 | 34 |
35 class SimulcastState; | |
35 class TemporalLayers; | 36 class TemporalLayers; |
36 | 37 |
37 class VP8EncoderImpl : public VP8Encoder { | 38 class VP8EncoderImpl : public VP8Encoder { |
38 public: | 39 public: |
39 VP8EncoderImpl(); | 40 VP8EncoderImpl(); |
40 | 41 |
41 virtual ~VP8EncoderImpl(); | 42 virtual ~VP8EncoderImpl(); |
42 | 43 |
43 virtual int Release(); | 44 virtual int Release(); |
44 | 45 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 | 80 |
80 void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, | 81 void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, |
81 const vpx_codec_cx_pkt& pkt, | 82 const vpx_codec_cx_pkt& pkt, |
82 int stream_idx, | 83 int stream_idx, |
83 uint32_t timestamp, | 84 uint32_t timestamp, |
84 bool only_predicting_from_key_frame); | 85 bool only_predicting_from_key_frame); |
85 | 86 |
86 int GetEncodedPartitions(const VideoFrame& input_image, | 87 int GetEncodedPartitions(const VideoFrame& input_image, |
87 bool only_predicting_from_key_frame); | 88 bool only_predicting_from_key_frame); |
88 | 89 |
89 // Set the stream state for stream |stream_idx|. | |
90 void SetStreamState(bool send_stream, int stream_idx); | |
91 | |
92 uint32_t MaxIntraTarget(uint32_t optimal_buffer_size); | 90 uint32_t MaxIntraTarget(uint32_t optimal_buffer_size); |
93 | 91 |
94 EncodedImageCallback* encoded_complete_callback_; | 92 EncodedImageCallback* encoded_complete_callback_; |
95 VideoCodec codec_; | 93 VideoCodec codec_; |
96 bool inited_; | 94 bool inited_; |
97 int64_t timestamp_; | 95 int64_t timestamp_; |
98 bool feedback_mode_; | 96 bool feedback_mode_; |
99 int qp_max_; | 97 int qp_max_; |
100 int cpu_speed_default_; | 98 int cpu_speed_default_; |
101 uint32_t rc_max_intra_target_; | 99 uint32_t rc_max_intra_target_; |
102 int token_partitions_; | 100 int token_partitions_; |
103 ReferencePictureSelection rps_; | 101 ReferencePictureSelection rps_; |
104 std::vector<TemporalLayers*> temporal_layers_; | 102 std::vector<TemporalLayers*> temporal_layers_; |
103 std::unique_ptr<SimulcastState> simulcast_state_; | |
pbos-webrtc
2016/04/29 21:23:27
stack allocate please
| |
105 bool down_scale_requested_; | 104 bool down_scale_requested_; |
106 uint32_t down_scale_bitrate_; | 105 uint32_t down_scale_bitrate_; |
107 FrameDropper tl0_frame_dropper_; | |
108 FrameDropper tl1_frame_dropper_; | |
109 std::vector<uint16_t> picture_id_; | 106 std::vector<uint16_t> picture_id_; |
110 std::vector<int> last_key_frame_picture_id_; | 107 std::vector<int> last_key_frame_picture_id_; |
111 std::vector<bool> key_frame_request_; | |
112 std::vector<bool> send_stream_; | |
113 std::vector<int> cpu_speed_; | 108 std::vector<int> cpu_speed_; |
114 std::vector<vpx_image_t> raw_images_; | 109 std::vector<vpx_image_t> raw_images_; |
115 std::vector<EncodedImage> encoded_images_; | 110 std::vector<EncodedImage> encoded_images_; |
116 std::vector<vpx_codec_ctx_t> encoders_; | 111 std::vector<vpx_codec_ctx_t> encoders_; |
117 std::vector<vpx_codec_enc_cfg_t> configurations_; | 112 std::vector<vpx_codec_enc_cfg_t> configurations_; |
118 std::vector<vpx_rational_t> downsampling_factors_; | 113 std::vector<vpx_rational_t> downsampling_factors_; |
119 QualityScaler quality_scaler_; | 114 QualityScaler quality_scaler_; |
120 bool quality_scaler_enabled_; | 115 bool quality_scaler_enabled_; |
121 }; // end of VP8EncoderImpl class | 116 }; // end of VP8EncoderImpl class |
122 | 117 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
162 int image_format_; | 157 int image_format_; |
163 vpx_ref_frame_t* ref_frame_; | 158 vpx_ref_frame_t* ref_frame_; |
164 int propagation_cnt_; | 159 int propagation_cnt_; |
165 int last_frame_width_; | 160 int last_frame_width_; |
166 int last_frame_height_; | 161 int last_frame_height_; |
167 bool key_frame_required_; | 162 bool key_frame_required_; |
168 }; // end of VP8DecoderImpl class | 163 }; // end of VP8DecoderImpl class |
169 } // namespace webrtc | 164 } // namespace webrtc |
170 | 165 |
171 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ | 166 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ |
OLD | NEW |