123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- #ifndef API_RTP_TRANSCEIVER_INTERFACE_H_
- #define API_RTP_TRANSCEIVER_INTERFACE_H_
- #include <string>
- #include <vector>
- #include "absl/types/optional.h"
- #include "api/array_view.h"
- #include "api/media_types.h"
- #include "api/rtp_parameters.h"
- #include "api/rtp_receiver_interface.h"
- #include "api/rtp_sender_interface.h"
- #include "api/rtp_transceiver_direction.h"
- #include "api/scoped_refptr.h"
- #include "rtc_base/ref_count.h"
- #include "rtc_base/system/rtc_export.h"
- namespace webrtc {
- struct RTC_EXPORT RtpTransceiverInit final {
- RtpTransceiverInit();
- RtpTransceiverInit(const RtpTransceiverInit&);
- ~RtpTransceiverInit();
-
- RtpTransceiverDirection direction = RtpTransceiverDirection::kSendRecv;
-
- std::vector<std::string> stream_ids;
-
- std::vector<RtpEncodingParameters> send_encodings;
- };
- class RTC_EXPORT RtpTransceiverInterface : public rtc::RefCountInterface {
- public:
-
-
- virtual cricket::MediaType media_type() const = 0;
-
-
-
-
- virtual absl::optional<std::string> mid() const = 0;
-
-
-
-
- virtual rtc::scoped_refptr<RtpSenderInterface> sender() const = 0;
-
-
-
-
- virtual rtc::scoped_refptr<RtpReceiverInterface> receiver() const = 0;
-
-
-
-
-
- virtual bool stopped() const = 0;
-
-
-
-
-
-
-
-
- virtual bool stopping() const;
-
-
-
- virtual RtpTransceiverDirection direction() const = 0;
-
-
-
-
-
-
-
- RTC_DEPRECATED virtual void SetDirection(
- RtpTransceiverDirection new_direction);
- virtual RTCError SetDirectionWithError(RtpTransceiverDirection new_direction);
-
-
-
-
- virtual absl::optional<RtpTransceiverDirection> current_direction() const = 0;
-
-
-
-
-
- virtual absl::optional<RtpTransceiverDirection> fired_direction() const;
-
-
-
-
-
-
- virtual RTCError StopStandard();
-
-
-
- virtual void StopInternal();
- RTC_DEPRECATED virtual void Stop();
-
-
-
- virtual RTCError SetCodecPreferences(
- rtc::ArrayView<RtpCodecCapability> codecs);
- virtual std::vector<RtpCodecCapability> codec_preferences() const;
-
-
-
-
- virtual std::vector<RtpHeaderExtensionCapability> HeaderExtensionsToOffer()
- const;
-
-
-
- virtual webrtc::RTCError SetOfferedRtpHeaderExtensions(
- rtc::ArrayView<const RtpHeaderExtensionCapability>
- header_extensions_to_offer);
- protected:
- ~RtpTransceiverInterface() override = default;
- };
- }
- #endif
|