Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  Sdp.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/. */


/*

         ,-----.                  ,--.  ,--.
        '  .--./ ,--,--.,--.,--.,-'  '-.`--' ,---. ,--,--,
        |  |    ' ,-.  ||  ||  |'-.  .-',--.| .-. ||      `
        '  '--'\\ '-'  |'  ''  '  |  |  |  |' '-' '|  ||  |
         `-----' `--`--' `----'   `--'  `--' `---' `--''--'

                        :+o+-
                      -dNNNNNd.
                      yNNNNNNNs
                      :mNNNNNm-
                       `/sso/``-://-
                        .:+sydNNNNNNms:                      `://`
                 `-/+shmNNNNNNNNNNNNNNNms-                  :mNNNm/
           `-/oydmNNNNNNNNNNNNNNNNNNNNNNNNdo-              +NNNNNN+
       .shmNNNNNNNNNNNmdyo/:dNNNNNNNNNNNNNNNNdo.         `sNNNNNm+
       hNNNNNNNNmhs+:-`   .dNNNNNNNNNNNNNNNNNNNNh+-`    `hNNNNNm:
       -yddyo/:.         -dNNNNm::ymNNNNNNNNNNNNNNNmdy+/dNNNNNd.
                        :mNNNNd.   `/ymNNNNNNNNNNNNNNNNNNNNNNh`
                       +NNNNNh`       `+hNNNNNNNNNNNNNNNNNNNs
                      sNNNNNy`           .yNNNNNm`-/oymNNNm+
                    `yNNNNNo              oNNNNNm`     `-.
                   .dNNNNm/               oNNNNNm`
                   oNNNNm:                +NNNNNm`
                   `+yho.                 +NNNNNm`
                                          +NNNNNNs.
                                          `yNNNNNNmy-
                                            -smNNNNNNh:
                                              .smNNNNNNh/
                                                `omNNNNNNd:
                                                  `+dNNNNNd
                             ````......````          /hmdy-
            `.:/+osyhddmNNMMMMMMMMMMMMMMMMMMMMNNmddhyso+/:.`
     `-+shmNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNmhs+-`
  -smMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMds-
 hMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMh
 yMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMs
  .ohNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNh+.
      ./oydmMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmhyo:.
             `.:/+osyyhddmmNNMMMMMMMMMMMMMMNNmmddhyyso+/:.`

            ,--------.,--.     ,--.           ,--.
            '--.  .--'|  ,---. `--' ,---.     |  | ,---.
               |  |   |  .-.  |,--.(  .-'     |  |(  .-'
               |  |   |  | |  ||  |.-'  `)    |  |.-'  `)
               `--'   `--' `--'`--'`----'     `--'`----'
                                                                ,--.
       ,---.  ,------.  ,------.                  ,--.          |  |
      '   .-' |  .-.  \ |  .--. ' ,--,--.,--.--.,-'  '-. ,--,--.|  |
      `.  `-. |  |  \  :|  '--' |' ,-.  ||  .--''-.  .-'' ,-.  ||  |
      .-'    ||  '--'  /|  | --' \ '-'  ||  |     |  |  \ '-'  |`--'
      `-----' `-------' `--'      `--`--'`--'     `--'   `--`--'.--.
                                                                '__'
*/


#ifndef DOM_MEDIA_WEBRTC_SDP_SDP_H_
#define DOM_MEDIA_WEBRTC_SDP_SDP_H_

#include <ostream>
#include <sstream>

#include "mozilla/UniquePtr.h"
#include "sdp/SdpAttributeList.h"
#include "sdp/SdpEnum.h"
#include "sdp/SdpMediaSection.h"

namespace mozilla {

class SdpOrigin;
class SdpEncryptionKey;
class SdpMediaSection;

/**
 * Base class for an SDP
 */

class Sdp {
 public:
  Sdp() = default;
  virtual ~Sdp() = default;

  virtual UniquePtr<Sdp> Clone() const = 0;

  virtual const SdpOrigin& GetOrigin() const = 0;
  // Note: connection information is always retrieved from media sections
  virtual uint32_t GetBandwidth(const std::string& type) const = 0;

  virtual const SdpAttributeList& GetAttributeList() const = 0;
  virtual SdpAttributeList& GetAttributeList() = 0;

  virtual size_t GetMediaSectionCount() const = 0;
  virtual const SdpMediaSection& GetMediaSection(size_t level) const = 0;
  virtual SdpMediaSection& GetMediaSection(size_t level) = 0;

  virtual SdpMediaSection& AddMediaSection(
      const SdpMediaSection::MediaType media,
      const SdpDirectionAttribute::Direction dir, const uint16_t port,
      const SdpMediaSection::Protocol proto, const sdp::AddrType addrType,
      const std::string& addr) = 0;

  virtual void Serialize(std::ostream&) const = 0;

  std::string ToString() const;
};

inline std::ostream& operator<<(std::ostream& os, const Sdp& sdp) {
  sdp.Serialize(os);
  return os;
}

inline std::string Sdp::ToString() const {
  std::stringstream s;
  s << *this;
  return s.str();
}

class SdpOrigin {
 public:
  SdpOrigin(const std::string& username, const uint64_t sessId,
            const uint64_t sessVer, const sdp::AddrType addrType,
            const std::string& addr)
      : mUsername(username),
        mSessionId(sessId),
        mSessionVersion(sessVer),
        mAddrType(addrType),
        mAddress(addr) {}

  const std::string& GetUsername() const { return mUsername; }

  uint64_t GetSessionId() const { return mSessionId; }

  uint64_t GetSessionVersion() const { return mSessionVersion; }

  sdp::AddrType GetAddrType() const { return mAddrType; }

  const std::string& GetAddress() const { return mAddress; }

  void Serialize(std::ostream& os) const {
    sdp::NetType netType = sdp::kInternet;
    os << "o=" << mUsername << " " << mSessionId << " " << mSessionVersion
       << " " << netType << " " << mAddrType << " " << mAddress << "\r\n";
  }

 private:
  std::string mUsername;
  uint64_t mSessionId;
  uint64_t mSessionVersion;
  sdp::AddrType mAddrType;
  std::string mAddress;
};

inline std::ostream& operator<<(std::ostream& os, const SdpOrigin& origin) {
  origin.Serialize(os);
  return os;
}

}  // namespace mozilla

#endif

Messung V0.5 in Prozent
C=88 H=99 G=93

¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet am  2026-08-26) ¤

*© 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=434850
#Domains=655579