sipXtapi home page


SdpDefaultCodecFactory.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2007-2017 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2008 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 #ifndef _SdpDefaultCodecFactory_h_
15 #define _SdpDefaultCodecFactory_h_
16 
17 // SYSTEM INCLUDES
18 // APPLICATION INCLUDES
19 #include <sdp/SdpCodec.h>
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
29 
37 {
38 /* //////////////////////////// PUBLIC //////////////////////////////////// */
39 public:
40 
41 /* ============================ CREATORS ================================== */
43 
44 
46 
47 /* ============================= MANIPULATORS ============================= */
49 
50 
52 
53 /* ============================== ACCESSORS =============================== */
55 
56 
58  static
59  SdpCodec getCodec(SdpCodec::SdpCodecTypes internalCodecId);
60 
62  static
63  SdpCodec::SdpCodecTypes getCodecType(const char* pCodecName);
64 
66  static
67  OsStatus getCodecNameByType(SdpCodec::SdpCodecTypes codecType, UtlString& codecName);
68 
70  static
71  OsStatus getMimeInfoByType(SdpCodec::SdpCodecTypes codecType,
72  UtlString& mimeSubtype,
73  UtlString& fmtp);
84  static
86  OsStatus getCodecType(const UtlString &mimeSubtype,
87  unsigned sampleRate,
88  unsigned numChannels,
89  const UtlString &fmtp,
90  SdpCodec::SdpCodecTypes &codecType);
102  static int getCodecNames(UtlContainer& codecNames);
104 
106 
107 /* =============================== INQUIRY ================================ */
109 
110 
111 
113 
114 /* //////////////////////////// PROTECTED ///////////////////////////////// */
115 protected:
116 
117 /* //////////////////////////// PRIVATE /////////////////////////////////// */
118 private:
119 
120 };
121 
122 /* ============================ INLINE METHODS ============================ */
123 
124 #endif // _SdpDefaultCodecFactory_h_
SdpCodecTypes
Unique identifier used for each supported codec.
Definition: SdpCodec.h:133
static OsStatus getMimeInfoByType(SdpCodec::SdpCodecTypes codecType, UtlString &mimeSubtype, UtlString &fmtp)
Get MIME-subtype and fmtp strings for given codec type.
Definition: SdpDefaultCodecFactory.cpp:1765
Container for SDP/RTP codec specification.
Definition: SdpCodec.h:123
static OsStatus getCodecNameByType(SdpCodec::SdpCodecTypes codecType, UtlString &codecName)
Get specific codec identified by iCodec.
Definition: SdpDefaultCodecFactory.cpp:1749
static int getCodecNames(UtlContainer &codecNames)
Get the string names for all of the codec types known by the codec factory.
Definition: SdpDefaultCodecFactory.cpp:1818
static SdpCodec getCodec(SdpCodec::SdpCodecTypes internalCodecId)
Get a codec given an internal codec id.
Definition: SdpDefaultCodecFactory.cpp:246
Factory class for generating SDPs for known codec types and converting readable codec names to codec ...
Definition: SdpDefaultCodecFactory.h:36
static SdpCodec::SdpCodecTypes getCodecType(const char *pCodecName)
Converts the readable text codec name into a codec type.
Definition: SdpDefaultCodecFactory.cpp:1734