OLD | NEW |
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 ContentAction action, | 127 ContentAction action, |
128 std::string* error_desc); | 128 std::string* error_desc); |
129 bool SetRemoteContent(const MediaContentDescription* content, | 129 bool SetRemoteContent(const MediaContentDescription* content, |
130 ContentAction action, | 130 ContentAction action, |
131 std::string* error_desc); | 131 std::string* error_desc); |
132 | 132 |
133 bool Enable(bool enable); | 133 bool Enable(bool enable); |
134 | 134 |
135 // Multiplexing | 135 // Multiplexing |
136 bool AddRecvStream(const StreamParams& sp); | 136 bool AddRecvStream(const StreamParams& sp); |
137 bool RemoveRecvStream(uint32 ssrc); | 137 bool RemoveRecvStream(uint32_t ssrc); |
138 bool AddSendStream(const StreamParams& sp); | 138 bool AddSendStream(const StreamParams& sp); |
139 bool RemoveSendStream(uint32 ssrc); | 139 bool RemoveSendStream(uint32_t ssrc); |
140 | 140 |
141 // Monitoring | 141 // Monitoring |
142 void StartConnectionMonitor(int cms); | 142 void StartConnectionMonitor(int cms); |
143 void StopConnectionMonitor(); | 143 void StopConnectionMonitor(); |
144 // For ConnectionStatsGetter, used by ConnectionMonitor | 144 // For ConnectionStatsGetter, used by ConnectionMonitor |
145 bool GetConnectionStats(ConnectionInfos* infos) override; | 145 bool GetConnectionStats(ConnectionInfos* infos) override; |
146 | 146 |
147 BundleFilter* bundle_filter() { return &bundle_filter_; } | 147 BundleFilter* bundle_filter() { return &bundle_filter_; } |
148 | 148 |
149 const std::vector<StreamParams>& local_streams() const { | 149 const std::vector<StreamParams>& local_streams() const { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet); | 219 virtual bool WantsPacket(bool rtcp, rtc::Buffer* packet); |
220 void HandlePacket(bool rtcp, rtc::Buffer* packet, | 220 void HandlePacket(bool rtcp, rtc::Buffer* packet, |
221 const rtc::PacketTime& packet_time); | 221 const rtc::PacketTime& packet_time); |
222 | 222 |
223 void EnableMedia_w(); | 223 void EnableMedia_w(); |
224 void DisableMedia_w(); | 224 void DisableMedia_w(); |
225 void UpdateWritableState_w(); | 225 void UpdateWritableState_w(); |
226 void ChannelWritable_w(); | 226 void ChannelWritable_w(); |
227 void ChannelNotWritable_w(); | 227 void ChannelNotWritable_w(); |
228 bool AddRecvStream_w(const StreamParams& sp); | 228 bool AddRecvStream_w(const StreamParams& sp); |
229 bool RemoveRecvStream_w(uint32 ssrc); | 229 bool RemoveRecvStream_w(uint32_t ssrc); |
230 bool AddSendStream_w(const StreamParams& sp); | 230 bool AddSendStream_w(const StreamParams& sp); |
231 bool RemoveSendStream_w(uint32 ssrc); | 231 bool RemoveSendStream_w(uint32_t ssrc); |
232 virtual bool ShouldSetupDtlsSrtp() const; | 232 virtual bool ShouldSetupDtlsSrtp() const; |
233 // Do the DTLS key expansion and impose it on the SRTP/SRTCP filters. | 233 // Do the DTLS key expansion and impose it on the SRTP/SRTCP filters. |
234 // |rtcp_channel| indicates whether to set up the RTP or RTCP filter. | 234 // |rtcp_channel| indicates whether to set up the RTP or RTCP filter. |
235 bool SetupDtlsSrtp(bool rtcp_channel); | 235 bool SetupDtlsSrtp(bool rtcp_channel); |
236 // Set the DTLS-SRTP cipher policy on this channel as appropriate. | 236 // Set the DTLS-SRTP cipher policy on this channel as appropriate. |
237 bool SetDtlsSrtpCiphers(TransportChannel *tc, bool rtcp); | 237 bool SetDtlsSrtpCiphers(TransportChannel *tc, bool rtcp); |
238 | 238 |
239 virtual void ChangeState() = 0; | 239 virtual void ChangeState() = 0; |
240 | 240 |
241 // Gets the content info appropriate to the channel (audio or video). | 241 // Gets the content info appropriate to the channel (audio or video). |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 class VoiceChannel : public BaseChannel { | 328 class VoiceChannel : public BaseChannel { |
329 public: | 329 public: |
330 VoiceChannel(rtc::Thread* thread, | 330 VoiceChannel(rtc::Thread* thread, |
331 MediaEngineInterface* media_engine, | 331 MediaEngineInterface* media_engine, |
332 VoiceMediaChannel* channel, | 332 VoiceMediaChannel* channel, |
333 TransportController* transport_controller, | 333 TransportController* transport_controller, |
334 const std::string& content_name, | 334 const std::string& content_name, |
335 bool rtcp); | 335 bool rtcp); |
336 ~VoiceChannel(); | 336 ~VoiceChannel(); |
337 bool Init(); | 337 bool Init(); |
338 bool SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer); | 338 bool SetRemoteRenderer(uint32_t ssrc, AudioRenderer* renderer); |
339 | 339 |
340 // Configure sending media on the stream with SSRC |ssrc| | 340 // Configure sending media on the stream with SSRC |ssrc| |
341 // If there is only one sending stream SSRC 0 can be used. | 341 // If there is only one sending stream SSRC 0 can be used. |
342 bool SetAudioSend(uint32 ssrc, | 342 bool SetAudioSend(uint32_t ssrc, |
343 bool enable, | 343 bool enable, |
344 const AudioOptions* options, | 344 const AudioOptions* options, |
345 AudioRenderer* renderer); | 345 AudioRenderer* renderer); |
346 | 346 |
347 // downcasts a MediaChannel | 347 // downcasts a MediaChannel |
348 virtual VoiceMediaChannel* media_channel() const { | 348 virtual VoiceMediaChannel* media_channel() const { |
349 return static_cast<VoiceMediaChannel*>(BaseChannel::media_channel()); | 349 return static_cast<VoiceMediaChannel*>(BaseChannel::media_channel()); |
350 } | 350 } |
351 | 351 |
352 void SetEarlyMedia(bool enable); | 352 void SetEarlyMedia(bool enable); |
353 // This signal is emitted when we have gone a period of time without | 353 // This signal is emitted when we have gone a period of time without |
354 // receiving early media. When received, a UI should start playing its | 354 // receiving early media. When received, a UI should start playing its |
355 // own ringing sound | 355 // own ringing sound |
356 sigslot::signal1<VoiceChannel*> SignalEarlyMediaTimeout; | 356 sigslot::signal1<VoiceChannel*> SignalEarlyMediaTimeout; |
357 | 357 |
358 // TODO(ronghuawu): Replace PressDTMF with InsertDtmf. | 358 // TODO(ronghuawu): Replace PressDTMF with InsertDtmf. |
359 bool PressDTMF(int digit, bool playout); | 359 bool PressDTMF(int digit, bool playout); |
360 // Returns if the telephone-event has been negotiated. | 360 // Returns if the telephone-event has been negotiated. |
361 bool CanInsertDtmf(); | 361 bool CanInsertDtmf(); |
362 // Send and/or play a DTMF |event| according to the |flags|. | 362 // Send and/or play a DTMF |event| according to the |flags|. |
363 // The DTMF out-of-band signal will be used on sending. | 363 // The DTMF out-of-band signal will be used on sending. |
364 // The |ssrc| should be either 0 or a valid send stream ssrc. | 364 // The |ssrc| should be either 0 or a valid send stream ssrc. |
365 // The valid value for the |event| are 0 which corresponding to DTMF | 365 // The valid value for the |event| are 0 which corresponding to DTMF |
366 // event 0-9, *, #, A-D. | 366 // event 0-9, *, #, A-D. |
367 bool InsertDtmf(uint32 ssrc, int event_code, int duration, int flags); | 367 bool InsertDtmf(uint32_t ssrc, int event_code, int duration, int flags); |
368 bool SetOutputScaling(uint32 ssrc, double left, double right); | 368 bool SetOutputScaling(uint32_t ssrc, double left, double right); |
369 // Get statistics about the current media session. | 369 // Get statistics about the current media session. |
370 bool GetStats(VoiceMediaInfo* stats); | 370 bool GetStats(VoiceMediaInfo* stats); |
371 | 371 |
372 // Monitoring functions | 372 // Monitoring functions |
373 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&> | 373 sigslot::signal2<VoiceChannel*, const std::vector<ConnectionInfo>&> |
374 SignalConnectionMonitor; | 374 SignalConnectionMonitor; |
375 | 375 |
376 void StartMediaMonitor(int cms); | 376 void StartMediaMonitor(int cms); |
377 void StopMediaMonitor(); | 377 void StopMediaMonitor(); |
378 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor; | 378 sigslot::signal2<VoiceChannel*, const VoiceMediaInfo&> SignalMediaMonitor; |
(...skipping 15 matching lines...) Expand all Loading... |
394 int flags); | 394 int flags); |
395 virtual void ChangeState(); | 395 virtual void ChangeState(); |
396 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); | 396 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); |
397 virtual bool SetLocalContent_w(const MediaContentDescription* content, | 397 virtual bool SetLocalContent_w(const MediaContentDescription* content, |
398 ContentAction action, | 398 ContentAction action, |
399 std::string* error_desc); | 399 std::string* error_desc); |
400 virtual bool SetRemoteContent_w(const MediaContentDescription* content, | 400 virtual bool SetRemoteContent_w(const MediaContentDescription* content, |
401 ContentAction action, | 401 ContentAction action, |
402 std::string* error_desc); | 402 std::string* error_desc); |
403 void HandleEarlyMediaTimeout(); | 403 void HandleEarlyMediaTimeout(); |
404 bool InsertDtmf_w(uint32 ssrc, int event, int duration, int flags); | 404 bool InsertDtmf_w(uint32_t ssrc, int event, int duration, int flags); |
405 bool SetOutputScaling_w(uint32 ssrc, double left, double right); | 405 bool SetOutputScaling_w(uint32_t ssrc, double left, double right); |
406 bool GetStats_w(VoiceMediaInfo* stats); | 406 bool GetStats_w(VoiceMediaInfo* stats); |
407 | 407 |
408 virtual void OnMessage(rtc::Message* pmsg); | 408 virtual void OnMessage(rtc::Message* pmsg); |
409 virtual void GetSrtpCryptoSuiteNames(std::vector<std::string>* ciphers) const; | 409 virtual void GetSrtpCryptoSuiteNames(std::vector<std::string>* ciphers) const; |
410 virtual void OnConnectionMonitorUpdate( | 410 virtual void OnConnectionMonitorUpdate( |
411 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); | 411 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); |
412 virtual void OnMediaMonitorUpdate( | 412 virtual void OnMediaMonitorUpdate( |
413 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info); | 413 VoiceMediaChannel* media_channel, const VoiceMediaInfo& info); |
414 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info); | 414 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info); |
415 | 415 |
(...skipping 20 matching lines...) Expand all Loading... |
436 const std::string& content_name, | 436 const std::string& content_name, |
437 bool rtcp); | 437 bool rtcp); |
438 ~VideoChannel(); | 438 ~VideoChannel(); |
439 bool Init(); | 439 bool Init(); |
440 | 440 |
441 // downcasts a MediaChannel | 441 // downcasts a MediaChannel |
442 virtual VideoMediaChannel* media_channel() const { | 442 virtual VideoMediaChannel* media_channel() const { |
443 return static_cast<VideoMediaChannel*>(BaseChannel::media_channel()); | 443 return static_cast<VideoMediaChannel*>(BaseChannel::media_channel()); |
444 } | 444 } |
445 | 445 |
446 bool SetRenderer(uint32 ssrc, VideoRenderer* renderer); | 446 bool SetRenderer(uint32_t ssrc, VideoRenderer* renderer); |
447 bool ApplyViewRequest(const ViewRequest& request); | 447 bool ApplyViewRequest(const ViewRequest& request); |
448 | 448 |
449 // TODO(pthatcher): Refactor to use a "capture id" instead of an | 449 // TODO(pthatcher): Refactor to use a "capture id" instead of an |
450 // ssrc here as the "key". | 450 // ssrc here as the "key". |
451 // Passes ownership of the capturer to the channel. | 451 // Passes ownership of the capturer to the channel. |
452 bool AddScreencast(uint32 ssrc, VideoCapturer* capturer); | 452 bool AddScreencast(uint32_t ssrc, VideoCapturer* capturer); |
453 bool SetCapturer(uint32 ssrc, VideoCapturer* capturer); | 453 bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer); |
454 bool RemoveScreencast(uint32 ssrc); | 454 bool RemoveScreencast(uint32_t ssrc); |
455 // True if we've added a screencast. Doesn't matter if the capturer | 455 // True if we've added a screencast. Doesn't matter if the capturer |
456 // has been started or not. | 456 // has been started or not. |
457 bool IsScreencasting(); | 457 bool IsScreencasting(); |
458 int GetScreencastFps(uint32 ssrc); | 458 int GetScreencastFps(uint32_t ssrc); |
459 int GetScreencastMaxPixels(uint32 ssrc); | 459 int GetScreencastMaxPixels(uint32_t ssrc); |
460 // Get statistics about the current media session. | 460 // Get statistics about the current media session. |
461 bool GetStats(VideoMediaInfo* stats); | 461 bool GetStats(VideoMediaInfo* stats); |
462 | 462 |
463 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> | 463 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> |
464 SignalConnectionMonitor; | 464 SignalConnectionMonitor; |
465 | 465 |
466 void StartMediaMonitor(int cms); | 466 void StartMediaMonitor(int cms); |
467 void StopMediaMonitor(); | 467 void StopMediaMonitor(); |
468 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; | 468 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; |
469 sigslot::signal2<uint32, rtc::WindowEvent> SignalScreencastWindowEvent; | 469 sigslot::signal2<uint32_t, rtc::WindowEvent> SignalScreencastWindowEvent; |
470 | 470 |
471 bool SendIntraFrame(); | 471 bool SendIntraFrame(); |
472 bool RequestIntraFrame(); | 472 bool RequestIntraFrame(); |
473 | 473 |
474 // Configure sending media on the stream with SSRC |ssrc| | 474 // Configure sending media on the stream with SSRC |ssrc| |
475 // If there is only one sending stream SSRC 0 can be used. | 475 // If there is only one sending stream SSRC 0 can be used. |
476 bool SetVideoSend(uint32 ssrc, bool enable, const VideoOptions* options); | 476 bool SetVideoSend(uint32_t ssrc, bool enable, const VideoOptions* options); |
477 | 477 |
478 private: | 478 private: |
479 typedef std::map<uint32, VideoCapturer*> ScreencastMap; | 479 typedef std::map<uint32_t, VideoCapturer*> ScreencastMap; |
480 struct ScreencastDetailsData; | 480 struct ScreencastDetailsData; |
481 | 481 |
482 // overrides from BaseChannel | 482 // overrides from BaseChannel |
483 virtual void ChangeState(); | 483 virtual void ChangeState(); |
484 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); | 484 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); |
485 virtual bool SetLocalContent_w(const MediaContentDescription* content, | 485 virtual bool SetLocalContent_w(const MediaContentDescription* content, |
486 ContentAction action, | 486 ContentAction action, |
487 std::string* error_desc); | 487 std::string* error_desc); |
488 virtual bool SetRemoteContent_w(const MediaContentDescription* content, | 488 virtual bool SetRemoteContent_w(const MediaContentDescription* content, |
489 ContentAction action, | 489 ContentAction action, |
490 std::string* error_desc); | 490 std::string* error_desc); |
491 bool ApplyViewRequest_w(const ViewRequest& request); | 491 bool ApplyViewRequest_w(const ViewRequest& request); |
492 | 492 |
493 bool AddScreencast_w(uint32 ssrc, VideoCapturer* capturer); | 493 bool AddScreencast_w(uint32_t ssrc, VideoCapturer* capturer); |
494 bool RemoveScreencast_w(uint32 ssrc); | 494 bool RemoveScreencast_w(uint32_t ssrc); |
495 void OnScreencastWindowEvent_s(uint32 ssrc, rtc::WindowEvent we); | 495 void OnScreencastWindowEvent_s(uint32_t ssrc, rtc::WindowEvent we); |
496 bool IsScreencasting_w() const; | 496 bool IsScreencasting_w() const; |
497 void GetScreencastDetails_w(ScreencastDetailsData* d) const; | 497 void GetScreencastDetails_w(ScreencastDetailsData* d) const; |
498 bool GetStats_w(VideoMediaInfo* stats); | 498 bool GetStats_w(VideoMediaInfo* stats); |
499 | 499 |
500 virtual void OnMessage(rtc::Message* pmsg); | 500 virtual void OnMessage(rtc::Message* pmsg); |
501 virtual void GetSrtpCryptoSuiteNames(std::vector<std::string>* ciphers) const; | 501 virtual void GetSrtpCryptoSuiteNames(std::vector<std::string>* ciphers) const; |
502 virtual void OnConnectionMonitorUpdate( | 502 virtual void OnConnectionMonitorUpdate( |
503 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); | 503 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); |
504 virtual void OnMediaMonitorUpdate( | 504 virtual void OnMediaMonitorUpdate( |
505 VideoMediaChannel* media_channel, const VideoMediaInfo& info); | 505 VideoMediaChannel* media_channel, const VideoMediaInfo& info); |
506 virtual void OnScreencastWindowEvent(uint32 ssrc, | 506 virtual void OnScreencastWindowEvent(uint32_t ssrc, rtc::WindowEvent event); |
507 rtc::WindowEvent event); | |
508 virtual void OnStateChange(VideoCapturer* capturer, CaptureState ev); | 507 virtual void OnStateChange(VideoCapturer* capturer, CaptureState ev); |
509 bool GetLocalSsrc(const VideoCapturer* capturer, uint32* ssrc); | 508 bool GetLocalSsrc(const VideoCapturer* capturer, uint32_t* ssrc); |
510 | 509 |
511 VideoRenderer* renderer_; | 510 VideoRenderer* renderer_; |
512 ScreencastMap screencast_capturers_; | 511 ScreencastMap screencast_capturers_; |
513 rtc::scoped_ptr<VideoMediaMonitor> media_monitor_; | 512 rtc::scoped_ptr<VideoMediaMonitor> media_monitor_; |
514 | 513 |
515 rtc::WindowEvent previous_we_; | 514 rtc::WindowEvent previous_we_; |
516 | 515 |
517 // Last VideoSendParameters sent down to the media_channel() via | 516 // Last VideoSendParameters sent down to the media_channel() via |
518 // SetSendParameters. | 517 // SetSendParameters. |
519 VideoSendParameters last_send_params_; | 518 VideoSendParameters last_send_params_; |
(...skipping 21 matching lines...) Expand all Loading... |
541 void StopMediaMonitor(); | 540 void StopMediaMonitor(); |
542 | 541 |
543 // Should be called on the signaling thread only. | 542 // Should be called on the signaling thread only. |
544 bool ready_to_send_data() const { | 543 bool ready_to_send_data() const { |
545 return ready_to_send_data_; | 544 return ready_to_send_data_; |
546 } | 545 } |
547 | 546 |
548 sigslot::signal2<DataChannel*, const DataMediaInfo&> SignalMediaMonitor; | 547 sigslot::signal2<DataChannel*, const DataMediaInfo&> SignalMediaMonitor; |
549 sigslot::signal2<DataChannel*, const std::vector<ConnectionInfo>&> | 548 sigslot::signal2<DataChannel*, const std::vector<ConnectionInfo>&> |
550 SignalConnectionMonitor; | 549 SignalConnectionMonitor; |
551 sigslot::signal3<DataChannel*, | 550 sigslot::signal3<DataChannel*, const ReceiveDataParams&, const rtc::Buffer&> |
552 const ReceiveDataParams&, | |
553 const rtc::Buffer&> | |
554 SignalDataReceived; | 551 SignalDataReceived; |
555 // Signal for notifying when the channel becomes ready to send data. | 552 // Signal for notifying when the channel becomes ready to send data. |
556 // That occurs when the channel is enabled, the transport is writable, | 553 // That occurs when the channel is enabled, the transport is writable, |
557 // both local and remote descriptions are set, and the channel is unblocked. | 554 // both local and remote descriptions are set, and the channel is unblocked. |
558 sigslot::signal1<bool> SignalReadyToSendData; | 555 sigslot::signal1<bool> SignalReadyToSendData; |
559 // Signal for notifying that the remote side has closed the DataChannel. | 556 // Signal for notifying that the remote side has closed the DataChannel. |
560 sigslot::signal1<uint32> SignalStreamClosedRemotely; | 557 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
561 | 558 |
562 protected: | 559 protected: |
563 // downcasts a MediaChannel. | 560 // downcasts a MediaChannel. |
564 virtual DataMediaChannel* media_channel() const { | 561 virtual DataMediaChannel* media_channel() const { |
565 return static_cast<DataMediaChannel*>(BaseChannel::media_channel()); | 562 return static_cast<DataMediaChannel*>(BaseChannel::media_channel()); |
566 } | 563 } |
567 | 564 |
568 private: | 565 private: |
569 struct SendDataMessageData : public rtc::MessageData { | 566 struct SendDataMessageData : public rtc::MessageData { |
570 SendDataMessageData(const SendDataParams& params, | 567 SendDataMessageData(const SendDataParams& params, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 | 616 |
620 virtual void OnMessage(rtc::Message* pmsg); | 617 virtual void OnMessage(rtc::Message* pmsg); |
621 virtual void GetSrtpCryptoSuiteNames(std::vector<std::string>* ciphers) const; | 618 virtual void GetSrtpCryptoSuiteNames(std::vector<std::string>* ciphers) const; |
622 virtual void OnConnectionMonitorUpdate( | 619 virtual void OnConnectionMonitorUpdate( |
623 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); | 620 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); |
624 virtual void OnMediaMonitorUpdate( | 621 virtual void OnMediaMonitorUpdate( |
625 DataMediaChannel* media_channel, const DataMediaInfo& info); | 622 DataMediaChannel* media_channel, const DataMediaInfo& info); |
626 virtual bool ShouldSetupDtlsSrtp() const; | 623 virtual bool ShouldSetupDtlsSrtp() const; |
627 void OnDataReceived( | 624 void OnDataReceived( |
628 const ReceiveDataParams& params, const char* data, size_t len); | 625 const ReceiveDataParams& params, const char* data, size_t len); |
629 void OnDataChannelError(uint32 ssrc, DataMediaChannel::Error error); | 626 void OnDataChannelError(uint32_t ssrc, DataMediaChannel::Error error); |
630 void OnDataChannelReadyToSend(bool writable); | 627 void OnDataChannelReadyToSend(bool writable); |
631 void OnStreamClosedRemotely(uint32 sid); | 628 void OnStreamClosedRemotely(uint32_t sid); |
632 | 629 |
633 rtc::scoped_ptr<DataMediaMonitor> media_monitor_; | 630 rtc::scoped_ptr<DataMediaMonitor> media_monitor_; |
634 // TODO(pthatcher): Make a separate SctpDataChannel and | 631 // TODO(pthatcher): Make a separate SctpDataChannel and |
635 // RtpDataChannel instead of using this. | 632 // RtpDataChannel instead of using this. |
636 DataChannelType data_channel_type_; | 633 DataChannelType data_channel_type_; |
637 bool ready_to_send_data_; | 634 bool ready_to_send_data_; |
638 | 635 |
639 // Last DataSendParameters sent down to the media_channel() via | 636 // Last DataSendParameters sent down to the media_channel() via |
640 // SetSendParameters. | 637 // SetSendParameters. |
641 DataSendParameters last_send_params_; | 638 DataSendParameters last_send_params_; |
642 // Last DataRecvParameters sent down to the media_channel() via | 639 // Last DataRecvParameters sent down to the media_channel() via |
643 // SetRecvParameters. | 640 // SetRecvParameters. |
644 DataRecvParameters last_recv_params_; | 641 DataRecvParameters last_recv_params_; |
645 }; | 642 }; |
646 | 643 |
647 } // namespace cricket | 644 } // namespace cricket |
648 | 645 |
649 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ | 646 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ |
OLD | NEW |