OLD | NEW |
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 |
11 #ifndef WEBRTC_PC_CHANNEL_H_ | 11 #ifndef WEBRTC_PC_CHANNEL_H_ |
12 #define WEBRTC_PC_CHANNEL_H_ | 12 #define WEBRTC_PC_CHANNEL_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <memory> | 15 #include <memory> |
16 #include <set> | 16 #include <set> |
17 #include <string> | 17 #include <string> |
18 #include <utility> | 18 #include <utility> |
19 #include <vector> | 19 #include <vector> |
20 | 20 |
21 #include "webrtc/audio_sink.h" | 21 #include "webrtc/audio_sink.h" |
22 #include "webrtc/base/asyncudpsocket.h" | 22 #include "webrtc/base/asyncudpsocket.h" |
23 #include "webrtc/base/criticalsection.h" | 23 #include "webrtc/base/criticalsection.h" |
24 #include "webrtc/base/network.h" | 24 #include "webrtc/base/network.h" |
25 #include "webrtc/base/sigslot.h" | 25 #include "webrtc/base/sigslot.h" |
26 #include "webrtc/base/window.h" | 26 #include "webrtc/base/window.h" |
27 #include "webrtc/media/base/mediachannel.h" | 27 #include "webrtc/media/base/mediachannel.h" |
28 #include "webrtc/media/base/mediaengine.h" | 28 #include "webrtc/media/base/mediaengine.h" |
29 #include "webrtc/media/base/streamparams.h" | 29 #include "webrtc/media/base/streamparams.h" |
30 #include "webrtc/media/base/videocapturer.h" | |
31 #include "webrtc/media/base/videosinkinterface.h" | 30 #include "webrtc/media/base/videosinkinterface.h" |
| 31 #include "webrtc/media/base/videosourceinterface.h" |
32 #include "webrtc/p2p/base/transportcontroller.h" | 32 #include "webrtc/p2p/base/transportcontroller.h" |
33 #include "webrtc/p2p/client/socketmonitor.h" | 33 #include "webrtc/p2p/client/socketmonitor.h" |
34 #include "webrtc/pc/audiomonitor.h" | 34 #include "webrtc/pc/audiomonitor.h" |
35 #include "webrtc/pc/bundlefilter.h" | 35 #include "webrtc/pc/bundlefilter.h" |
36 #include "webrtc/pc/mediamonitor.h" | 36 #include "webrtc/pc/mediamonitor.h" |
37 #include "webrtc/pc/mediasession.h" | 37 #include "webrtc/pc/mediasession.h" |
38 #include "webrtc/pc/rtcpmuxfilter.h" | 38 #include "webrtc/pc/rtcpmuxfilter.h" |
39 #include "webrtc/pc/srtpfilter.h" | 39 #include "webrtc/pc/srtpfilter.h" |
40 | 40 |
41 namespace webrtc { | 41 namespace webrtc { |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 SetSink(uint32_t ssrc, rtc::VideoSinkInterface<VideoFrame>* sink); | 446 bool SetSink(uint32_t ssrc, rtc::VideoSinkInterface<VideoFrame>* sink); |
447 bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer); | 447 // Register a source. The |ssrc| must correspond to a registered |
| 448 // send stream. |
| 449 void SetSource(uint32_t ssrc, |
| 450 rtc::VideoSourceInterface<cricket::VideoFrame>* source); |
448 // Get statistics about the current media session. | 451 // Get statistics about the current media session. |
449 bool GetStats(VideoMediaInfo* stats); | 452 bool GetStats(VideoMediaInfo* stats); |
450 | 453 |
451 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> | 454 sigslot::signal2<VideoChannel*, const std::vector<ConnectionInfo>&> |
452 SignalConnectionMonitor; | 455 SignalConnectionMonitor; |
453 | 456 |
454 void StartMediaMonitor(int cms); | 457 void StartMediaMonitor(int cms); |
455 void StopMediaMonitor(); | 458 void StopMediaMonitor(); |
456 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; | 459 sigslot::signal2<VideoChannel*, const VideoMediaInfo&> SignalMediaMonitor; |
457 | 460 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 // SetSendParameters. | 609 // SetSendParameters. |
607 DataSendParameters last_send_params_; | 610 DataSendParameters last_send_params_; |
608 // Last DataRecvParameters sent down to the media_channel() via | 611 // Last DataRecvParameters sent down to the media_channel() via |
609 // SetRecvParameters. | 612 // SetRecvParameters. |
610 DataRecvParameters last_recv_params_; | 613 DataRecvParameters last_recv_params_; |
611 }; | 614 }; |
612 | 615 |
613 } // namespace cricket | 616 } // namespace cricket |
614 | 617 |
615 #endif // WEBRTC_PC_CHANNEL_H_ | 618 #endif // WEBRTC_PC_CHANNEL_H_ |
OLD | NEW |