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

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

Issue 1917193008: Adding getParameters/setParameters APIs to RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding nil check and removing unneeded methods. Created 4 years, 7 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 bool CanInsertDtmf(); 359 bool CanInsertDtmf();
360 // Send and/or play a DTMF |event| according to the |flags|. 360 // Send and/or play a DTMF |event| according to the |flags|.
361 // The DTMF out-of-band signal will be used on sending. 361 // The DTMF out-of-band signal will be used on sending.
362 // The |ssrc| should be either 0 or a valid send stream ssrc. 362 // The |ssrc| should be either 0 or a valid send stream ssrc.
363 // The valid value for the |event| are 0 which corresponding to DTMF 363 // The valid value for the |event| are 0 which corresponding to DTMF
364 // event 0-9, *, #, A-D. 364 // event 0-9, *, #, A-D.
365 bool InsertDtmf(uint32_t ssrc, int event_code, int duration); 365 bool InsertDtmf(uint32_t ssrc, int event_code, int duration);
366 bool SetOutputVolume(uint32_t ssrc, double volume); 366 bool SetOutputVolume(uint32_t ssrc, double volume);
367 void SetRawAudioSink(uint32_t ssrc, 367 void SetRawAudioSink(uint32_t ssrc,
368 std::unique_ptr<webrtc::AudioSinkInterface> sink); 368 std::unique_ptr<webrtc::AudioSinkInterface> sink);
369 webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const; 369 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const;
370 bool SetRtpParameters(uint32_t ssrc, const webrtc::RtpParameters& parameters); 370 bool SetRtpSendParameters(uint32_t ssrc,
371 const webrtc::RtpParameters& parameters);
372 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const;
373 bool SetRtpReceiveParameters(uint32_t ssrc,
374 const webrtc::RtpParameters& parameters);
371 375
372 // Get statistics about the current media session. 376 // Get statistics about the current media session.
373 bool GetStats(VoiceMediaInfo* stats); 377 bool GetStats(VoiceMediaInfo* stats);
374 378
375 // Monitoring functions 379 // Monitoring functions
376 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&> 380 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&>
377 SignalConnectionMonitor; 381 SignalConnectionMonitor;
378 382
379 void StartMediaMonitor(int cms); 383 void StartMediaMonitor(int cms);
380 void StopMediaMonitor(); 384 void StopMediaMonitor();
381 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor; 385 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor;
382 386
383 void StartAudioMonitor(int cms); 387 void StartAudioMonitor(int cms);
384 void StopAudioMonitor(); 388 void StopAudioMonitor();
385 bool IsAudioMonitorRunning() const; 389 bool IsAudioMonitorRunning() const;
386 sigslot::signal2<VoiceChannel*, const AudioInfo&> SignalAudioMonitor; 390 sigslot::signal2<VoiceChannel*, const AudioInfo&> SignalAudioMonitor;
387 391
388 int GetInputLevel_w(); 392 int GetInputLevel_w();
389 int GetOutputLevel_w(); 393 int GetOutputLevel_w();
390 void GetActiveStreams_w(AudioInfo::StreamList* actives); 394 void GetActiveStreams_w(AudioInfo::StreamList* actives);
391 webrtc::RtpParameters GetRtpParameters_w(uint32_t ssrc) const; 395 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const;
392 bool SetRtpParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters); 396 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters);
397 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const;
398 bool SetRtpReceiveParameters_w(uint32_t ssrc,
399 webrtc::RtpParameters parameters);
393 400
394 private: 401 private:
395 // overrides from BaseChannel 402 // overrides from BaseChannel
396 virtual void OnChannelRead(TransportChannel* channel, 403 virtual void OnChannelRead(TransportChannel* channel,
397 const char* data, size_t len, 404 const char* data, size_t len,
398 const rtc::PacketTime& packet_time, 405 const rtc::PacketTime& packet_time,
399 int flags); 406 int flags);
400 virtual void ChangeState(); 407 virtual void ChangeState();
401 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); 408 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc);
402 virtual bool SetLocalContent_w(const MediaContentDescription* content, 409 virtual bool SetLocalContent_w(const MediaContentDescription* content,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 bool GetStats(VideoMediaInfo* stats); 464 bool GetStats(VideoMediaInfo* stats);
458 465
459 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> 466 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&>
460 SignalConnectionMonitor; 467 SignalConnectionMonitor;
461 468
462 void StartMediaMonitor(int cms); 469 void StartMediaMonitor(int cms);
463 void StopMediaMonitor(); 470 void StopMediaMonitor();
464 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; 471 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor;
465 472
466 bool SetVideoSend(uint32_t ssrc, bool enable, const VideoOptions* options); 473 bool SetVideoSend(uint32_t ssrc, bool enable, const VideoOptions* options);
467 webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const; 474 webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const;
468 bool SetRtpParameters(uint32_t ssrc, const webrtc::RtpParameters& parameters); 475 bool SetRtpSendParameters(uint32_t ssrc,
476 const webrtc::RtpParameters& parameters);
477 webrtc::RtpParameters GetRtpReceiveParameters(uint32_t ssrc) const;
478 bool SetRtpReceiveParameters(uint32_t ssrc,
479 const webrtc::RtpParameters& parameters);
469 480
470 private: 481 private:
471 // overrides from BaseChannel 482 // overrides from BaseChannel
472 virtual void ChangeState(); 483 virtual void ChangeState();
473 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); 484 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc);
474 virtual bool SetLocalContent_w(const MediaContentDescription* content, 485 virtual bool SetLocalContent_w(const MediaContentDescription* content,
475 ContentAction action, 486 ContentAction action,
476 std::string* error_desc); 487 std::string* error_desc);
477 virtual bool SetRemoteContent_w(const MediaContentDescription* content, 488 virtual bool SetRemoteContent_w(const MediaContentDescription* content,
478 ContentAction action, 489 ContentAction action,
479 std::string* error_desc); 490 std::string* error_desc);
480 bool GetStats_w(VideoMediaInfo* stats); 491 bool GetStats_w(VideoMediaInfo* stats);
481 webrtc::RtpParameters GetRtpParameters_w(uint32_t ssrc) const; 492 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const;
482 bool SetRtpParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters); 493 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters);
494 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const;
495 bool SetRtpReceiveParameters_w(uint32_t ssrc,
496 webrtc::RtpParameters parameters);
483 497
484 virtual void OnMessage(rtc::Message* pmsg); 498 virtual void OnMessage(rtc::Message* pmsg);
485 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; 499 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const;
486 virtual void OnConnectionMonitorUpdate( 500 virtual void OnConnectionMonitorUpdate(
487 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 501 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
488 virtual void OnMediaMonitorUpdate( 502 virtual void OnMediaMonitorUpdate(
489 VideoMediaChannel* media_channel, const VideoMediaInfo& info); 503 VideoMediaChannel* media_channel, const VideoMediaInfo& info);
490 504
491 std::unique_ptr<VideoMediaMonitor> media_monitor_; 505 std::unique_ptr<VideoMediaMonitor> media_monitor_;
492 506
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // SetSendParameters. 628 // SetSendParameters.
615 DataSendParameters last_send_params_; 629 DataSendParameters last_send_params_;
616 // Last DataRecvParameters sent down to the media_channel() via 630 // Last DataRecvParameters sent down to the media_channel() via
617 // SetRecvParameters. 631 // SetRecvParameters.
618 DataRecvParameters last_recv_params_; 632 DataRecvParameters last_recv_params_;
619 }; 633 };
620 634
621 } // namespace cricket 635 } // namespace cricket
622 636
623 #endif // WEBRTC_PC_CHANNEL_H_ 637 #endif // WEBRTC_PC_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698