OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 VoiceMediaChannel() {} | 966 VoiceMediaChannel() {} |
967 explicit VoiceMediaChannel(const MediaConfig& config) | 967 explicit VoiceMediaChannel(const MediaConfig& config) |
968 : MediaChannel(config) {} | 968 : MediaChannel(config) {} |
969 virtual ~VoiceMediaChannel() {} | 969 virtual ~VoiceMediaChannel() {} |
970 virtual bool SetSendParameters(const AudioSendParameters& params) = 0; | 970 virtual bool SetSendParameters(const AudioSendParameters& params) = 0; |
971 virtual bool SetRecvParameters(const AudioRecvParameters& params) = 0; | 971 virtual bool SetRecvParameters(const AudioRecvParameters& params) = 0; |
972 virtual webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const = 0; | 972 virtual webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const = 0; |
973 virtual bool SetRtpSendParameters( | 973 virtual bool SetRtpSendParameters( |
974 uint32_t ssrc, | 974 uint32_t ssrc, |
975 const webrtc::RtpParameters& parameters) = 0; | 975 const webrtc::RtpParameters& parameters) = 0; |
| 976 // Get the receive parameters for the incoming stream identified by |ssrc|. |
| 977 // If |ssrc| is 0, retrieve the receive parameters for the default receive |
| 978 // stream, which is used when SSRCs are not signaled. Note that calling with |
| 979 // an |ssrc| of 0 will return encoding parameters with an unset |ssrc| |
| 980 // member. |
976 virtual webrtc::RtpParameters GetRtpReceiveParameters( | 981 virtual webrtc::RtpParameters GetRtpReceiveParameters( |
977 uint32_t ssrc) const = 0; | 982 uint32_t ssrc) const = 0; |
978 virtual bool SetRtpReceiveParameters( | 983 virtual bool SetRtpReceiveParameters( |
979 uint32_t ssrc, | 984 uint32_t ssrc, |
980 const webrtc::RtpParameters& parameters) = 0; | 985 const webrtc::RtpParameters& parameters) = 0; |
981 // Starts or stops playout of received audio. | 986 // Starts or stops playout of received audio. |
982 virtual void SetPlayout(bool playout) = 0; | 987 virtual void SetPlayout(bool playout) = 0; |
983 // Starts or stops sending (and potentially capture) of local audio. | 988 // Starts or stops sending (and potentially capture) of local audio. |
984 virtual void SetSend(bool send) = 0; | 989 virtual void SetSend(bool send) = 0; |
985 // Configure stream for sending. | 990 // Configure stream for sending. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 explicit VideoMediaChannel(const MediaConfig& config) | 1051 explicit VideoMediaChannel(const MediaConfig& config) |
1047 : MediaChannel(config) {} | 1052 : MediaChannel(config) {} |
1048 virtual ~VideoMediaChannel() {} | 1053 virtual ~VideoMediaChannel() {} |
1049 | 1054 |
1050 virtual bool SetSendParameters(const VideoSendParameters& params) = 0; | 1055 virtual bool SetSendParameters(const VideoSendParameters& params) = 0; |
1051 virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0; | 1056 virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0; |
1052 virtual webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const = 0; | 1057 virtual webrtc::RtpParameters GetRtpSendParameters(uint32_t ssrc) const = 0; |
1053 virtual bool SetRtpSendParameters( | 1058 virtual bool SetRtpSendParameters( |
1054 uint32_t ssrc, | 1059 uint32_t ssrc, |
1055 const webrtc::RtpParameters& parameters) = 0; | 1060 const webrtc::RtpParameters& parameters) = 0; |
| 1061 // Get the receive parameters for the incoming stream identified by |ssrc|. |
| 1062 // If |ssrc| is 0, retrieve the receive parameters for the default receive |
| 1063 // stream, which is used when SSRCs are not signaled. Note that calling with |
| 1064 // an |ssrc| of 0 will return encoding parameters with an unset |ssrc| |
| 1065 // member. |
1056 virtual webrtc::RtpParameters GetRtpReceiveParameters( | 1066 virtual webrtc::RtpParameters GetRtpReceiveParameters( |
1057 uint32_t ssrc) const = 0; | 1067 uint32_t ssrc) const = 0; |
1058 virtual bool SetRtpReceiveParameters( | 1068 virtual bool SetRtpReceiveParameters( |
1059 uint32_t ssrc, | 1069 uint32_t ssrc, |
1060 const webrtc::RtpParameters& parameters) = 0; | 1070 const webrtc::RtpParameters& parameters) = 0; |
1061 // Gets the currently set codecs/payload types to be used for outgoing media. | 1071 // Gets the currently set codecs/payload types to be used for outgoing media. |
1062 virtual bool GetSendCodec(VideoCodec* send_codec) = 0; | 1072 virtual bool GetSendCodec(VideoCodec* send_codec) = 0; |
1063 // Starts or stops transmission (and potentially capture) of local video. | 1073 // Starts or stops transmission (and potentially capture) of local video. |
1064 virtual bool SetSend(bool send) = 0; | 1074 virtual bool SetSend(bool send) = 0; |
1065 // Configure stream for sending and register a source. | 1075 // Configure stream for sending and register a source. |
1066 // The |ssrc| must correspond to a registered send stream. | 1076 // The |ssrc| must correspond to a registered send stream. |
1067 virtual bool SetVideoSend( | 1077 virtual bool SetVideoSend( |
1068 uint32_t ssrc, | 1078 uint32_t ssrc, |
1069 bool enable, | 1079 bool enable, |
1070 const VideoOptions* options, | 1080 const VideoOptions* options, |
1071 rtc::VideoSourceInterface<webrtc::VideoFrame>* source) = 0; | 1081 rtc::VideoSourceInterface<webrtc::VideoFrame>* source) = 0; |
1072 // Sets the sink object to be used for the specified stream. | 1082 // Sets the sink object to be used for the specified stream. |
1073 // If SSRC is 0, the renderer is used for the 'default' stream. | 1083 // If SSRC is 0, the sink is used for the 'default' stream. |
1074 virtual bool SetSink(uint32_t ssrc, | 1084 virtual bool SetSink(uint32_t ssrc, |
1075 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) = 0; | 1085 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) = 0; |
1076 // Gets quality stats for the channel. | 1086 // Gets quality stats for the channel. |
1077 virtual bool GetStats(VideoMediaInfo* info) = 0; | 1087 virtual bool GetStats(VideoMediaInfo* info) = 0; |
1078 }; | 1088 }; |
1079 | 1089 |
1080 enum DataMessageType { | 1090 enum DataMessageType { |
1081 // Chrome-Internal use only. See SctpDataMediaChannel for the actual PPID | 1091 // Chrome-Internal use only. See SctpDataMediaChannel for the actual PPID |
1082 // values. | 1092 // values. |
1083 DMT_NONE = 0, | 1093 DMT_NONE = 0, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 const char*, | 1205 const char*, |
1196 size_t> SignalDataReceived; | 1206 size_t> SignalDataReceived; |
1197 // Signal when the media channel is ready to send the stream. Arguments are: | 1207 // Signal when the media channel is ready to send the stream. Arguments are: |
1198 // writable(bool) | 1208 // writable(bool) |
1199 sigslot::signal1<bool> SignalReadyToSend; | 1209 sigslot::signal1<bool> SignalReadyToSend; |
1200 }; | 1210 }; |
1201 | 1211 |
1202 } // namespace cricket | 1212 } // namespace cricket |
1203 | 1213 |
1204 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ | 1214 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ |
OLD | NEW |