| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 261 |
| 262 static std::string CodecSettingsVectorToString( | 262 static std::string CodecSettingsVectorToString( |
| 263 const std::vector<VideoCodecSettings>& codecs); | 263 const std::vector<VideoCodecSettings>& codecs); |
| 264 | 264 |
| 265 // Wrapper for the sender part, this is where the capturer is connected and | 265 // Wrapper for the sender part, this is where the capturer is connected and |
| 266 // frames are then converted from cricket frames to webrtc frames. | 266 // frames are then converted from cricket frames to webrtc frames. |
| 267 class WebRtcVideoSendStream : public sigslot::has_slots<> { | 267 class WebRtcVideoSendStream : public sigslot::has_slots<> { |
| 268 public: | 268 public: |
| 269 WebRtcVideoSendStream( | 269 WebRtcVideoSendStream( |
| 270 webrtc::Call* call, | 270 webrtc::Call* call, |
| 271 const StreamParams& sp, |
| 272 const webrtc::VideoSendStream::Config& config, |
| 271 WebRtcVideoEncoderFactory* external_encoder_factory, | 273 WebRtcVideoEncoderFactory* external_encoder_factory, |
| 272 const VideoOptions& options, | 274 const VideoOptions& options, |
| 273 int max_bitrate_bps, | 275 int max_bitrate_bps, |
| 274 const Settable<VideoCodecSettings>& codec_settings, | 276 const Settable<VideoCodecSettings>& codec_settings, |
| 275 const StreamParams& sp, | |
| 276 const std::vector<webrtc::RtpExtension>& rtp_extensions); | 277 const std::vector<webrtc::RtpExtension>& rtp_extensions); |
| 277 ~WebRtcVideoSendStream(); | 278 ~WebRtcVideoSendStream(); |
| 278 | 279 |
| 279 void SetOptions(const VideoOptions& options); | 280 void SetOptions(const VideoOptions& options); |
| 280 void SetCodec(const VideoCodecSettings& codec); | 281 void SetCodec(const VideoCodecSettings& codec); |
| 281 void SetRtpExtensions( | 282 void SetRtpExtensions( |
| 282 const std::vector<webrtc::RtpExtension>& rtp_extensions); | 283 const std::vector<webrtc::RtpExtension>& rtp_extensions); |
| 283 | 284 |
| 284 void InputFrame(VideoCapturer* capturer, const VideoFrame* frame); | 285 void InputFrame(VideoCapturer* capturer, const VideoFrame* frame); |
| 285 bool SetCapturer(VideoCapturer* capturer); | 286 bool SetCapturer(VideoCapturer* capturer); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 }; | 408 }; |
| 408 | 409 |
| 409 // Wrapper for the receiver part, contains configs etc. that are needed to | 410 // Wrapper for the receiver part, contains configs etc. that are needed to |
| 410 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper | 411 // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper |
| 411 // between webrtc::VideoRenderer and cricket::VideoRenderer. | 412 // between webrtc::VideoRenderer and cricket::VideoRenderer. |
| 412 class WebRtcVideoReceiveStream : public webrtc::VideoRenderer { | 413 class WebRtcVideoReceiveStream : public webrtc::VideoRenderer { |
| 413 public: | 414 public: |
| 414 WebRtcVideoReceiveStream( | 415 WebRtcVideoReceiveStream( |
| 415 webrtc::Call* call, | 416 webrtc::Call* call, |
| 416 const StreamParams& sp, | 417 const StreamParams& sp, |
| 418 const webrtc::VideoReceiveStream::Config& config, |
| 417 WebRtcVideoDecoderFactory* external_decoder_factory, | 419 WebRtcVideoDecoderFactory* external_decoder_factory, |
| 418 bool default_stream, | 420 bool default_stream, |
| 419 const webrtc::VideoReceiveStream::Config& config, | |
| 420 const std::vector<VideoCodecSettings>& recv_codecs); | 421 const std::vector<VideoCodecSettings>& recv_codecs); |
| 421 ~WebRtcVideoReceiveStream(); | 422 ~WebRtcVideoReceiveStream(); |
| 422 | 423 |
| 423 const std::vector<uint32>& GetSsrcs() const; | 424 const std::vector<uint32>& GetSsrcs() const; |
| 424 | 425 |
| 425 void SetLocalSsrc(uint32_t local_ssrc); | 426 void SetLocalSsrc(uint32_t local_ssrc); |
| 426 void SetNackAndRemb(bool nack_enabled, bool remb_enabled); | 427 void SetNackAndRemb(bool nack_enabled, bool remb_enabled); |
| 427 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); | 428 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); |
| 428 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); | 429 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); |
| 429 | 430 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 541 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
| 541 std::vector<VideoCodecSettings> recv_codecs_; | 542 std::vector<VideoCodecSettings> recv_codecs_; |
| 542 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 543 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 543 webrtc::Call::Config::BitrateConfig bitrate_config_; | 544 webrtc::Call::Config::BitrateConfig bitrate_config_; |
| 544 VideoOptions options_; | 545 VideoOptions options_; |
| 545 }; | 546 }; |
| 546 | 547 |
| 547 } // namespace cricket | 548 } // namespace cricket |
| 548 | 549 |
| 549 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ | 550 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ |
| OLD | NEW |