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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "webrtc/p2p/client/socketmonitor.h" | 54 #include "webrtc/p2p/client/socketmonitor.h" |
55 | 55 |
56 namespace webrtc { | 56 namespace webrtc { |
57 class AudioSinkInterface; | 57 class AudioSinkInterface; |
58 } // namespace webrtc | 58 } // namespace webrtc |
59 | 59 |
60 namespace cricket { | 60 namespace cricket { |
61 | 61 |
62 struct CryptoParams; | 62 struct CryptoParams; |
63 class MediaContentDescription; | 63 class MediaContentDescription; |
64 struct ViewRequest; | |
65 | 64 |
66 enum SinkType { | 65 enum SinkType { |
67 SINK_PRE_CRYPTO, // Sink packets before encryption or after decryption. | 66 SINK_PRE_CRYPTO, // Sink packets before encryption or after decryption. |
68 SINK_POST_CRYPTO // Sink packets after encryption or before decryption. | 67 SINK_POST_CRYPTO // Sink packets after encryption or before decryption. |
69 }; | 68 }; |
70 | 69 |
71 // BaseChannel contains logic common to voice and video, including | 70 // BaseChannel contains logic common to voice and video, including |
72 // enable, marshaling calls to a worker thread, and | 71 // enable, marshaling calls to a worker thread, and |
73 // connection and media monitors. | 72 // connection and media monitors. |
74 // | 73 // |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 bool rtcp); | 448 bool rtcp); |
450 ~VideoChannel(); | 449 ~VideoChannel(); |
451 bool Init(); | 450 bool Init(); |
452 | 451 |
453 // downcasts a MediaChannel | 452 // downcasts a MediaChannel |
454 virtual VideoMediaChannel* media_channel() const { | 453 virtual VideoMediaChannel* media_channel() const { |
455 return static_cast<VideoMediaChannel*>(BaseChannel::media_channel()); | 454 return static_cast<VideoMediaChannel*>(BaseChannel::media_channel()); |
456 } | 455 } |
457 | 456 |
458 bool SetRenderer(uint32_t ssrc, VideoRenderer* renderer); | 457 bool SetRenderer(uint32_t ssrc, VideoRenderer* renderer); |
459 bool ApplyViewRequest(const ViewRequest& request); | |
460 | 458 |
461 // TODO(pthatcher): Refactor to use a "capture id" instead of an | 459 // TODO(pthatcher): Refactor to use a "capture id" instead of an |
462 // ssrc here as the "key". | 460 // ssrc here as the "key". |
463 // Passes ownership of the capturer to the channel. | 461 // Passes ownership of the capturer to the channel. |
464 bool AddScreencast(uint32_t ssrc, VideoCapturer* capturer); | 462 bool AddScreencast(uint32_t ssrc, VideoCapturer* capturer); |
465 bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer); | 463 bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer); |
466 bool RemoveScreencast(uint32_t ssrc); | 464 bool RemoveScreencast(uint32_t ssrc); |
467 // True if we've added a screencast. Doesn't matter if the capturer | 465 // True if we've added a screencast. Doesn't matter if the capturer |
468 // has been started or not. | 466 // has been started or not. |
469 bool IsScreencasting(); | 467 bool IsScreencasting(); |
(...skipping 15 matching lines...) Expand all Loading... |
485 | 483 |
486 // overrides from BaseChannel | 484 // overrides from BaseChannel |
487 virtual void ChangeState(); | 485 virtual void ChangeState(); |
488 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); | 486 virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc); |
489 virtual bool SetLocalContent_w(const MediaContentDescription* content, | 487 virtual bool SetLocalContent_w(const MediaContentDescription* content, |
490 ContentAction action, | 488 ContentAction action, |
491 std::string* error_desc); | 489 std::string* error_desc); |
492 virtual bool SetRemoteContent_w(const MediaContentDescription* content, | 490 virtual bool SetRemoteContent_w(const MediaContentDescription* content, |
493 ContentAction action, | 491 ContentAction action, |
494 std::string* error_desc); | 492 std::string* error_desc); |
495 bool ApplyViewRequest_w(const ViewRequest& request); | |
496 | 493 |
497 bool AddScreencast_w(uint32_t ssrc, VideoCapturer* capturer); | 494 bool AddScreencast_w(uint32_t ssrc, VideoCapturer* capturer); |
498 bool RemoveScreencast_w(uint32_t ssrc); | 495 bool RemoveScreencast_w(uint32_t ssrc); |
499 void OnScreencastWindowEvent_s(uint32_t ssrc, rtc::WindowEvent we); | 496 void OnScreencastWindowEvent_s(uint32_t ssrc, rtc::WindowEvent we); |
500 bool IsScreencasting_w() const; | 497 bool IsScreencasting_w() const; |
501 bool GetStats_w(VideoMediaInfo* stats); | 498 bool GetStats_w(VideoMediaInfo* stats); |
502 | 499 |
503 virtual void OnMessage(rtc::Message* pmsg); | 500 virtual void OnMessage(rtc::Message* pmsg); |
504 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; | 501 virtual void GetSrtpCryptoSuites(std::vector<int>* crypto_suites) const; |
505 virtual void OnConnectionMonitorUpdate( | 502 virtual void OnConnectionMonitorUpdate( |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |