| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 | 10 |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 : width(176), | 332 : width(176), |
| 333 height(144), | 333 height(144), |
| 334 rotation(webrtc::kVideoRotation_0), | 334 rotation(webrtc::kVideoRotation_0), |
| 335 is_texture(false) {} | 335 is_texture(false) {} |
| 336 int width; | 336 int width; |
| 337 int height; | 337 int height; |
| 338 webrtc::VideoRotation rotation; | 338 webrtc::VideoRotation rotation; |
| 339 bool is_texture; | 339 bool is_texture; |
| 340 }; | 340 }; |
| 341 | 341 |
| 342 union VideoEncoderSettings { | |
| 343 webrtc::VideoCodecH264 h264; | |
| 344 webrtc::VideoCodecVP8 vp8; | |
| 345 webrtc::VideoCodecVP9 vp9; | |
| 346 }; | |
| 347 | |
| 348 static std::vector<webrtc::VideoStream> CreateVideoStreams( | 342 static std::vector<webrtc::VideoStream> CreateVideoStreams( |
| 349 const VideoCodec& codec, | 343 const VideoCodec& codec, |
| 350 const VideoOptions& options, | 344 const VideoOptions& options, |
| 351 int max_bitrate_bps, | 345 int max_bitrate_bps, |
| 352 size_t num_streams); | 346 size_t num_streams); |
| 353 static std::vector<webrtc::VideoStream> CreateSimulcastVideoStreams( | 347 static std::vector<webrtc::VideoStream> CreateSimulcastVideoStreams( |
| 354 const VideoCodec& codec, | 348 const VideoCodec& codec, |
| 355 const VideoOptions& options, | 349 const VideoOptions& options, |
| 356 int max_bitrate_bps, | 350 int max_bitrate_bps, |
| 357 size_t num_streams); | 351 size_t num_streams); |
| 358 | 352 |
| 359 void* ConfigureVideoEncoderSettings(const VideoCodec& codec) | 353 rtc::scoped_refptr<webrtc::VideoEncoderConfig::EncoderSpecificSettings> |
| 354 ConfigureVideoEncoderSettings(const VideoCodec& codec) |
| 360 EXCLUSIVE_LOCKS_REQUIRED(lock_); | 355 EXCLUSIVE_LOCKS_REQUIRED(lock_); |
| 361 | 356 |
| 362 AllocatedEncoder CreateVideoEncoder(const VideoCodec& codec) | 357 AllocatedEncoder CreateVideoEncoder(const VideoCodec& codec) |
| 363 EXCLUSIVE_LOCKS_REQUIRED(lock_); | 358 EXCLUSIVE_LOCKS_REQUIRED(lock_); |
| 364 void DestroyVideoEncoder(AllocatedEncoder* encoder) | 359 void DestroyVideoEncoder(AllocatedEncoder* encoder) |
| 365 EXCLUSIVE_LOCKS_REQUIRED(lock_); | 360 EXCLUSIVE_LOCKS_REQUIRED(lock_); |
| 366 void SetCodec(const VideoCodecSettings& codec) | 361 void SetCodec(const VideoCodecSettings& codec) |
| 367 EXCLUSIVE_LOCKS_REQUIRED(lock_); | 362 EXCLUSIVE_LOCKS_REQUIRED(lock_); |
| 368 void RecreateWebRtcStream() EXCLUSIVE_LOCKS_REQUIRED(lock_); | 363 void RecreateWebRtcStream() EXCLUSIVE_LOCKS_REQUIRED(lock_); |
| 369 webrtc::VideoEncoderConfig CreateVideoEncoderConfig( | 364 webrtc::VideoEncoderConfig CreateVideoEncoderConfig( |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 // such as codecs, header extensions, and the global bitrate limit for the | 401 // such as codecs, header extensions, and the global bitrate limit for the |
| 407 // entire channel. | 402 // entire channel. |
| 408 VideoSendStreamParameters parameters_ GUARDED_BY(lock_); | 403 VideoSendStreamParameters parameters_ GUARDED_BY(lock_); |
| 409 // Contains settings that are unique for each stream, such as max_bitrate. | 404 // Contains settings that are unique for each stream, such as max_bitrate. |
| 410 // Does *not* contain codecs, however. | 405 // Does *not* contain codecs, however. |
| 411 // TODO(skvlad): Move ssrcs_ and ssrc_groups_ into rtp_parameters_. | 406 // TODO(skvlad): Move ssrcs_ and ssrc_groups_ into rtp_parameters_. |
| 412 // TODO(skvlad): Combine parameters_ and rtp_parameters_ once we have only | 407 // TODO(skvlad): Combine parameters_ and rtp_parameters_ once we have only |
| 413 // one stream per MediaChannel. | 408 // one stream per MediaChannel. |
| 414 webrtc::RtpParameters rtp_parameters_ GUARDED_BY(lock_); | 409 webrtc::RtpParameters rtp_parameters_ GUARDED_BY(lock_); |
| 415 bool pending_encoder_reconfiguration_ GUARDED_BY(lock_); | 410 bool pending_encoder_reconfiguration_ GUARDED_BY(lock_); |
| 416 VideoEncoderSettings encoder_settings_ GUARDED_BY(lock_); | |
| 417 AllocatedEncoder allocated_encoder_ GUARDED_BY(lock_); | 411 AllocatedEncoder allocated_encoder_ GUARDED_BY(lock_); |
| 418 VideoFrameInfo last_frame_info_ GUARDED_BY(lock_); | 412 VideoFrameInfo last_frame_info_ GUARDED_BY(lock_); |
| 419 | 413 |
| 420 bool sending_ GUARDED_BY(lock_); | 414 bool sending_ GUARDED_BY(lock_); |
| 421 | 415 |
| 422 // The timestamp of the last frame received | 416 // The timestamp of the last frame received |
| 423 // Used to generate timestamp for the black frame when source is removed | 417 // Used to generate timestamp for the black frame when source is removed |
| 424 int64_t last_frame_timestamp_us_ GUARDED_BY(lock_); | 418 int64_t last_frame_timestamp_us_ GUARDED_BY(lock_); |
| 425 }; | 419 }; |
| 426 | 420 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 VideoSendParameters send_params_; | 559 VideoSendParameters send_params_; |
| 566 VideoOptions default_send_options_; | 560 VideoOptions default_send_options_; |
| 567 VideoRecvParameters recv_params_; | 561 VideoRecvParameters recv_params_; |
| 568 bool red_disabled_by_remote_side_; | 562 bool red_disabled_by_remote_side_; |
| 569 int64_t last_stats_log_ms_; | 563 int64_t last_stats_log_ms_; |
| 570 }; | 564 }; |
| 571 | 565 |
| 572 } // namespace cricket | 566 } // namespace cricket |
| 573 | 567 |
| 574 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 568 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
| OLD | NEW |