Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  SdpHelper.h

  Sprache: C
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */


#ifndef DOM_MEDIA_WEBRTC_SDP_SDPHELPER_H_
#define DOM_MEDIA_WEBRTC_SDP_SDPHELPER_H_

#include <map>
#include <string>
#include <vector>

#include "nsError.h"
#include "sdp/SdpAttribute.h"
#include "sdp/SdpMediaSection.h"
#include "transport/m_cpp_utils.h"

namespace mozilla {
class SdpMediaSection;
class Sdp;

class SdpHelper {
 public:
  // Takes a std::string* into which error strings will be written for the
  // lifetime of the SdpHelper.
  explicit SdpHelper(std::string* errorDest) : mLastError(*errorDest) {}
  ~SdpHelper() = default;

  nsresult GetComponent(const std::string& candidate, size_t* component);
  nsresult CopyTransportParams(const size_t numComponents,
                               const SdpMediaSection& source,
                               SdpMediaSection* dest);
  bool AreOldTransportParamsValid(const Sdp& oldAnswer,
                                  const Sdp& offerersPreviousSdp,
                                  const Sdp& newOffer, const size_t level);
  bool IceCredentialsDiffer(const SdpMediaSection& msection1,
                            const SdpMediaSection& msection2);

  bool MsectionIsDisabled(const SdpMediaSection& msection) const;
  static void DisableMsection(Sdp* sdp, SdpMediaSection* msection);

  // Maps each mid to the m-section that owns its bundle transport.
  // Mids that do not appear in an a=group:BUNDLE do not appear here.
  typedef std::map<std::string, const SdpMediaSection*> BundledMids;

  nsresult GetBundledMids(const Sdp& sdp, BundledMids* bundledMids);

  bool OwnsTransport(const Sdp& localSdp, const uint16_t level,
                     const sdp::SdpType type);
  bool OwnsTransport(const SdpMediaSection& msection,
                     const BundledMids& bundledMids, const sdp::SdpType type);
  void GetBundleGroups(const Sdp& sdp,
                       std::vector<SdpGroupAttributeList::Group>* groups) const;

  nsresult GetMidFromLevel(const Sdp& sdp, const uint16_t level,
                           std::string* mid);
  nsresult GetIdsFromMsid(const Sdp& sdp, const SdpMediaSection& msection,
                          std::vector<std::string>* streamId);
  nsresult GetMsids(const SdpMediaSection& msection,
                    std::vector<SdpMsidAttributeList::Msid>* msids);
  nsresult ParseMsid(const std::string& msidAttribute, std::string* streamId,
                     std::string* trackId);
  nsresult AddCandidateToSdp(Sdp* sdp, const std::string& candidate,
                             const uint16_t level, const std::string& ufrag);
  nsresult SetIceGatheringComplete(Sdp* sdp, const std::string& ufrag);
  nsresult SetIceGatheringComplete(Sdp* sdp, const uint16_t level,
                                   const std::string& ufrag);
  void SetDefaultAddresses(const std::string& defaultCandidateAddr,
                           const uint16_t defaultCandidatePort,
                           const std::string& defaultRtcpCandidateAddr,
                           const uint16_t defaultRtcpCandidatePort,
                           SdpMediaSection* msection);
  void SetupMsidSemantic(const std::vector<std::string>& msids, Sdp* sdp) const;

  std::string GetCNAME(const SdpMediaSection& msection) const;

  SdpMediaSection* FindMsectionByMid(Sdp& sdp, const std::string& mid) const;

  const SdpMediaSection* FindMsectionByMid(const Sdp& sdp,
                                           const std::string& mid) const;

  nsresult CopyStickyParams(const SdpMediaSection& source,
                            SdpMediaSection* dest);
  bool HasRtcp(const SdpMediaSection::Protocol proto) const;
  static SdpMediaSection::Protocol GetProtocolForMediaType(
      const SdpMediaSection::MediaType type);
  void AppendSdpParseErrors(
      const std::vector<std::pair<size_t, std::string> >& aErrors,
      std::string* aErrorString);

  static bool GetPtAsInt(const std::string& ptString, uint16_t* ptOutparam);

  void NegotiateAndAddExtmaps(
      const SdpMediaSection& remoteMsection,
      std::vector<SdpExtmapAttributeList::Extmap>& localExtensions,
      SdpMediaSection* localMsection);

  bool SdpMatch(const Sdp& sdp1, const Sdp& sdp2);
  nsresult ValidateTransportAttributes(const Sdp& aSdp,
                                       const sdp::SdpType aType);

 private:
  std::string& mLastError;

  DISALLOW_COPY_ASSIGN(SdpHelper);
};
}  // namespace mozilla

#endif  // DOM_MEDIA_WEBRTC_SDP_SDPHELPER_H_

Messung V0.5 in Prozent
C=93 H=98 G=95

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002