SSL media_session.h
Interaktion und PortierbarkeitC
/* * Copyright 2004 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
// Types and classes used in media session descriptions.
// Forward declaration due to circular dependecy. class ConnectionContext;
} // namespace webrtc
namespace cricket {
class MediaEngineInterface;
// Default RTCP CNAME for unit tests. constchar kDefaultRtcpCname[] = "DefaultRtcpCname";
// Options for an RtpSender contained with an media description/"m=" section. // Note: Spec-compliant Simulcast and legacy simulcast are mutually exclusive. struct SenderOptions {
std::string track_id;
std::vector<std::string> stream_ids; // Use RIDs and Simulcast Layers to indicate spec-compliant Simulcast.
std::vector<RidDescription> rids;
SimulcastLayerList simulcast_layers; // Use `num_sim_layers` to indicate legacy simulcast. int num_sim_layers;
};
// Options for an individual media description/"m=" section. struct MediaDescriptionOptions {
MediaDescriptionOptions(MediaType type, const std::string& mid,
webrtc::RtpTransceiverDirection direction, bool stopped)
: type(type), mid(mid), direction(direction), stopped(stopped) {}
// TODO(deadbeef): When we don't support Plan B, there will only be one // sender per media description and this can be simplified. void AddAudioSender(const std::string& track_id, const std::vector<std::string>& stream_ids); void AddVideoSender(const std::string& track_id, const std::vector<std::string>& stream_ids, const std::vector<RidDescription>& rids, const SimulcastLayerList& simulcast_layers, int num_sim_layers);
MediaType type;
std::string mid;
webrtc::RtpTransceiverDirection direction; bool stopped;
TransportOptions transport_options; // Note: There's no equivalent "RtpReceiverOptions" because only send // stream information goes in the local descriptions.
std::vector<SenderOptions> sender_options;
std::vector<webrtc::RtpCodecCapability> codec_preferences;
std::vector<webrtc::RtpHeaderExtensionCapability> header_extensions; // Codecs to include in a generated offer or answer. // If this is used, session-level codec lists MUST be ignored.
std::vector<Codec> codecs_to_include;
// Provides a mechanism for describing how m= sections should be generated. // The m= section with index X will use media_description_options[X]. There // must be an option for each existing section if creating an answer, or a // subsequent offer. struct MediaSessionOptions {
MediaSessionOptions() {}
bool vad_enabled = true; // When disabled, removes all CN codecs from SDP. bool rtcp_mux_enabled = true; bool bundle_enabled = false; bool offer_extmap_allow_mixed = false; bool raw_packetization_for_video = false;
std::string rtcp_cname = kDefaultRtcpCname;
webrtc::CryptoOptions crypto_options; // List of media description options in the same order that the media // descriptions will be generated.
std::vector<MediaDescriptionOptions> media_description_options;
std::vector<IceParameters> pooled_ice_credentials;
// Use the draft-ietf-mmusic-sctp-sdp-03 obsolete syntax for SCTP // datachannels. // Default is true for backwards compatibility with clients that use // this internal interface. bool use_obsolete_sctp_sdp = true;
};
// Creates media session descriptions according to the supplied codecs and // other fields, as well as the supplied per-call options. // When creating answers, performs the appropriate negotiation // of the various fields to determine the proper result. class MediaSessionDescriptionFactory { public: // This constructor automatically sets up the factory to get its configuration // from the specified MediaEngine (when provided). // The TransportDescriptionFactory, the UniqueRandomIdGenerator, and the // PayloadTypeSuggester are not owned by MediaSessionDescriptionFactory, so // they must be kept alive by the user of this class.
MediaSessionDescriptionFactory(cricket::MediaEngineInterface* media_engine, bool rtx_enabled,
rtc::UniqueRandomIdGenerator* ssrc_generator, const TransportDescriptionFactory* factory,
webrtc::PayloadTypeSuggester* pt_suggester);
bool is_unified_plan_ = false;
Codecs audio_send_codecs_;
Codecs audio_recv_codecs_; // Intersection of send and recv.
Codecs audio_sendrecv_codecs_; // Union of send and recv.
Codecs all_audio_codecs_;
Codecs video_send_codecs_;
Codecs video_recv_codecs_; // Intersection of send and recv.
Codecs video_sendrecv_codecs_; // Union of send and recv.
Codecs all_video_codecs_; // This object may or may not be owned by this class.
webrtc::AlwaysValidPointer<rtc::UniqueRandomIdGenerator> const
ssrc_generator_; bool enable_encrypted_rtp_header_extensions_ = false; const TransportDescriptionFactory* transport_desc_factory_; // Payoad type tracker interface. Must live longer than this object.
webrtc::PayloadTypeSuggester* pt_suggester_; bool payload_types_in_transport_trial_enabled_;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.