Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: webrtc/pc/channel.h

Issue 1788583004: Enable setting the maximum bitrate limit in RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 bool CanInsertDtmf(); 353 bool CanInsertDtmf();
354 // Send and/or play a DTMF |event| according to the |flags|. 354 // Send and/or play a DTMF |event| according to the |flags|.
355 // The DTMF out-of-band signal will be used on sending. 355 // The DTMF out-of-band signal will be used on sending.
356 // The |ssrc| should be either 0 or a valid send stream ssrc. 356 // The |ssrc| should be either 0 or a valid send stream ssrc.
357 // The valid value for the |event| are 0 which corresponding to DTMF 357 // The valid value for the |event| are 0 which corresponding to DTMF
358 // event 0-9, *, #, A-D. 358 // event 0-9, *, #, A-D.
359 bool InsertDtmf(uint32_t ssrc, int event_code, int duration); 359 bool InsertDtmf(uint32_t ssrc, int event_code, int duration);
360 bool SetOutputVolume(uint32_t ssrc, double volume); 360 bool SetOutputVolume(uint32_t ssrc, double volume);
361 void SetRawAudioSink(uint32_t ssrc, 361 void SetRawAudioSink(uint32_t ssrc,
362 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink); 362 rtc::scoped_ptr<webrtc::AudioSinkInterface> sink);
363 webrtc::RTCRtpParameters GetRtpParameters(uint32_t ssrc);
364 bool SetRtpParameters(uint32_t ssrc,
365 const webrtc::RTCRtpParameters& parameters);
363 366
364 // Get statistics about the current media session. 367 // Get statistics about the current media session.
365 bool GetStats(VoiceMediaInfo* stats); 368 bool GetStats(VoiceMediaInfo* stats);
366 369
367 // Monitoring functions 370 // Monitoring functions
368 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&> 371 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&>
369 SignalConnectionMonitor; 372 SignalConnectionMonitor;
370 373
371 void StartMediaMonitor(int cms); 374 void StartMediaMonitor(int cms);
372 void StopMediaMonitor(); 375 void StopMediaMonitor();
373 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor; 376 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor;
374 377
375 void StartAudioMonitor(int cms); 378 void StartAudioMonitor(int cms);
376 void StopAudioMonitor(); 379 void StopAudioMonitor();
377 bool IsAudioMonitorRunning() const; 380 bool IsAudioMonitorRunning() const;
378 sigslot::signal2<VoiceChannel*, const AudioInfo&> SignalAudioMonitor; 381 sigslot::signal2<VoiceChannel*, const AudioInfo&> SignalAudioMonitor;
379 382
380 int GetInputLevel_w(); 383 int GetInputLevel_w();
381 int GetOutputLevel_w(); 384 int GetOutputLevel_w();
382 void GetActiveStreams_w(AudioInfo::StreamList* actives); 385 void GetActiveStreams_w(AudioInfo::StreamList* actives);
386 bool GetRtpParameters_w(uint32_t ssrc, webrtc::RTCRtpParameters* parameters);
387 bool SetRtpParameters_w(uint32_t ssrc, webrtc::RTCRtpParameters parameters);
383 388
384 private: 389 private:
385 // overrides from BaseChannel 390 // overrides from BaseChannel
386 virtual void OnChannelRead(TransportChannel* channel, 391 virtual void OnChannelRead(TransportChannel* channel,
387 const char* data, size_t len, 392 const char* data, size_t len,
388 const rtc::PacketTime& packet_time, 393 const rtc::PacketTime& packet_time,
389 int flags); 394 int flags);
390 virtual void ChangeState(); 395 virtual void ChangeState();
391 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); 396 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc);
392 virtual bool SetLocalContent_w(const MediaContentDescription* content, 397 virtual bool SetLocalContent_w(const MediaContentDescription* content,
393 ContentAction action, 398 ContentAction action,
394 std::string* error_desc); 399 std::string* error_desc);
395 virtual bool SetRemoteContent_w(const MediaContentDescription* content, 400 virtual bool SetRemoteContent_w(const MediaContentDescription* content,
396 ContentAction action, 401 ContentAction action,
397 std::string* error_desc); 402 std::string* error_desc);
398 void HandleEarlyMediaTimeout(); 403 void HandleEarlyMediaTimeout();
399 bool InsertDtmf_w(uint32_t ssrc, int event, int duration); 404 bool InsertDtmf_w(uint32_t ssrc, int event, int duration);
400 bool SetOutputVolume_w(uint32_t ssrc, double volume); 405 bool SetOutputVolume_w(uint32_t ssrc, double volume);
401 bool GetStats_w(VoiceMediaInfo* stats); 406 bool GetStats_w(VoiceMediaInfo* stats);
402 407
403 virtual void OnMessage(rtc::Message* pmsg); 408 virtual void OnMessage(rtc::Message* pmsg);
404 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; 409 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const;
405 virtual void OnConnectionMonitorUpdate( 410 virtual void OnConnectionMonitorUpdate(
406 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 411 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
407 virtual void OnMediaMonitorUpdate( 412 virtual void OnMediaMonitorUpdate(
408 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info); 413 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info);
409 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info); 414 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info);
415 bool ApplySendParameters(const AudioSendParameters& parameters);
410 416
411 static const int kEarlyMediaTimeout = 1000; 417 static const int kEarlyMediaTimeout = 1000;
412 MediaEngineInterface* media_engine_; 418 MediaEngineInterface* media_engine_;
413 bool received_media_; 419 bool received_media_;
414 rtc::scoped_ptr<VoiceMediaMonitor> media_monitor_; 420 rtc::scoped_ptr<VoiceMediaMonitor> media_monitor_;
415 rtc::scoped_ptr<AudioMonitor> audio_monitor_; 421 rtc::scoped_ptr<AudioMonitor> audio_monitor_;
416 422
417 // Last AudioSendParameters sent down to the media_channel() via 423 // Last AudioSendParameters sent down to the media_channel() via
418 // SetSendParameters. 424 // SetSendParameters.
419 AudioSendParameters last_send_params_; 425 AudioSendParameters last_send_params_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 460
455 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> 461 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&>
456 SignalConnectionMonitor; 462 SignalConnectionMonitor;
457 463
458 void StartMediaMonitor(int cms); 464 void StartMediaMonitor(int cms);
459 void StopMediaMonitor(); 465 void StopMediaMonitor();
460 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; 466 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor;
461 sigslot::signal2<uint32_t, rtc::WindowEvent> SignalScreencastWindowEvent; 467 sigslot::signal2<uint32_t, rtc::WindowEvent> SignalScreencastWindowEvent;
462 468
463 bool SetVideoSend(uint32_t ssrc, bool enable, const VideoOptions* options); 469 bool SetVideoSend(uint32_t ssrc, bool enable, const VideoOptions* options);
470 webrtc::RTCRtpParameters GetRtpParameters(uint32_t ssrc);
471 bool SetRtpParameters(uint32_t ssrc,
472 const webrtc::RTCRtpParameters& parameters);
464 473
465 private: 474 private:
466 typedef std::map<uint32_t, VideoCapturer*> ScreencastMap; 475 typedef std::map<uint32_t, VideoCapturer*> ScreencastMap;
467 476
468 // overrides from BaseChannel 477 // overrides from BaseChannel
469 virtual void ChangeState(); 478 virtual void ChangeState();
470 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); 479 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc);
471 virtual bool SetLocalContent_w(const MediaContentDescription* content, 480 virtual bool SetLocalContent_w(const MediaContentDescription* content,
472 ContentAction action, 481 ContentAction action,
473 std::string* error_desc); 482 std::string* error_desc);
474 virtual bool SetRemoteContent_w(const MediaContentDescription* content, 483 virtual bool SetRemoteContent_w(const MediaContentDescription* content,
475 ContentAction action, 484 ContentAction action,
476 std::string* error_desc); 485 std::string* error_desc);
477 486
478 bool AddScreencast_w(uint32_t ssrc, VideoCapturer* capturer); 487 bool AddScreencast_w(uint32_t ssrc, VideoCapturer* capturer);
479 bool RemoveScreencast_w(uint32_t ssrc); 488 bool RemoveScreencast_w(uint32_t ssrc);
480 void OnScreencastWindowEvent_s(uint32_t ssrc, rtc::WindowEvent we); 489 void OnScreencastWindowEvent_s(uint32_t ssrc, rtc::WindowEvent we);
481 bool IsScreencasting_w() const; 490 bool IsScreencasting_w() const;
482 bool GetStats_w(VideoMediaInfo* stats); 491 bool GetStats_w(VideoMediaInfo* stats);
492 bool GetRtpParameters_w(uint32_t ssrc, webrtc::RTCRtpParameters* parameters);
493 bool SetRtpParameters_w(uint32_t ssrc, webrtc::RTCRtpParameters parameters);
494 bool ApplySendParameters(const VideoSendParameters& parameters);
483 495
484 virtual void OnMessage(rtc::Message* pmsg); 496 virtual void OnMessage(rtc::Message* pmsg);
485 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; 497 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const;
486 virtual void OnConnectionMonitorUpdate( 498 virtual void OnConnectionMonitorUpdate(
487 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 499 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
488 virtual void OnMediaMonitorUpdate( 500 virtual void OnMediaMonitorUpdate(
489 VideoMediaChannel* media_channel, const VideoMediaInfo& info); 501 VideoMediaChannel* media_channel, const VideoMediaInfo& info);
490 virtual void OnScreencastWindowEvent(uint32_t ssrc, rtc::WindowEvent event); 502 virtual void OnScreencastWindowEvent(uint32_t ssrc, rtc::WindowEvent event);
491 virtual void OnStateChange(VideoCapturer* capturer, CaptureState ev); 503 virtual void OnStateChange(VideoCapturer* capturer, CaptureState ev);
492 bool GetLocalSsrc(const VideoCapturer* capturer, uint32_t* ssrc); 504 bool GetLocalSsrc(const VideoCapturer* capturer, uint32_t* ssrc);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 // SetSendParameters. 632 // SetSendParameters.
621 DataSendParameters last_send_params_; 633 DataSendParameters last_send_params_;
622 // Last DataRecvParameters sent down to the media_channel() via 634 // Last DataRecvParameters sent down to the media_channel() via
623 // SetRecvParameters. 635 // SetRecvParameters.
624 DataRecvParameters last_recv_params_; 636 DataRecvParameters last_recv_params_;
625 }; 637 };
626 638
627 } // namespace cricket 639 } // namespace cricket
628 640
629 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ 641 #endif // TALK_SESSION_MEDIA_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698