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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 ost << "}"; | 830 ost << "}"; |
831 return ost.str(); | 831 return ost.str(); |
832 } | 832 } |
833 | 833 |
834 std::vector<Codec> codecs; | 834 std::vector<Codec> codecs; |
835 std::vector<RtpHeaderExtension> extensions; | 835 std::vector<RtpHeaderExtension> extensions; |
836 // TODO(pthatcher): Add streams. | 836 // TODO(pthatcher): Add streams. |
837 RtcpParameters rtcp; | 837 RtcpParameters rtcp; |
838 }; | 838 }; |
839 | 839 |
| 840 // TODO(deadbeef): Rename to RtpSenderParameters, since they're intended to |
| 841 // encapsulate all the parameters needed for an RtpSender. |
840 template <class Codec> | 842 template <class Codec> |
841 struct RtpSendParameters : RtpParameters<Codec> { | 843 struct RtpSendParameters : RtpParameters<Codec> { |
842 std::string ToString() const override { | 844 std::string ToString() const override { |
843 std::ostringstream ost; | 845 std::ostringstream ost; |
844 ost << "{"; | 846 ost << "{"; |
845 ost << "codecs: " << VectorToString(this->codecs) << ", "; | 847 ost << "codecs: " << VectorToString(this->codecs) << ", "; |
846 ost << "extensions: " << VectorToString(this->extensions) << ", "; | 848 ost << "extensions: " << VectorToString(this->extensions) << ", "; |
847 ost << "max_bandwidth_bps: " << max_bandwidth_bps << ", "; | 849 ost << "max_bandwidth_bps: " << max_bandwidth_bps << ", "; |
848 ost << "}"; | 850 ost << "}"; |
849 return ost.str(); | 851 return ost.str(); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 // DTMF event 0-9, *, #, A-D. | 929 // DTMF event 0-9, *, #, A-D. |
928 virtual bool InsertDtmf(uint32_t ssrc, int event, int duration) = 0; | 930 virtual bool InsertDtmf(uint32_t ssrc, int event, int duration) = 0; |
929 // Gets quality stats for the channel. | 931 // Gets quality stats for the channel. |
930 virtual bool GetStats(VoiceMediaInfo* info) = 0; | 932 virtual bool GetStats(VoiceMediaInfo* info) = 0; |
931 | 933 |
932 virtual void SetRawAudioSink( | 934 virtual void SetRawAudioSink( |
933 uint32_t ssrc, | 935 uint32_t ssrc, |
934 std::unique_ptr<webrtc::AudioSinkInterface> sink) = 0; | 936 std::unique_ptr<webrtc::AudioSinkInterface> sink) = 0; |
935 }; | 937 }; |
936 | 938 |
| 939 // TODO(deadbeef): Rename to VideoSenderParameters, since they're intended to |
| 940 // encapsulate all the parameters needed for a video RtpSender. |
937 struct VideoSendParameters : RtpSendParameters<VideoCodec> { | 941 struct VideoSendParameters : RtpSendParameters<VideoCodec> { |
938 // Use conference mode? This flag comes from the remote | 942 // Use conference mode? This flag comes from the remote |
939 // description's SDP line 'a=x-google-flag:conference', copied over | 943 // description's SDP line 'a=x-google-flag:conference', copied over |
940 // by VideoChannel::SetRemoteContent_w, and ultimately used by | 944 // by VideoChannel::SetRemoteContent_w, and ultimately used by |
941 // conference mode screencast logic in | 945 // conference mode screencast logic in |
942 // WebRtcVideoChannel2::WebRtcVideoSendStream::CreateVideoEncoderConfig. | 946 // WebRtcVideoChannel2::WebRtcVideoSendStream::CreateVideoEncoderConfig. |
943 // The special screencast behaviour is disabled by default. | 947 // The special screencast behaviour is disabled by default. |
944 bool conference_mode = false; | 948 bool conference_mode = false; |
945 }; | 949 }; |
946 | 950 |
| 951 // TODO(deadbeef): Rename to VideoReceiverParameters, since they're intended to |
| 952 // encapsulate all the parameters needed for a video RtpReceiver. |
947 struct VideoRecvParameters : RtpParameters<VideoCodec> { | 953 struct VideoRecvParameters : RtpParameters<VideoCodec> { |
948 }; | 954 }; |
949 | 955 |
950 class VideoMediaChannel : public MediaChannel { | 956 class VideoMediaChannel : public MediaChannel { |
951 public: | 957 public: |
952 enum Error { | 958 enum Error { |
953 ERROR_NONE = 0, // No error. | 959 ERROR_NONE = 0, // No error. |
954 ERROR_OTHER, // Other errors. | 960 ERROR_OTHER, // Other errors. |
955 ERROR_REC_DEVICE_OPEN_FAILED = 100, // Could not open camera. | 961 ERROR_REC_DEVICE_OPEN_FAILED = 100, // Could not open camera. |
956 ERROR_REC_DEVICE_NO_DEVICE, // No camera. | 962 ERROR_REC_DEVICE_NO_DEVICE, // No camera. |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 // Signal when the media channel is ready to send the stream. Arguments are: | 1113 // Signal when the media channel is ready to send the stream. Arguments are: |
1108 // writable(bool) | 1114 // writable(bool) |
1109 sigslot::signal1<bool> SignalReadyToSend; | 1115 sigslot::signal1<bool> SignalReadyToSend; |
1110 // Signal for notifying that the remote side has closed the DataChannel. | 1116 // Signal for notifying that the remote side has closed the DataChannel. |
1111 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; | 1117 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
1112 }; | 1118 }; |
1113 | 1119 |
1114 } // namespace cricket | 1120 } // namespace cricket |
1115 | 1121 |
1116 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ | 1122 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ |
OLD | NEW |