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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 class WebRtcVideoSendStream : public sigslot::has_slots<> { | 244 class WebRtcVideoSendStream : public sigslot::has_slots<> { |
245 public: | 245 public: |
246 WebRtcVideoSendStream( | 246 WebRtcVideoSendStream( |
247 webrtc::Call* call, | 247 webrtc::Call* call, |
248 const StreamParams& sp, | 248 const StreamParams& sp, |
249 const webrtc::VideoSendStream::Config& config, | 249 const webrtc::VideoSendStream::Config& config, |
250 WebRtcVideoEncoderFactory* external_encoder_factory, | 250 WebRtcVideoEncoderFactory* external_encoder_factory, |
251 const VideoOptions& options, | 251 const VideoOptions& options, |
252 int max_bitrate_bps, | 252 int max_bitrate_bps, |
253 const rtc::Optional<VideoCodecSettings>& codec_settings, | 253 const rtc::Optional<VideoCodecSettings>& codec_settings, |
254 const std::vector<webrtc::RtpExtension>& rtp_extensions); | 254 const std::vector<webrtc::RtpExtension>& rtp_extensions, |
255 const VideoSendParameters& send_params); | |
255 ~WebRtcVideoSendStream(); | 256 ~WebRtcVideoSendStream(); |
256 | 257 |
257 void SetOptions(const VideoOptions& options); | 258 void SetOptions(const VideoOptions& options); |
258 void SetCodec(const VideoCodecSettings& codec); | 259 void SetCodec(const VideoCodecSettings& codec); |
259 void SetRtpExtensions( | 260 void SetRtpExtensions( |
260 const std::vector<webrtc::RtpExtension>& rtp_extensions); | 261 const std::vector<webrtc::RtpExtension>& rtp_extensions); |
262 // TODO(pbos): Move logic from SetCodec/SetRtpExtensions/etc. | |
263 // into this method. Currently this method only sets the RTCP mode. | |
pbos-webrtc
2015/12/03 00:15:49
Since when is TODO(foo) the person who you want to
| |
264 void SetSendParameters(const VideoSendParameters& send_params); | |
261 | 265 |
262 void InputFrame(VideoCapturer* capturer, const VideoFrame* frame); | 266 void InputFrame(VideoCapturer* capturer, const VideoFrame* frame); |
263 bool SetCapturer(VideoCapturer* capturer); | 267 bool SetCapturer(VideoCapturer* capturer); |
264 bool SetVideoFormat(const VideoFormat& format); | 268 bool SetVideoFormat(const VideoFormat& format); |
265 void MuteStream(bool mute); | 269 void MuteStream(bool mute); |
266 bool DisconnectCapturer(); | 270 bool DisconnectCapturer(); |
267 | 271 |
268 void SetApplyRotation(bool apply_rotation); | 272 void SetApplyRotation(bool apply_rotation); |
269 | 273 |
270 void Start(); | 274 void Start(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
397 bool default_stream, | 401 bool default_stream, |
398 const std::vector<VideoCodecSettings>& recv_codecs); | 402 const std::vector<VideoCodecSettings>& recv_codecs); |
399 ~WebRtcVideoReceiveStream(); | 403 ~WebRtcVideoReceiveStream(); |
400 | 404 |
401 const std::vector<uint32_t>& GetSsrcs() const; | 405 const std::vector<uint32_t>& GetSsrcs() const; |
402 | 406 |
403 void SetLocalSsrc(uint32_t local_ssrc); | 407 void SetLocalSsrc(uint32_t local_ssrc); |
404 void SetNackAndRemb(bool nack_enabled, bool remb_enabled); | 408 void SetNackAndRemb(bool nack_enabled, bool remb_enabled); |
405 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); | 409 void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs); |
406 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); | 410 void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions); |
411 // TODO(pbos): Move logic from SetRecvCodecs/SetRtpExtensions/etc. | |
412 // into this method. Currently this method only sets the RTCP mode. | |
413 void SetRecvParameters(const VideoRecvParameters& recv_params); | |
407 | 414 |
408 void RenderFrame(const webrtc::VideoFrame& frame, | 415 void RenderFrame(const webrtc::VideoFrame& frame, |
409 int time_to_render_ms) override; | 416 int time_to_render_ms) override; |
410 bool IsTextureSupported() const override; | 417 bool IsTextureSupported() const override; |
411 bool IsDefaultStream() const; | 418 bool IsDefaultStream() const; |
412 | 419 |
413 void SetRenderer(cricket::VideoRenderer* renderer); | 420 void SetRenderer(cricket::VideoRenderer* renderer); |
414 cricket::VideoRenderer* GetRenderer(); | 421 cricket::VideoRenderer* GetRenderer(); |
415 | 422 |
416 VideoReceiverInfo GetVideoReceiverInfo(); | 423 VideoReceiverInfo GetVideoReceiverInfo(); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
514 | 521 |
515 rtc::Optional<VideoCodecSettings> send_codec_; | 522 rtc::Optional<VideoCodecSettings> send_codec_; |
516 std::vector<webrtc::RtpExtension> send_rtp_extensions_; | 523 std::vector<webrtc::RtpExtension> send_rtp_extensions_; |
517 | 524 |
518 WebRtcVideoEncoderFactory* const external_encoder_factory_; | 525 WebRtcVideoEncoderFactory* const external_encoder_factory_; |
519 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 526 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
520 std::vector<VideoCodecSettings> recv_codecs_; | 527 std::vector<VideoCodecSettings> recv_codecs_; |
521 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 528 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
522 webrtc::Call::Config::BitrateConfig bitrate_config_; | 529 webrtc::Call::Config::BitrateConfig bitrate_config_; |
523 VideoOptions options_; | 530 VideoOptions options_; |
531 // TODO(pbos): Don't duplicate information between | |
532 // send_params/recv_params, rtp_extensions, options, etc. | |
533 VideoSendParameters send_params_; | |
534 VideoRecvParameters recv_params_; | |
524 }; | 535 }; |
525 | 536 |
526 } // namespace cricket | 537 } // namespace cricket |
527 | 538 |
528 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ | 539 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |