sipXcallLib home page


PtAudioCodec.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 #ifndef _PtAudioCodec_h_
12 #define _PtAudioCodec_h_
13 
14 // SYSTEM INCLUDES
15 //#include <...>
16 
17 // APPLICATION INCLUDES
18 
19 // DEFINES
20 // MACROS
21 // EXTERNAL FUNCTIONS
22 // EXTERNAL VARIABLES
23 // CONSTANTS
24 // STRUCTS
25 // TYPEDEFS
26 // FORWARD DECLARATIONS
27 
28 //: Class containing an RTP encoding type definintion
29 // This class is used to contain the definition of an RTP encoding type.
30 // The RTP encoding type is used during call setup to negotiate and come
31 // to an agreement as to what RTP encoding will be used by the parties of
32 // a call. This class encapsulates the RTP encoding type and definitions
33 // for parameters such as sample size, sample rate, number of channels and
34 // encoding method.
35 // <BR>
36 // The currentl implementation does not allow free form definition of all of
37 // the RTP encoding parameters. A fixed set of combinations may be specified
38 // using the <I>PtRtpAudioCodecType</I> enumeration.
39 
41 {
42 /* //////////////////////////// PUBLIC //////////////////////////////////// */
43 public:
44 
46  {
51  };
52  //: Predefined RTP encoding parameters
57 
59  {
64  };
65  //: RTP encoding methods
70 
71 /* ============================ CREATORS ================================== */
72 
74  //:Default constructor
75 
76  PtAudioCodec(const PtAudioCodec& rPtAudioCodec);
77  //:Copy constructor
78 
79  virtual
80  ~PtAudioCodec();
81  //:Destructor
82 
83 /* ============================ MANIPULATORS ============================== */
84 
85  PtAudioCodec& operator=(const PtAudioCodec& rhs);
86  //:Assignment operator
87 
88 /* ============================ ACCESSORS ================================= */
89 
91  // int getRtpCodecType() const;
92  //: Get the codec type
94 
96  //: Get the encoding method for this codec
98 
99  int getSampleSize() const;
100  //: Get the sample size for this codec
102 
103  int getSampleRate() const;
104  //: Get the sample rate for this codec
106 
107  int getNumChannels() const;
108  //: Get the number of channels supported for this codec
110 
111 /* ============================ INQUIRY =================================== */
112 
113 /* //////////////////////////// PROTECTED ///////////////////////////////// */
114 protected:
115 
116 /* //////////////////////////// PRIVATE /////////////////////////////////// */
117 private:
123 
124 
125 };
126 
127 /* ============================ INLINE METHODS ============================ */
128 
129 #endif // _PtAudioCodec_h_
int mSampleSize
Definition: PtAudioCodec.h:120
Definition: PtAudioCodec.h:48
int getSampleSize() const
returns: the enumeration for the encoding method for this codec.
Definition: PtAudioCodec.cpp:109
PtRtpAudioCodecType
Definition: PtAudioCodec.h:45
PtRtpAudioEncodingMethod getRtpEncodingMethod() const
returns: The codec type enumeration.
Definition: PtAudioCodec.cpp:103
Definition: PtAudioCodec.h:63
int mNumberOfChannels
Definition: PtAudioCodec.h:122
PtAudioCodec & operator=(const PtAudioCodec &rhs)
Definition: PtAudioCodec.cpp:81
PtAudioCodec(PtRtpAudioCodecType codecType=UNKNOWN_CODEC)
enumcode: UNKNOWN_ENCODING - undefined encoding method. enumcode: MU_LAW - mu-law encoding enumcode: ...
Definition: PtAudioCodec.cpp:29
PtRtpAudioCodecType getRtpCodecType() const
Definition: PtAudioCodec.cpp:97
virtual ~PtAudioCodec()
Definition: PtAudioCodec.cpp:72
Definition: PtAudioCodec.h:61
Definition: PtAudioCodec.h:49
PtRtpAudioEncodingMethod
enumcode: UNKNOWN_CODEC - undefined encoding parameters. enumcode: MU_LAW_8B_8K - mu-law encoding...
Definition: PtAudioCodec.h:58
int getNumChannels() const
returns: The number of samples per second.
Definition: PtAudioCodec.cpp:121
PtRtpAudioCodecType mCodecType
returns: The number of channels.
Definition: PtAudioCodec.h:118
Definition: PtAudioCodec.h:40
PtRtpAudioEncodingMethod mAudioEncodingMethod
Definition: PtAudioCodec.h:119
Definition: PtAudioCodec.h:47
Definition: PtAudioCodec.h:62
Definition: PtAudioCodec.h:50
int mSampleRate
Definition: PtAudioCodec.h:121
int getSampleRate() const
returns: The number of bits per sample
Definition: PtAudioCodec.cpp:115
Definition: PtAudioCodec.h:60