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

Side by Side Diff: talk/session/media/channel.h

Issue 1337673002: Change WebRTC SslCipher to be exposed as number only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « talk/app/webrtc/webrtcsession.cc ('k') | talk/session/media/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 bool SetRtcpMux_w(bool enable, 277 bool SetRtcpMux_w(bool enable,
278 ContentAction action, 278 ContentAction action,
279 ContentSource src, 279 ContentSource src,
280 std::string* error_desc); 280 std::string* error_desc);
281 281
282 // From MessageHandler 282 // From MessageHandler
283 virtual void OnMessage(rtc::Message* pmsg); 283 virtual void OnMessage(rtc::Message* pmsg);
284 284
285 // Handled in derived classes 285 // Handled in derived classes
286 // Get the SRTP ciphers to use for RTP media 286 // Get the SRTP ciphers to use for RTP media
287 virtual void GetSrtpCiphers(std::vector<std::string>* ciphers) const = 0; 287 virtual void GetSrtpCryptoSuiteNames(
288 std::vector<std::string>* ciphers) const = 0;
288 virtual void OnConnectionMonitorUpdate(ConnectionMonitor* monitor, 289 virtual void OnConnectionMonitorUpdate(ConnectionMonitor* monitor,
289 const std::vector<ConnectionInfo>& infos) = 0; 290 const std::vector<ConnectionInfo>& infos) = 0;
290 291
291 // Helper function for invoking bool-returning methods on the worker thread. 292 // Helper function for invoking bool-returning methods on the worker thread.
292 template <class FunctorT> 293 template <class FunctorT>
293 bool InvokeOnWorker(const FunctorT& functor) { 294 bool InvokeOnWorker(const FunctorT& functor) {
294 return worker_thread_->Invoke<bool>(functor); 295 return worker_thread_->Invoke<bool>(functor);
295 } 296 }
296 297
297 private: 298 private:
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 std::string* error_desc); 407 std::string* error_desc);
407 virtual bool SetRemoteContent_w(const MediaContentDescription* content, 408 virtual bool SetRemoteContent_w(const MediaContentDescription* content,
408 ContentAction action, 409 ContentAction action,
409 std::string* error_desc); 410 std::string* error_desc);
410 void HandleEarlyMediaTimeout(); 411 void HandleEarlyMediaTimeout();
411 bool InsertDtmf_w(uint32 ssrc, int event, int duration, int flags); 412 bool InsertDtmf_w(uint32 ssrc, int event, int duration, int flags);
412 bool SetOutputScaling_w(uint32 ssrc, double left, double right); 413 bool SetOutputScaling_w(uint32 ssrc, double left, double right);
413 bool GetStats_w(VoiceMediaInfo* stats); 414 bool GetStats_w(VoiceMediaInfo* stats);
414 415
415 virtual void OnMessage(rtc::Message* pmsg); 416 virtual void OnMessage(rtc::Message* pmsg);
416 virtual void GetSrtpCiphers(std::vector<std::string>* ciphers) const; 417 virtual void GetSrtpCryptoSuiteNames(std::vector<std::string>* ciphers) const;
417 virtual void OnConnectionMonitorUpdate( 418 virtual void OnConnectionMonitorUpdate(
418 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 419 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
419 virtual void OnMediaMonitorUpdate( 420 virtual void OnMediaMonitorUpdate(
420 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info); 421 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info);
421 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info); 422 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info);
422 void OnVoiceChannelError(uint32 ssrc, VoiceMediaChannel::Error error); 423 void OnVoiceChannelError(uint32 ssrc, VoiceMediaChannel::Error error);
423 void SendLastMediaError(); 424 void SendLastMediaError();
424 void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error); 425 void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error);
425 426
426 static const int kEarlyMediaTimeout = 1000; 427 static const int kEarlyMediaTimeout = 1000;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 bool ApplyViewRequest_w(const ViewRequest& request); 504 bool ApplyViewRequest_w(const ViewRequest& request);
504 505
505 bool AddScreencast_w(uint32 ssrc, VideoCapturer* capturer); 506 bool AddScreencast_w(uint32 ssrc, VideoCapturer* capturer);
506 bool RemoveScreencast_w(uint32 ssrc); 507 bool RemoveScreencast_w(uint32 ssrc);
507 void OnScreencastWindowEvent_s(uint32 ssrc, rtc::WindowEvent we); 508 void OnScreencastWindowEvent_s(uint32 ssrc, rtc::WindowEvent we);
508 bool IsScreencasting_w() const; 509 bool IsScreencasting_w() const;
509 void GetScreencastDetails_w(ScreencastDetailsData* d) const; 510 void GetScreencastDetails_w(ScreencastDetailsData* d) const;
510 bool GetStats_w(VideoMediaInfo* stats); 511 bool GetStats_w(VideoMediaInfo* stats);
511 512
512 virtual void OnMessage(rtc::Message* pmsg); 513 virtual void OnMessage(rtc::Message* pmsg);
513 virtual void GetSrtpCiphers(std::vector<std::string>* ciphers) const; 514 virtual void GetSrtpCryptoSuiteNames(std::vector<std::string>* ciphers) const;
514 virtual void OnConnectionMonitorUpdate( 515 virtual void OnConnectionMonitorUpdate(
515 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 516 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
516 virtual void OnMediaMonitorUpdate( 517 virtual void OnMediaMonitorUpdate(
517 VideoMediaChannel* media_channel, const VideoMediaInfo& info); 518 VideoMediaChannel* media_channel, const VideoMediaInfo& info);
518 virtual void OnScreencastWindowEvent(uint32 ssrc, 519 virtual void OnScreencastWindowEvent(uint32 ssrc,
519 rtc::WindowEvent event); 520 rtc::WindowEvent event);
520 virtual void OnStateChange(VideoCapturer* capturer, CaptureState ev); 521 virtual void OnStateChange(VideoCapturer* capturer, CaptureState ev);
521 bool GetLocalSsrc(const VideoCapturer* capturer, uint32* ssrc); 522 bool GetLocalSsrc(const VideoCapturer* capturer, uint32* ssrc);
522 523
523 void OnVideoChannelError(uint32 ssrc, VideoMediaChannel::Error error); 524 void OnVideoChannelError(uint32 ssrc, VideoMediaChannel::Error error);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 virtual bool SetLocalContent_w(const MediaContentDescription* content, 629 virtual bool SetLocalContent_w(const MediaContentDescription* content,
629 ContentAction action, 630 ContentAction action,
630 std::string* error_desc); 631 std::string* error_desc);
631 virtual bool SetRemoteContent_w(const MediaContentDescription* content, 632 virtual bool SetRemoteContent_w(const MediaContentDescription* content,
632 ContentAction action, 633 ContentAction action,
633 std::string* error_desc); 634 std::string* error_desc);
634 virtual void ChangeState(); 635 virtual void ChangeState();
635 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet); 636 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet);
636 637
637 virtual void OnMessage(rtc::Message* pmsg); 638 virtual void OnMessage(rtc::Message* pmsg);
638 virtual void GetSrtpCiphers(std::vector<std::string>* ciphers) const; 639 virtual void GetSrtpCryptoSuiteNames(std::vector<std::string>* ciphers) const;
639 virtual void OnConnectionMonitorUpdate( 640 virtual void OnConnectionMonitorUpdate(
640 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); 641 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos);
641 virtual void OnMediaMonitorUpdate( 642 virtual void OnMediaMonitorUpdate(
642 DataMediaChannel* media_channel, const DataMediaInfo& info); 643 DataMediaChannel* media_channel, const DataMediaInfo& info);
643 virtual bool ShouldSetupDtlsSrtp() const; 644 virtual bool ShouldSetupDtlsSrtp() const;
644 void OnDataReceived( 645 void OnDataReceived(
645 const ReceiveDataParams& params, const char* data, size_t len); 646 const ReceiveDataParams& params, const char* data, size_t len);
646 void OnDataChannelError(uint32 ssrc, DataMediaChannel::Error error); 647 void OnDataChannelError(uint32 ssrc, DataMediaChannel::Error error);
647 void OnDataChannelReadyToSend(bool writable); 648 void OnDataChannelReadyToSend(bool writable);
648 void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error); 649 void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error);
649 void OnStreamClosedRemotely(uint32 sid); 650 void OnStreamClosedRemotely(uint32 sid);
650 651
651 rtc::scoped_ptr<DataMediaMonitor> media_monitor_; 652 rtc::scoped_ptr<DataMediaMonitor> media_monitor_;
652 // TODO(pthatcher): Make a separate SctpDataChannel and 653 // TODO(pthatcher): Make a separate SctpDataChannel and
653 // RtpDataChannel instead of using this. 654 // RtpDataChannel instead of using this.
654 DataChannelType data_channel_type_; 655 DataChannelType data_channel_type_;
655 bool ready_to_send_data_; 656 bool ready_to_send_data_;
656 657
657 // Last DataSendParameters sent down to the media_channel() via 658 // Last DataSendParameters sent down to the media_channel() via
658 // SetSendParameters. 659 // SetSendParameters.
659 DataSendParameters last_send_params_; 660 DataSendParameters last_send_params_;
660 // Last DataRecvParameters sent down to the media_channel() via 661 // Last DataRecvParameters sent down to the media_channel() via
661 // SetRecvParameters. 662 // SetRecvParameters.
662 DataRecvParameters last_recv_params_; 663 DataRecvParameters last_recv_params_;
663 }; 664 };
664 665
665 } // namespace cricket 666 } // namespace cricket
666 667
667 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ 668 #endif // TALK_SESSION_MEDIA_CHANNEL_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/webrtcsession.cc ('k') | talk/session/media/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698