reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
SdpCodec.cxx
Go to the documentation of this file.
1#include "SdpCodec.hxx"
2
3using namespace sdpcontainer;
4
5SdpCodec::SdpCodec(unsigned int payloadType,
6 const char* mimeType,
7 const char* mimeSubtype,
8 unsigned int rate,
9 unsigned int packetTime,
10 unsigned int numChannels,
11 const char* formatParameters) :
12 mPayloadType(payloadType),
13 mMimeType(mimeType),
14 mMimeSubtype(mimeSubtype),
15 mRate(rate),
16 mPacketTime(packetTime),
17 mNumChannels(numChannels),
18 mFormatParameters(formatParameters)
19{
20}
21
26
30
33{
34 if (this == &rhs)
35 return *this;
36
37 mPayloadType = rhs.mPayloadType;
38 mMimeType = rhs.mMimeType;
39 mMimeSubtype = rhs.mMimeSubtype;
40 mRate = rhs.mRate;
41 mPacketTime = rhs.mPacketTime;
42 mNumChannels = rhs.mNumChannels;
43 mFormatParameters = rhs.mFormatParameters;
44
45 return *this;
46}
47
49sdpcontainer::operator<<( EncodeStream& strm, const SdpCodec& sdpCodec)
50{
51 strm << "SdpCodec: payloadId=" << sdpCodec.mPayloadType
52 << ", mime=" << sdpCodec.mMimeType << "/" << sdpCodec.mMimeSubtype
53 << ", rate=" << sdpCodec.mRate
54 << ", packetTime=" << sdpCodec.mPacketTime
55 << ", numCh=" << sdpCodec.mNumChannels
56 << ", fmtParam=" << sdpCodec.mFormatParameters << std::endl;
57 return strm;
58}
59
60
61/* ====================================================================
62
63 Copyright (c) 2007-2008, Plantronics, Inc.
64 All rights reserved.
65
66 Redistribution and use in source and binary forms, with or without
67 modification, are permitted provided that the following conditions are
68 met:
69
70 1. Redistributions of source code must retain the above copyright
71 notice, this list of conditions and the following disclaimer.
72
73 2. Redistributions in binary form must reproduce the above copyright
74 notice, this list of conditions and the following disclaimer in the
75 documentation and/or other materials provided with the distribution.
76
77 3. Neither the name of Plantronics nor the names of its contributors
78 may be used to endorse or promote products derived from this
79 software without specific prior written permission.
80
81 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
82 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
83 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
84 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
85 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
86 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
87 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
88 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
89 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
90 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
91 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
92
93 ==================================================================== */
94
SdpCodec(unsigned int payloadType, const char *mimeType, const char *mimeSubType, unsigned int rate, unsigned int packetTime, unsigned int numChannels, const char *formatParameters)
Definition SdpCodec.cxx:5
SdpCodec & operator=(const SdpCodec &rhs)
Definition SdpCodec.cxx:32
EncodeStream & operator<<(EncodeStream &strm, const Sdp &)
Definition Sdp.cxx:304
#define EncodeStream
void list()
Definition userAdmin.cxx:66