| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 | 457 |
| 458 // TODO(pthatcher): Refactor to use a "capture id" instead of an | 458 // TODO(pthatcher): Refactor to use a "capture id" instead of an |
| 459 // ssrc here as the "key". | 459 // ssrc here as the "key". |
| 460 // Passes ownership of the capturer to the channel. | 460 // Passes ownership of the capturer to the channel. |
| 461 bool AddScreencast(uint32_t ssrc, VideoCapturer* capturer); | 461 bool AddScreencast(uint32_t ssrc, VideoCapturer* capturer); |
| 462 bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer); | 462 bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer); |
| 463 bool RemoveScreencast(uint32_t ssrc); | 463 bool RemoveScreencast(uint32_t ssrc); |
| 464 // True if we've added a screencast. Doesn't matter if the capturer | 464 // True if we've added a screencast. Doesn't matter if the capturer |
| 465 // has been started or not. | 465 // has been started or not. |
| 466 bool IsScreencasting(); | 466 bool IsScreencasting(); |
| 467 int GetScreencastFps(uint32_t ssrc); | |
| 468 int GetScreencastMaxPixels(uint32_t ssrc); | |
| 469 // Get statistics about the current media session. | 467 // Get statistics about the current media session. |
| 470 bool GetStats(VideoMediaInfo* stats); | 468 bool GetStats(VideoMediaInfo* stats); |
| 471 | 469 |
| 472 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> | 470 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> |
| 473 SignalConnectionMonitor; | 471 SignalConnectionMonitor; |
| 474 | 472 |
| 475 void StartMediaMonitor(int cms); | 473 void StartMediaMonitor(int cms); |
| 476 void StopMediaMonitor(); | 474 void StopMediaMonitor(); |
| 477 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; | 475 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; |
| 478 sigslot::signal2<uint32_t, rtc::WindowEvent> SignalScreencastWindowEvent; | 476 sigslot::signal2<uint32_t, rtc::WindowEvent> SignalScreencastWindowEvent; |
| 479 | 477 |
| 480 bool SendIntraFrame(); | 478 bool SendIntraFrame(); |
| 481 bool RequestIntraFrame(); | 479 bool RequestIntraFrame(); |
| 482 | 480 |
| 483 bool SetVideoSend(uint32_t ssrc, bool enable, const VideoOptions* options); | 481 bool SetVideoSend(uint32_t ssrc, bool enable, const VideoOptions* options); |
| 484 | 482 |
| 485 private: | 483 private: |
| 486 typedef std::map<uint32_t, VideoCapturer*> ScreencastMap; | 484 typedef std::map<uint32_t, VideoCapturer*> ScreencastMap; |
| 487 struct ScreencastDetailsData; | |
| 488 | 485 |
| 489 // overrides from BaseChannel | 486 // overrides from BaseChannel |
| 490 virtual void ChangeState(); | 487 virtual void ChangeState(); |
| 491 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); | 488 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); |
| 492 virtual bool SetLocalContent_w(const MediaContentDescription* content, | 489 virtual bool SetLocalContent_w(const MediaContentDescription* content, |
| 493 ContentAction action, | 490 ContentAction action, |
| 494 std::string* error_desc); | 491 std::string* error_desc); |
| 495 virtual bool SetRemoteContent_w(const MediaContentDescription* content, | 492 virtual bool SetRemoteContent_w(const MediaContentDescription* content, |
| 496 ContentAction action, | 493 ContentAction action, |
| 497 std::string* error_desc); | 494 std::string* error_desc); |
| 498 bool ApplyViewRequest_w(const ViewRequest& request); | 495 bool ApplyViewRequest_w(const ViewRequest& request); |
| 499 | 496 |
| 500 bool AddScreencast_w(uint32_t ssrc, VideoCapturer* capturer); | 497 bool AddScreencast_w(uint32_t ssrc, VideoCapturer* capturer); |
| 501 bool RemoveScreencast_w(uint32_t ssrc); | 498 bool RemoveScreencast_w(uint32_t ssrc); |
| 502 void OnScreencastWindowEvent_s(uint32_t ssrc, rtc::WindowEvent we); | 499 void OnScreencastWindowEvent_s(uint32_t ssrc, rtc::WindowEvent we); |
| 503 bool IsScreencasting_w() const; | 500 bool IsScreencasting_w() const; |
| 504 void GetScreencastDetails_w(ScreencastDetailsData* d) const; | |
| 505 bool GetStats_w(VideoMediaInfo* stats); | 501 bool GetStats_w(VideoMediaInfo* stats); |
| 506 | 502 |
| 507 virtual void OnMessage(rtc::Message* pmsg); | 503 virtual void OnMessage(rtc::Message* pmsg); |
| 508 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; | 504 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; |
| 509 virtual void OnConnectionMonitorUpdate( | 505 virtual void OnConnectionMonitorUpdate( |
| 510 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); | 506 ConnectionMonitor* monitor, const std::vector<ConnectionInfo>& infos); |
| 511 virtual void OnMediaMonitorUpdate( | 507 virtual void OnMediaMonitorUpdate( |
| 512 VideoMediaChannel* media_channel, const VideoMediaInfo& info); | 508 VideoMediaChannel* media_channel, const VideoMediaInfo& info); |
| 513 virtual void OnScreencastWindowEvent(uint32_t ssrc, rtc::WindowEvent event); | 509 virtual void OnScreencastWindowEvent(uint32_t ssrc, rtc::WindowEvent event); |
| 514 virtual void OnStateChange(VideoCapturer* capturer, CaptureState ev); | 510 virtual void OnStateChange(VideoCapturer* capturer, CaptureState ev); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 // SetSendParameters. | 640 // SetSendParameters. |
| 645 DataSendParameters last_send_params_; | 641 DataSendParameters last_send_params_; |
| 646 // Last DataRecvParameters sent down to the media_channel() via | 642 // Last DataRecvParameters sent down to the media_channel() via |
| 647 // SetRecvParameters. | 643 // SetRecvParameters. |
| 648 DataRecvParameters last_recv_params_; | 644 DataRecvParameters last_recv_params_; |
| 649 }; | 645 }; |
| 650 | 646 |
| 651 } // namespace cricket | 647 } // namespace cricket |
| 652 | 648 |
| 653 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ | 649 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ |
| OLD | NEW |