OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 std::vector<VideoCodec> DefaultVideoCodecList(); | 67 std::vector<VideoCodec> DefaultVideoCodecList(); |
68 | 68 |
69 class UnsignalledSsrcHandler { | 69 class UnsignalledSsrcHandler { |
70 public: | 70 public: |
71 enum Action { | 71 enum Action { |
72 kDropPacket, | 72 kDropPacket, |
73 kDeliverPacket, | 73 kDeliverPacket, |
74 }; | 74 }; |
75 virtual Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel, | 75 virtual Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel, |
76 uint32_t ssrc) = 0; | 76 uint32_t ssrc) = 0; |
| 77 virtual ~UnsignalledSsrcHandler() = default; |
77 }; | 78 }; |
78 | 79 |
79 // TODO(pbos): Remove, use external handlers only. | 80 // TODO(pbos): Remove, use external handlers only. |
80 class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler { | 81 class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler { |
81 public: | 82 public: |
82 DefaultUnsignalledSsrcHandler(); | 83 DefaultUnsignalledSsrcHandler(); |
83 Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel, | 84 Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel, |
84 uint32_t ssrc) override; | 85 uint32_t ssrc) override; |
85 | 86 |
86 rtc::VideoSinkInterface<VideoFrame>* GetDefaultSink() const; | 87 rtc::VideoSinkInterface<VideoFrame>* GetDefaultSink() const; |
87 void SetDefaultSink(VideoMediaChannel* channel, | 88 void SetDefaultSink(VideoMediaChannel* channel, |
88 rtc::VideoSinkInterface<VideoFrame>* sink); | 89 rtc::VideoSinkInterface<VideoFrame>* sink); |
| 90 virtual ~DefaultUnsignalledSsrcHandler() = default; |
89 | 91 |
90 private: | 92 private: |
91 uint32_t default_recv_ssrc_; | 93 uint32_t default_recv_ssrc_; |
92 rtc::VideoSinkInterface<VideoFrame>* default_sink_; | 94 rtc::VideoSinkInterface<VideoFrame>* default_sink_; |
93 }; | 95 }; |
94 | 96 |
95 // WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667). | 97 // WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667). |
96 class WebRtcVideoEngine2 { | 98 class WebRtcVideoEngine2 { |
97 public: | 99 public: |
98 WebRtcVideoEngine2(); | 100 WebRtcVideoEngine2(); |
99 ~WebRtcVideoEngine2(); | 101 virtual ~WebRtcVideoEngine2(); |
100 | 102 |
101 // Basic video engine implementation. | 103 // Basic video engine implementation. |
102 void Init(); | 104 void Init(); |
103 | 105 |
104 WebRtcVideoChannel2* CreateChannel(webrtc::Call* call, | 106 WebRtcVideoChannel2* CreateChannel(webrtc::Call* call, |
105 const MediaConfig& config, | 107 const MediaConfig& config, |
106 const VideoOptions& options); | 108 const VideoOptions& options); |
107 | 109 |
108 const std::vector<VideoCodec>& codecs() const; | 110 const std::vector<VideoCodec>& codecs() const; |
109 RtpCapabilities GetCapabilities() const; | 111 RtpCapabilities GetCapabilities() const; |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 // TODO(deadbeef): Don't duplicate information between | 536 // TODO(deadbeef): Don't duplicate information between |
535 // send_params/recv_params, rtp_extensions, options, etc. | 537 // send_params/recv_params, rtp_extensions, options, etc. |
536 VideoSendParameters send_params_; | 538 VideoSendParameters send_params_; |
537 VideoOptions default_send_options_; | 539 VideoOptions default_send_options_; |
538 VideoRecvParameters recv_params_; | 540 VideoRecvParameters recv_params_; |
539 }; | 541 }; |
540 | 542 |
541 } // namespace cricket | 543 } // namespace cricket |
542 | 544 |
543 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 545 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
OLD | NEW |