1.1 --- a/epoc32/include/rtp.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/rtp.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,1352 @@
1.4 -rtp.h
1.5 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef RTP_H
1.21 +#define RTP_H
1.22 +
1.23 +#include <es_sock.h>
1.24 +
1.25 +class TRtpEvent;
1.26 +class RRtpSession;
1.27 +class RRtpSendPacket;
1.28 +class RRtpReceivePacket;
1.29 +class RRtpReceiveSource;
1.30 +class RRtpSendSource;
1.31 +class RRtpHeaderExtension;
1.32 +class RRtpCSRCs;
1.33 +class CRtpSession;
1.34 +class CRtpReceiveSource;
1.35 +class CRtpSendSource;
1.36 +class TRtpPacket;
1.37 +
1.38 +class RRtcpRRPart;
1.39 +class RRtcpSRPart;
1.40 +
1.41 +/**
1.42 +@publishedAll
1.43 +@released
1.44 +
1.45 +A set of values that defines the event types that may be handled.
1.46 +
1.47 +See all variants of the RegisterEventCallbackL() function.
1.48 +
1.49 +@see TRtpEvent
1.50 +*/
1.51 +enum TRtpEventType
1.52 + {
1.53 + /**
1.54 + A special event type that is interpreted by all of
1.55 + the RegisterEventCallbackL() set of functions to mean that the registered
1.56 + callback function is to be called for any event except failure events.
1.57 + */
1.58 + ERtpAnyEvent = 0,
1.59 +
1.60 +
1.61 + /**
1.62 + Defines a base value for session events.
1.63 +
1.64 + All session event types have values that are greater than this.
1.65 + */
1.66 + ERtpSessionEventBase = 0x100,
1.67 +
1.68 +
1.69 + /**
1.70 + An event type that indicates that a session-level error has occurred.
1.71 +
1.72 + The event status is a standard Symbian OS error code.
1.73 + The callback parameter is used to register interest in only one
1.74 + type of error.
1.75 + */
1.76 + ERtpSessionFail = 0x101,
1.77 +
1.78 +
1.79 + /**
1.80 + An event type that indicates that a new stream has been received.
1.81 +
1.82 + The event status is the SSRC of the stream.
1.83 + */
1.84 + ERtpNewSource = 0x102,
1.85 +
1.86 +
1.87 + /**
1.88 + An event type that indicates that an RTCP RR (Receiver Report) has been
1.89 + received.
1.90 +
1.91 + The event status is the SSRC of the sender.
1.92 +
1.93 + Note - This event type has not been implemented yet.
1.94 + */
1.95 + ERtpNewRR = 0x103,
1.96 +
1.97 +
1.98 + /**
1.99 + An event type that indicates that a packet bigger than the expected maximum
1.100 + has been received.
1.101 +
1.102 + When this event occurs, the packet is deleted.
1.103 + */
1.104 + ERtpBufferOverflow = 0x104,
1.105 +
1.106 +
1.107 + /**
1.108 + An event type that indicates that a packet has been recived that
1.109 + is smaller than its header.
1.110 +
1.111 + When this event occurs, the packet is deleted.
1.112 + */
1.113 + ERtpUndersizedPacket = 0x105,
1.114 +
1.115 +
1.116 + /**
1.117 + Not an event type, but defines the upper limit for session event
1.118 + type values.
1.119 + */
1.120 + ERtpSessionEventEnd = 0x1ff,
1.121 +
1.122 +
1.123 + /**
1.124 + Not an event type but defines a base value for send stream events.
1.125 +
1.126 + All send stream event types have values that are greater than this.
1.127 + */
1.128 + ERtpSendEventBase = 0x200,
1.129 +
1.130 +
1.131 + /**
1.132 + An event type that indicates that an error has occurred while sending
1.133 + a packet.
1.134 +
1.135 + The event status is a standard Symbian OS error code. The callback parameter
1.136 + is used only to register interest in one type of error.
1.137 + */
1.138 + ERtpSendFail = 0x201,
1.139 +
1.140 +
1.141 + /**
1.142 + An event type that indicates that a send packet operation has succeeded.
1.143 + */
1.144 + ERtpSendSucceeded = 0x202,
1.145 +
1.146 +
1.147 + /**
1.148 + Not an event type, but defines the upper limit for send stream event
1.149 + type values.
1.150 + */
1.151 + ERtpSendEventEnd = 0x2ff,
1.152 +
1.153 +
1.154 + /**
1.155 + Not an event type but defines a base value for receive stream events.
1.156 +
1.157 + All receive stream event types have values that are greater than this.
1.158 + */
1.159 + ERtpSourceEventBase = 0x300,
1.160 +
1.161 +
1.162 + /**
1.163 + An event type that indicates that an error has occurred.
1.164 +
1.165 + The event status is a standard Symbian OS error code. The callback parameter
1.166 + is used only to register interest in one type of error.
1.167 + */
1.168 + ERtpSourceFail = 0x301,
1.169 +
1.170 +
1.171 + /**
1.172 + An event type that indicates that an in-sequence packet has been received.
1.173 + */
1.174 + ERtpPacketReceived = 0x302,
1.175 +
1.176 +
1.177 + /**
1.178 + An event type that indicates that the codec has changed.
1.179 +
1.180 + The event status is the new payload type.
1.181 + */
1.182 + ERtpCodecChange = 0x303,
1.183 +
1.184 +
1.185 + /**
1.186 + An event type that indicates that a marker packet has arrived.
1.187 + */
1.188 + ERtpMarker = 0x304,
1.189 +
1.190 +
1.191 + /**
1.192 + An event type that indicates that a misordered packet has arrived.
1.193 + */
1.194 + ERtpMisorder = 0x305,
1.195 +
1.196 +
1.197 + /**
1.198 + An event type that indicates that a dropout has been detected.
1.199 + */
1.200 + ERtpDropout = 0x306,
1.201 +
1.202 +
1.203 + /**
1.204 + An event type that indicates that a SDES (Source Description) RTCP packet
1.205 + has been received.
1.206 +
1.207 + For SDES events, the callback parameter is used to specify the type of
1.208 + SDES. Use a value from TRtpSendPacketType
1.209 +
1.210 + The event status is the SSRC of the sender.
1.211 +
1.212 + @see RRtpSession::TRtpSendPacketType
1.213 + */
1.214 + ERtpSDES = 0x307,
1.215 +
1.216 +
1.217 + /**
1.218 + An event type that indicates that a APP (Application Defined) RTCP packet
1.219 + has been received.
1.220 +
1.221 + The event status is the SSRC of the sender.
1.222 +
1.223 + */
1.224 + ERtpAPP = 0x308,
1.225 +
1.226 +
1.227 + /**
1.228 + An event type that indicates that a SR (Sender Report) RTCP packet
1.229 + has been received.
1.230 +
1.231 + The event status is the SSRC of the sender.
1.232 +
1.233 + */
1.234 + ERtpSR = 0x309,
1.235 +
1.236 +
1.237 + /**
1.238 + An event type that indicates that a RR (Receiver Report) RTCP packet
1.239 + has been received.
1.240 +
1.241 + The event status is the SSRC of the sender.
1.242 + */
1.243 + ERtpRR = 0x30a,
1.244 +
1.245 +
1.246 + /**
1.247 + An event type that indicates that a BYE (Goodbye) RTCP packet
1.248 + has been received.
1.249 +
1.250 + The event status is the SSRC of the sender.
1.251 + */
1.252 + ERtpBYE = 0x30b,
1.253 +
1.254 +
1.255 + /**
1.256 + Not an event type, but defines the upper limit for receive stream event
1.257 + type values.
1.258 + */
1.259 + ERtpSourceEventEnd = 0x3ff
1.260 + };
1.261 +
1.262 +
1.263 +/**
1.264 +@publishedAll
1.265 +@released
1.266 +
1.267 +Indicates whether a callback function can be called once, or more than once.
1.268 +
1.269 +The appropriate enum value is passed as an argument to the
1.270 +RegisterEventCallbackL() functions of RRtpSession, RRtpSendSource,
1.271 +and RRtpReceiveSource, or to the equivalent static functions.
1.272 +
1.273 +@see RRtpSession
1.274 +@see RRtpSendSource
1.275 +@see RRtpReceiveSource
1.276 +*/
1.277 +enum TRtpOneShotness
1.278 + {
1.279 + /**
1.280 + Indicates that the call back function can be called more than once.
1.281 + */
1.282 + ERtpNotOneShot = 0,
1.283 +
1.284 +
1.285 + /**
1.286 + Indicates that the call back function is only called once.
1.287 + */
1.288 + ERtpOneShot = 0x40000000
1.289 + };
1.290 +
1.291 +
1.292 +
1.293 +
1.294 +/**
1.295 +@publishedAll
1.296 +*/
1.297 +typedef void (*TRtpCallbackFunction)(TAny* aPtr, const TRtpEvent& aEvent);
1.298 +
1.299 +
1.300 +
1.301 +/**
1.302 +@internalComponent
1.303 +*/
1.304 +const TInt KRtpNoParameter = KRequestPending;
1.305 +
1.306 +
1.307 +//Needed for recv-only option for RTP or RTCP
1.308 +//This must map to TRtpType
1.309 +enum TPacketType
1.310 + {
1.311 + EPacketRtp,
1.312 + EPacketRtcp
1.313 + };
1.314 +
1.315 +
1.316 +
1.317 +
1.318 +/**
1.319 +@publishedAll
1.320 +@released
1.321 +
1.322 +A value that can be passed as the second parameter in a call to either
1.323 +RRtpSendSource::NewSendPacketL() or RRtpSendSource::NewSendPacketLC()
1.324 +to indicate that no exension is required for the RTP send packet.
1.325 +*/
1.326 +const TInt KRtpNoExtension = -1;
1.327 +
1.328 +
1.329 +
1.330 +/**
1.331 +@publishedAll
1.332 +@released
1.333 +
1.334 +A handle to an RTP session.
1.335 +
1.336 +This is the interface to the socket-level RTP service, and provides additional
1.337 +facilities such as header parsing, re-ordering out-of-order packets,
1.338 +demultiplexing multiple sources etc.
1.339 +
1.340 +The class abstracts all RTP information going to/from a RTP socket, and its
1.341 +corresponding RTCP data.
1.342 +
1.343 +Each RTP endpoint on a device needs its own RTP session.
1.344 +
1.345 +Multiple hosts streaming to a port on this device correspond
1.346 +to different RRtpReceiveSource objects associated with the session.
1.347 +
1.348 +The class behaviour assumes that an active scheduler has already been created
1.349 +and started; the class does not function correctly if not.
1.350 +*/
1.351 +class RRtpSession
1.352 + {
1.353 + public:
1.354 + /**
1.355 + A set of bit values passed as a parameter to RRtpSession::SendRTCPPacketL()
1.356 + to specify the SDES (Source Description) items that are to be sent with
1.357 + the packet. One or more of these may be set.
1.358 +
1.359 + @see RRtpSession::SendRTCPPacketL()
1.360 + */
1.361 + enum TRtpSendPacketType
1.362 + {
1.363 + /**
1.364 + Canonical End-Point Identifier SDES Item.
1.365 + */
1.366 + ERtcpPacketCNAME = 1,
1.367 +
1.368 + /**
1.369 + User Name SDES Item.
1.370 + */
1.371 + ERtcpPacketNAME = 2,
1.372 +
1.373 + /**
1.374 + Electronic Mail Address SDES Item.
1.375 + */
1.376 + ERtcpPacketEMAIL = 4,
1.377 +
1.378 + /**
1.379 + Phone Number SDES Item.
1.380 + */
1.381 + ERtcpPacketPHONE = 8,
1.382 +
1.383 + /**
1.384 + Geographic User Location SDES Item.
1.385 + */
1.386 + ERtcpPacketLOC = 16,
1.387 +
1.388 + /**
1.389 + Application or Tool Name SDES Item
1.390 + */
1.391 + ERtcpPacketTOOL = 32,
1.392 +
1.393 + /**
1.394 + Notice/Status SDES Item
1.395 + */
1.396 + ERtcpPacketNOTE = 64,
1.397 +
1.398 + /**
1.399 + Private Extensions SDES Item
1.400 + */
1.401 + ERtcpPacketPRIV = 128
1.402 + };
1.403 +
1.404 + inline RRtpSession();
1.405 + inline TBool IsOpen() const;
1.406 +
1.407 + IMPORT_C void OpenL(RSocketServ& aServer, TSockAddr& aLocalAddr,
1.408 + TSockAddr& aRemoteAddr,
1.409 + TInt aMaxRXSize, RConnection& aConnection, TInt aPriority = EPriorityNormal,
1.410 + const TDesC8& aCNAME = KNullDesC8);
1.411 +
1.412 +
1.413 + IMPORT_C void OpenL(RSocketServ& aServer, TSockAddr& aLocalAddr,
1.414 + TSockAddr& aRemoteAddr,
1.415 + TInt aMaxRXSize, TInt aPriority = EPriorityNormal,
1.416 + const TDesC8& aCNAME = KNullDesC8);
1.417 +
1.418 + /**
1.419 + @publishedPartner
1.420 + @released
1.421 +
1.422 + Opens the session and initialises it.
1.423 +
1.424 + No events will be generated until after control returns to the
1.425 + active scheduler. The client has this time to initialise the
1.426 + object by adding event callbacks.
1.427 +
1.428 + @param aSocket The connected socket.
1.429 + @param aMaxRXSize The maximum size of a received packet.
1.430 + @param aRtcpSocket The RTCP socket.
1.431 + @param aPriority The priority to be used for internal active objects
1.432 + @param aCNAME The CNAME. A sensible default is supplied if none is
1.433 + provided.
1.434 + */
1.435 + IMPORT_C void OpenL(RSocket& aSocket, TInt aMaxRXSize,
1.436 + RSocket& aRtcpSocket,
1.437 + TInt aPriority = EPriorityNormal,
1.438 + const TDesC8& aCNAME = KNullDesC8);
1.439 +
1.440 + IMPORT_C void OpenL(RSocket& aSocket, TInt aMaxRXSize,
1.441 + TInt aPriority = EPriorityNormal);
1.442 +
1.443 + IMPORT_C void Close();
1.444 +
1.445 + IMPORT_C void SetMaxRXSize(TInt aMaxRXSize);
1.446 +
1.447 + IMPORT_C TInt MaxRXSize();
1.448 +
1.449 +
1.450 + /**
1.451 + @publishedPartner
1.452 + @released
1.453 +
1.454 + Sets the estimated bandwidth used by the session.
1.455 +
1.456 + This is used to decide when to send RTCP status packets.
1.457 + The default value is read from a resource file and should be a reasonably
1.458 + sensible default based on the maximum bandwidth of the handset.
1.459 +
1.460 + @param aBandwidth The bandwidth in bps.
1.461 + */
1.462 + IMPORT_C void SetBandwidth(TUint aBandwidth);
1.463 +
1.464 +
1.465 + /**
1.466 + @publishedPartner
1.467 + @released
1.468 +
1.469 + Supplies information about the profile-specific RTP
1.470 + timestamps.
1.471 +
1.472 + This is used to generate the RTP timestamps in RTCP packets.
1.473 + It is not used to generate timestamps in RTP packets as they must
1.474 + accurately relate to the time of the sample.
1.475 +
1.476 + @param aNow The time now in RTP format
1.477 + @param aConversion The number of nanoseconds per RTP timer tick.
1.478 + */
1.479 + IMPORT_C void SetRTPTimeConversion(TUint aNow, TUint aConversion);
1.480 + IMPORT_C RRtpReceiveSource NewReceiveSourceL();
1.481 + IMPORT_C RRtpReceiveSource NewReceiveSourceLC();
1.482 +
1.483 + /**
1.484 + Registers a callback for the specified event.
1.485 +
1.486 + Some compilers may not support templated member functions. A static version
1.487 + of this function is available that offers the same behaviour:
1.488 + RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent&),T*,TRtpOneShotness,TInt)
1.489 +
1.490 + @param aType The type of event.
1.491 + @param aCallback The callback function. The function is templated, and is
1.492 + prototyped to take a pointer to an object of the template
1.493 + type and a const reference to a TRtpEvent. The function
1.494 + returns void.
1.495 + @param aPtr A pointer that is passed to the callback function when
1.496 + that function is called.
1.497 + @param aOneShot Indicates whether the callback function is only
1.498 + called once, or can be called more than once.
1.499 + @param aParameter A parameter to be passed to the registration function.
1.500 + The meaning of this depends entirely on the event type.
1.501 + The parameter is optional - the other overload of this
1.502 + function is available for registrations that don't need
1.503 + to pass a parameter.
1.504 + */
1.505 + template <class T> inline void
1.506 + RegisterEventCallbackL(TRtpEventType aType,
1.507 + void (*aCallback)(T*, const TRtpEvent&),
1.508 + T* aPtr,
1.509 + TRtpOneShotness aOneShot,
1.510 + TInt aParameter)
1.511 + {
1.512 + PrivRegisterEventCallbackL(
1.513 + aType|aOneShot,
1.514 + reinterpret_cast<TRtpCallbackFunction>(aCallback),
1.515 + static_cast<TAny*>(aPtr), aParameter);
1.516 + }
1.517 +
1.518 + /**
1.519 + Registers a callback for the specified event.
1.520 +
1.521 + Some compilers may not support templated member functions. A static version
1.522 + of this function is available that offers the same behaviour:
1.523 + RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent&),T*,TRtpOneShotness)
1.524 +
1.525 + @param aType The type of event.
1.526 + @param aCallback The callback function. The function is templated, and is
1.527 + prototyped to take a pointer to an object of the template
1.528 + type and a const reference to a TRtpEvent. The function
1.529 + returns void.
1.530 + @param aPtr A pointer that is passed to the callback function when
1.531 + that function is called.
1.532 + @param aOneShot Indicates whether the callback function is only
1.533 + called once, or can be called more than once. If not
1.534 + specified, the default is to allow the callback function
1.535 + to be called more than once.
1.536 + */
1.537 + template <class T> inline void
1.538 + RegisterEventCallbackL(TRtpEventType aType,
1.539 + void (*aCallback)(T*, const TRtpEvent&),
1.540 + T* aPtr,
1.541 + TRtpOneShotness aOneShot = ERtpNotOneShot)
1.542 + {
1.543 + PrivRegisterEventCallbackL(
1.544 + aType|aOneShot,
1.545 + reinterpret_cast<TRtpCallbackFunction>(aCallback),
1.546 + static_cast<TAny*>(aPtr));
1.547 + }
1.548 +
1.549 +
1.550 + /**
1.551 + @publishedPartner
1.552 + @released
1.553 +
1.554 + Gets an array contining the most recent RR (Receiver Report) from
1.555 + all hosts who are reporting on our send stream.
1.556 +
1.557 + @return The array of RRs.
1.558 + */
1.559 + IMPORT_C RRtcpRRPart GetRRs();
1.560 +
1.561 +
1.562 + /**
1.563 + @publishedPartner
1.564 + @released
1.565 +
1.566 + Gets the data associated with the specified RTCP SDES (Source Description)
1.567 + item.
1.568 +
1.569 + Note a that the PRIV (Private Extensions) SDES item is not supported
1.570 + by this mechanism.
1.571 +
1.572 + @param aType The value identifying the RTCP SDES item.
1.573 +
1.574 + @param aValue A descriptor reference to the SDES item data.
1.575 +
1.576 + @return KErrNotFound if the item type was not found in the most recent RTCP packet
1.577 + KErrNone if the operation is successful
1.578 + */
1.579 + IMPORT_C TInt GetSDES(const TInt aType, TDes8& aValue);
1.580 +
1.581 +
1.582 + /**
1.583 + @publishedPartner
1.584 + @released
1.585 +
1.586 + Sets the data associated with the specified RTCP SDES (Source Description)
1.587 + item for sending in the next SDES packet only.
1.588 +
1.589 + The function Leaves if duplicate values are set for the same CNAME.
1.590 +
1.591 + Note a that the PRIV (Private Extensions) SDES item is not supported
1.592 + by this mechanism.
1.593 +
1.594 + NOTE - This call cannot be used to set a different CNAME for this session.
1.595 + The default CNAME is send with every SDES packets.
1.596 +
1.597 + @param aType The value identfying the RTCP SDES item.
1.598 + @param aValue The SDES item data.
1.599 +
1.600 + @return KErrTooBig if the length of the aValue is more than KMaxSdesItemLength(=255)
1.601 + KErrNone if the operation is successful
1.602 + */
1.603 + IMPORT_C TInt SetSDESL(TInt aType, const TDesC8& aValue);
1.604 +
1.605 + /**
1.606 + @publishedPartner
1.607 + @released
1.608 +
1.609 + Sets the data associated with the PRIV (Private Extensions) SDES item.
1.610 +
1.611 + @param aPrefix The value identfying the RTCP SDES item.
1.612 + @param aValue The SDES item data.
1.613 +
1.614 + @return KErrTooBig if the length of the aValue and aPrefix combined is more
1.615 + than KMaxSdesItemLength(=255)
1.616 + KErrNone if the operation is successful
1.617 + */
1.618 + IMPORT_C TInt SetPRIVL(const TDesC8& aPrefix, const TDesC8& aValue);
1.619 +
1.620 +
1.621 + /**
1.622 + @publishedPartner
1.623 + @released
1.624 + Sends an APP (Application Defined) RTCP Packet.
1.625 +
1.626 + The packet is sent immediately.
1.627 +
1.628 + If used with RTCP auto-send, the function disrupts the auto-send
1.629 + intervals. Note however that Symbian reserves the right to fix this.
1.630 +
1.631 + @param aApp A handle to a RTCP APP (Application Defined) packet,
1.632 + for experimental extensions to RTCP.
1.633 + */
1.634 + IMPORT_C void SendAPPL(const TDesC8& aName, const TDesC8& aAppData = KNullDesC8, TUint8 aSubType = 0);
1.635 +
1.636 +
1.637 + /**
1.638 + @publishedPartner
1.639 + @released
1.640 +
1.641 + Enables or disables the automatic sending of RTCP SR (Sender Report),
1.642 + RR (Receiver Report), and SDES (Source Description) packets.
1.643 +
1.644 + Note that if automatic sending is not enabled and RTCP sending is required,
1.645 + then explicit calls to SendRTCPPacketL() will be required.
1.646 +
1.647 + @param aAutoSend ETrue, if RTCP packets need to be send automatically
1.648 + EFalse otherwise.
1.649 +
1.650 + @see RRtpSession::SendRTCPPacketL()
1.651 + */
1.652 + IMPORT_C void SetRTCPAutoSend(TBool aAutoSend);
1.653 +
1.654 +
1.655 + /**
1.656 + @publishedPartner
1.657 + @released
1.658 +
1.659 + Gets the RTCP Auto Send status.
1.660 +
1.661 + @return True, if RTCP SR, RR and SDES packets are automatically sent,
1.662 + false otherwise
1.663 +
1.664 + @see RRtpSession::SetRTCPAutoSend()
1.665 + */
1.666 + IMPORT_C TBool RTCPAutoSend() const;
1.667 +
1.668 + /**
1.669 + @publishedPartner
1.670 + @released
1.671 +
1.672 + Sets the RTCP Auto Send interval.
1.673 + This disables the RFC based calculation of RTCP intervals.
1.674 + To re-enable auto calculation, set the interval to zero.
1.675 +
1.676 + @param aInterval Time interval after which an RTCP auto-send will take place
1.677 + */
1.678 + IMPORT_C void SetRtcpInterval(TTimeIntervalMicroSeconds32& aInterval);
1.679 +
1.680 + /**
1.681 + @publishedPartner
1.682 + @released
1.683 + Enables Receive only option for rtp or rtcp
1.684 +
1.685 + @param aRtpOrRtcp Takes the values from the enum TPacketType
1.686 +
1.687 + @see RRtpSession::DontReceive()
1.688 + */
1.689 + IMPORT_C void DontReceive(TInt aRtpOrRtcp);
1.690 +
1.691 + /**
1.692 + @publishedPartner
1.693 + @released
1.694 + Sends an RTCP packet now.
1.695 +
1.696 + Calling this function doesn't make much sense if auto-send is
1.697 + on, as it will result in packets being sent at rather
1.698 + incoherent intervals.
1.699 +
1.700 + @param aPacketType Zero or more of the bit values defined by
1.701 + the TRtpSendPacketType enum. The packet sent will
1.702 + contain a SR (Sender Report) or RR (Receiver Report),
1.703 + depending on whether any packets have actually been
1.704 + sent, together with all SDES (Source Description) items
1.705 + specified by this parameter.
1.706 +
1.707 + @see TRtpSendPacketType
1.708 + */
1.709 + IMPORT_C void SendRTCPPacketL(TDesC8& aPacket);
1.710 +
1.711 +
1.712 + /**
1.713 + @publishedPartner
1.714 + @released
1.715 + Creates a new send stream, and returns the send stream handle.
1.716 +
1.717 + Only one send stream per session is permitted, which means that you must not
1.718 + call this function if the send stream has already been created.
1.719 +
1.720 + As the send stream is an active object, it cannot handle request
1.721 + completion events until control returns to the active scheduler.
1.722 + Typically, clients will want to add event registrations before that.
1.723 +
1.724 + The Code panics if the SendSource has alredy been opened.
1.725 +
1.726 + @return The send stream handle.
1.727 +
1.728 + This function may leave if memory is not enough.
1.729 + */
1.730 + IMPORT_C RRtpSendSource NewSendSourceL();
1.731 +
1.732 +
1.733 + /**
1.734 + @publishedPartner
1.735 + @released
1.736 +
1.737 + Gets the handle to the send stream object associated with this session.
1.738 +
1.739 + The send stream object is the one created in a previous call
1.740 + to NewSendSourceL(). If the send stream object has not been created, then
1.741 + the returned handle will refer to a closed send stream.
1.742 +
1.743 + @return The handle to the send stream object.
1.744 +
1.745 + @see RRtpSendSource NewSendSourceL()
1.746 + */
1.747 + IMPORT_C RRtpSendSource SendSource();
1.748 +
1.749 +
1.750 + /**
1.751 + @publishedPartner
1.752 + @released
1.753 +
1.754 + Sets the number of sequential packets that must be received
1.755 + before a stream is considered good.
1.756 +
1.757 + Sets the maximum number of dropped packets to be considered a
1.758 + dropout, as opposed to an ended and restarted stream.
1.759 +
1.760 + Sets the maximum number of packets by which a packet can be delayed
1.761 + before it is considered dropped.
1.762 +
1.763 + @param aMaxMisorder The maximum number of packets.
1.764 +
1.765 + @param aMaxDropout The number of sequential packets.
1.766 +
1.767 + @param aMinSequential The number of sequential packets.
1.768 + @post The session will be 'restarted',
1.769 + i.e. it resets the sequence number sequence and resets all RTCP statistics.
1.770 + */
1.771 + IMPORT_C void SetRtpStreamParameters(TInt aMinSequential, TInt aMaxMisorder, TInt aMaxDropout);
1.772 +
1.773 + inline TBool operator == (RRtpSession aThat) const;
1.774 + inline TBool operator != (RRtpSession aThat) const;
1.775 +
1.776 + /**
1.777 + @publishedPartner
1.778 + @released
1.779 +
1.780 + The event manager contains a number of callback registrations, each of which
1.781 + binds a function and pointer (normally an object) to a particular kind of
1.782 + event. Registrations can be bound to all events on a stream.
1.783 +
1.784 + If a function is registered for a particular event, it will be called when
1.785 + that event occurs. One callback function can be associated with more than 1
1.786 + callback registration. Callback functions take a pointer argument
1.787 + which was supplied as part of the registration
1.788 +
1.789 + @param aType Event type
1.790 +
1.791 + @param aCallback Callback object
1.792 +
1.793 + @param aPtr Pointer to data that needs to be passed to the callback function
1.794 +
1.795 + @param aParameter Parameter to be passed to internal callback subsystem
1.796 + */
1.797 + IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
1.798 + TRtpCallbackFunction aCallback,
1.799 + TAny* aPtr,
1.800 + TInt aParameter);
1.801 +
1.802 + /**
1.803 + @publishedPartner
1.804 + @released
1.805 +
1.806 + The event manager contains a number of callback registrations, each of which
1.807 + binds a function and pointer (normally an object) to a particular kind of
1.808 + event. Registrations can be bound to all events on a stream.
1.809 +
1.810 + If a function is registered for a particular event, it will be called when
1.811 + that event occurs. One callback function can be associated with more than 1
1.812 + callback registration. Callback functions take a pointer argument
1.813 + which was supplied as part of the registration
1.814 +
1.815 + @param aType Event type
1.816 +
1.817 + @param aCallback Callback object
1.818 +
1.819 + @param aPtr Pointer to data that needs to be passed to the callback function
1.820 + */
1.821 + IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
1.822 + TRtpCallbackFunction aCallback,
1.823 + TAny* aPtr);
1.824 +
1.825 + private:
1.826 + friend class TRtpEvent;
1.827 + CRtpSession* iPtr;
1.828 + // Note: Comments that start with //\ are pseudo-variables used to get
1.829 + // Doxygen collaboration diagrams to look right. Ignore them.
1.830 + //\ RRtpSendSource sndSource_1_01;
1.831 + //\ RRtpReceiveSource rcvSource_1_n;
1.832 + //\ TRtpCallback callbacks_1_n;
1.833 + //\ TRtpEvent events_1_n;
1.834 + };
1.835 +
1.836 +
1.837 +
1.838 +
1.839 +/**
1.840 +@publishedAll
1.841 +@released
1.842 +
1.843 +A handle to a send stream.
1.844 +
1.845 +Use this class to manage the creation and sending of packets.
1.846 +A session can have only one send stream.
1.847 +
1.848 +Only one packet can be sent at any one time.
1.849 +Once a packet has been sent, the packet cannot be closed and no further packets
1.850 +can be sent until an event signalling the completion of the send operation has
1.851 +occurred. This will be one of the events defined by the enum values:
1.852 +ERtpSendSucceeded and ERtpSendFail.
1.853 +
1.854 +A client must monitor these events so that it can schedule the sending of
1.855 +subsequent packets.
1.856 +It does this by implementing and registering callback functions that
1.857 +handle these events.
1.858 +
1.859 +@see TRtpEventType
1.860 +*/
1.861 +class RRtpSendSource
1.862 + {
1.863 + public:
1.864 + inline RRtpSendSource();
1.865 + inline TBool IsOpen() const;
1.866 + IMPORT_C void Close();
1.867 +
1.868 + IMPORT_C void Cancel();
1.869 +
1.870 + template <class T> inline void
1.871 + RegisterEventCallbackL(TRtpEventType aType,
1.872 + void (*aCallback)(T*, const TRtpEvent&),
1.873 + T* aPtr,
1.874 + TRtpOneShotness aOneShot,
1.875 + TInt aParameter)
1.876 + {
1.877 + PrivRegisterEventCallbackL(aType|aOneShot,
1.878 + reinterpret_cast<TRtpCallbackFunction>(aCallback),
1.879 + static_cast<TAny*>(aPtr), aParameter);
1.880 + }
1.881 +
1.882 +
1.883 + template <class T> inline void
1.884 + RegisterEventCallbackL(TRtpEventType aType,
1.885 + void (*aCallback)(T*, const TRtpEvent&),
1.886 + T* aPtr,
1.887 + TRtpOneShotness aOneShot = ERtpNotOneShot)
1.888 + {
1.889 + PrivRegisterEventCallbackL(aType|aOneShot,
1.890 + reinterpret_cast<TRtpCallbackFunction>(aCallback),
1.891 + static_cast<TAny*>(aPtr));
1.892 + }
1.893 +
1.894 +
1.895 +
1.896 + IMPORT_C RRtpSendPacket NewSendPacketL(TInt aPayloadSize = 0,
1.897 + TInt aHeaderExtensionSize =
1.898 + KRtpNoExtension);
1.899 +
1.900 + IMPORT_C RRtpSendPacket NewSendPacketLC(TInt aPayloadSize = 0,
1.901 + TInt aHeaderExtensionSize =
1.902 + KRtpNoExtension);
1.903 +
1.904 + IMPORT_C TBool IsSending();
1.905 + IMPORT_C void SetPayloadType(TUint aPayloadType);
1.906 + IMPORT_C void SetDefaultPayloadSize(TInt aPayloadSize);
1.907 + /**
1.908 + @publishedPartner
1.909 + @released
1.910 +
1.911 + Sends a Bye RTCP packet.
1.912 +
1.913 + @param aReason The reason for sending the Bye RTCP packet.
1.914 + */
1.915 + IMPORT_C void ByeL(TDesC8& aReason);
1.916 + IMPORT_C TUint32 GetLocalSSRC();
1.917 +
1.918 + IMPORT_C void SetAlignment(TInt aAlignment);
1.919 + IMPORT_C TInt Alignment() const;
1.920 +
1.921 + inline TBool operator == (RRtpSendSource aThat) const;
1.922 + inline TBool operator != (RRtpSendSource aThat) const;
1.923 +
1.924 + /**
1.925 + @publishedPartner
1.926 + @released
1.927 +
1.928 + The event manager contains a number of callback registrations, each of which
1.929 + binds a function and pointer (normally an object) to a particular kind of
1.930 + event. Registrations can be bound to all events on a stream.
1.931 +
1.932 + If a function is registered for a particular event, it will be called when
1.933 + that event occurs. One callback function can be associated with more than 1
1.934 + callback registration. Callback functions take a pointer argument
1.935 + which was supplied as part of the registration
1.936 +
1.937 + @param aType Event type
1.938 +
1.939 + @param aCallback Callback object
1.940 +
1.941 + @param aPtr Pointer to data that needs to be passed to the callback function
1.942 +
1.943 + @param aParameter Parameter to be passed to internal callback subsystem
1.944 + */
1.945 + IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
1.946 + TRtpCallbackFunction aCallback,
1.947 + TAny* aPtr,
1.948 + TInt aParameter);
1.949 +
1.950 + /**
1.951 + @publishedPartner
1.952 + @released
1.953 +
1.954 + The event manager contains a number of callback registrations, each of which
1.955 + binds a function and pointer (normally an object) to a particular kind of
1.956 + event. Registrations can be bound to all events on a stream.
1.957 +
1.958 + If a function is registered for a particular event, it will be called when
1.959 + that event occurs. One callback function can be associated with more than 1
1.960 + callback registration. Callback functions take a pointer argument
1.961 + which was supplied as part of the registration
1.962 +
1.963 + @param aType Event type
1.964 +
1.965 + @param aCallback Callback object
1.966 +
1.967 + @param aPtr Pointer to data that needs to be passed to the callback function
1.968 + */
1.969 + IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
1.970 + TRtpCallbackFunction aCallback,
1.971 + TAny* aPtr);
1.972 + private:
1.973 + friend class RRtpSession;
1.974 + friend class TRtpEvent;
1.975 + CRtpSendSource* iPtr;
1.976 + // Note: Comments that start with //\ are pseudo-variables used to get
1.977 + // Doxygen collaboration diagrams to look right. Ignore them.
1.978 + //\ TRtpCallback callbacks_1_n;
1.979 + //\ TRtpEvent events_1_n;
1.980 + //\ TRtpSendPacket packets_1_n;
1.981 + };
1.982 +
1.983 +
1.984 +
1.985 +
1.986 +/**
1.987 +@publishedAll
1.988 +@released
1.989 +
1.990 +A handle to a receive stream.
1.991 +
1.992 +An object of this type represents the stream of data on a single SSRC and
1.993 +delivers the RTP packets and RTCP information in the order they
1.994 +arrive.
1.995 +
1.996 +Note that RTP does not guarantee the order of delivery, which means that the
1.997 +client may want to buffer the data.
1.998 +*/
1.999 +class RRtpReceiveSource
1.1000 + {
1.1001 + public:
1.1002 + RRtpReceiveSource();
1.1003 + inline TBool IsOpen() const;
1.1004 +
1.1005 + IMPORT_C void Close();
1.1006 +
1.1007 +
1.1008 + template <class T> inline void
1.1009 + RegisterEventCallbackL(TRtpEventType aType,
1.1010 + void (*aCallback)(T*, const TRtpEvent&),
1.1011 + T* aPtr,
1.1012 + TRtpOneShotness aOneShot,
1.1013 + TInt aParameter)
1.1014 + {
1.1015 + PrivRegisterEventCallbackL(aType|aOneShot,
1.1016 + reinterpret_cast<TRtpCallbackFunction>(aCallback),
1.1017 + static_cast<TAny*>(aPtr), aParameter);
1.1018 + }
1.1019 +
1.1020 +
1.1021 + template <class T> inline void
1.1022 + RegisterEventCallbackL(TRtpEventType aType,
1.1023 + void (*aCallback)(T*, const TRtpEvent&),
1.1024 + T* aPtr,
1.1025 + TRtpOneShotness aOneShot = ERtpNotOneShot)
1.1026 + {
1.1027 + PrivRegisterEventCallbackL(aType|aOneShot,
1.1028 + reinterpret_cast<TRtpCallbackFunction>(aCallback),
1.1029 + static_cast<TAny*>(aPtr));
1.1030 + }
1.1031 +
1.1032 + /**
1.1033 + @publishedPartner
1.1034 + @released
1.1035 +
1.1036 + Gets the data associated with the specified RTCP SDES (Source Description)
1.1037 + item.
1.1038 +
1.1039 + Note a that the PRIV (Private Extensions) SDES item is not supported
1.1040 + by this mechanism.
1.1041 +
1.1042 + @param aType The value identifying the RTCP SDES item.
1.1043 +
1.1044 + @return A descriptor reference to the SDES item data.
1.1045 + */
1.1046 + IMPORT_C TInt GetSDES(const TInt aType, TDes8& aValue);
1.1047 +
1.1048 +
1.1049 + /**
1.1050 + @publishedPartner
1.1051 + @released
1.1052 +
1.1053 + Gets the most recent SR ((Sender Report) from this SSRC.
1.1054 +
1.1055 + @return A handle to the SR.
1.1056 + */
1.1057 + IMPORT_C RRtcpSRPart GetSR();
1.1058 +
1.1059 +
1.1060 + /**
1.1061 + @publishedPartner
1.1062 + @released
1.1063 +
1.1064 + Gets the reason for a BYE packet.
1.1065 +
1.1066 + @return A descriptor contaning the BYE message. This is
1.1067 + KNullDesC if the source has not sent a BYE packet.
1.1068 + */
1.1069 + IMPORT_C TDesC8& GetByeReason();
1.1070 +
1.1071 +
1.1072 + /**
1.1073 + @publishedPartner
1.1074 + @released
1.1075 +
1.1076 + Parameters from the last APP (Application Defined) packet.
1.1077 +
1.1078 + @param aName Four-bytes application name
1.1079 + @param aAppData Applciation specific data
1.1080 + @param aSubType Application defined sub-type of the APP packet
1.1081 + */
1.1082 + IMPORT_C void GetLastApp(TPtrC8& aName, TPtrC8& aAppData, TUint& aSubType);
1.1083 +
1.1084 + IMPORT_C RRtpReceivePacket Packet();
1.1085 +
1.1086 + /**
1.1087 + @publishedPartner
1.1088 + @released
1.1089 +
1.1090 + Gets the SSRC of the remote end
1.1091 +
1.1092 + @return The SSRC of the remote end
1.1093 + */
1.1094 + IMPORT_C TUint SSRC() const;
1.1095 +
1.1096 + inline TBool operator == (RRtpReceiveSource aThat) const;
1.1097 + inline TBool operator != (RRtpReceiveSource aThat) const;
1.1098 +
1.1099 + /**
1.1100 + @publishedPartner
1.1101 + @released
1.1102 +
1.1103 + The event manager contains a number of callback registrations, each of which
1.1104 + binds a function and pointer (normally an object) to a particular kind of
1.1105 + event. Registrations can be bound to all events on a stream.
1.1106 +
1.1107 + If a function is registered for a particular event, it will be called when
1.1108 + that event occurs. One callback function can be associated with more than 1
1.1109 + callback registration. Callback functions take a pointer argument
1.1110 + which was supplied as part of the registration
1.1111 +
1.1112 + @param aType Event type
1.1113 +
1.1114 + @param aCallback Callback object
1.1115 +
1.1116 + @param aPtr Pointer to data that needs to be passed to the callback function
1.1117 +
1.1118 + @param aParameter Parameter to be passed to internal callback subsystem
1.1119 + */
1.1120 + IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
1.1121 + TRtpCallbackFunction aCallback,
1.1122 + TAny* aPtr, TInt aParameter);
1.1123 +
1.1124 + /**
1.1125 + @publishedPartner
1.1126 + @released
1.1127 +
1.1128 + The event manager contains a number of callback registrations, each of which
1.1129 + binds a function and pointer (normally an object) to a particular kind of
1.1130 + event. Registrations can be bound to all events on a stream.
1.1131 +
1.1132 + If a function is registered for a particular event, it will be called when
1.1133 + that event occurs. One callback function can be associated with more than 1
1.1134 + callback registration. Callback functions take a pointer argument
1.1135 + which was supplied as part of the registration
1.1136 +
1.1137 + @param aType Event type
1.1138 +
1.1139 + @param aCallback Callback object
1.1140 +
1.1141 + @param aPtr Pointer to data that needs to be passed to the callback function
1.1142 + */
1.1143 +
1.1144 + IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
1.1145 + TRtpCallbackFunction aCallback,
1.1146 + TAny* aPtr);
1.1147 + private:
1.1148 + friend class RRtpSession;
1.1149 + friend class TRtpEvent;
1.1150 + CRtpReceiveSource* iPtr;
1.1151 + // Note: Comments that start with //\ are pseudo-variables used to get
1.1152 + // Doxygen collaboration diagrams to look right. Ignore them.
1.1153 + //\ TRtpCallback callbacks_1_n;
1.1154 + //\ TRtpEvent events_1_n;
1.1155 + //\ TRtpReceivePacket packets_1_n;
1.1156 + };
1.1157 +
1.1158 +
1.1159 +
1.1160 +
1.1161 +/**
1.1162 +@publishedAll
1.1163 +@released
1.1164 +
1.1165 +A handle to an RTP packet.
1.1166 +
1.1167 +The packet is accessed through the interface provided by this handle.
1.1168 +*/
1.1169 +class RRtpPacket
1.1170 + {
1.1171 + public:
1.1172 + inline RRtpPacket();
1.1173 + inline TBool IsOpen() const;
1.1174 +
1.1175 + IMPORT_C void Close();
1.1176 + IMPORT_C TPtrC8 Payload() const;
1.1177 + IMPORT_C TUint SequenceNumber() const;
1.1178 + IMPORT_C TUint Timestamp() const;
1.1179 + IMPORT_C TUint SSRC() const;
1.1180 + IMPORT_C RRtpCSRCs CSRCs() const;
1.1181 + IMPORT_C TBool ExtensionPresent() const;
1.1182 + IMPORT_C RRtpHeaderExtension Extension() const;
1.1183 + IMPORT_C TBool Marker() const;
1.1184 + IMPORT_C TUint PayloadType() const;
1.1185 + IMPORT_C TUint Flags() const;
1.1186 +
1.1187 + inline TBool operator == (RRtpPacket aThat) const;
1.1188 + inline TBool operator != (RRtpPacket aThat) const;
1.1189 +
1.1190 + protected:
1.1191 + TRtpPacket* iPtr;
1.1192 + // Note: Comments that start with //\ are pseudo-variables used to get
1.1193 + // Doxygen collaboration diagrams to look right. Ignore them.
1.1194 + //\ RRtpHeaderExtension extension_1_01;
1.1195 + //\ RRtpCSRCs csrcs_1_01;
1.1196 + };
1.1197 +
1.1198 +
1.1199 +
1.1200 +
1.1201 +/**
1.1202 +@publishedAll
1.1203 +@released
1.1204 +
1.1205 +A handle to an RTP packet to be sent (an RTP send packet).
1.1206 +
1.1207 +@see RRtpSendSource
1.1208 +*/
1.1209 +class RRtpSendPacket : public RRtpPacket
1.1210 + {
1.1211 + public:
1.1212 + IMPORT_C void Send();
1.1213 + IMPORT_C TDes8& WritePayload();
1.1214 + IMPORT_C void SetTimestamp(TUint aTimestamp);
1.1215 + IMPORT_C void SetMarker(TBool aMark);
1.1216 + IMPORT_C void SetPayloadType(TUint aPayloadType);
1.1217 + IMPORT_C void SetFlags(TUint aFlags);
1.1218 +
1.1219 + friend class RRtpSendSource;
1.1220 + };
1.1221 +
1.1222 +
1.1223 +
1.1224 +
1.1225 +/**
1.1226 +@publishedAll
1.1227 +@released
1.1228 +
1.1229 +A handle to an RTP packet received from another source.
1.1230 +*/
1.1231 +class RRtpReceivePacket : public RRtpPacket
1.1232 + {
1.1233 + friend class RRtpReceiveSource;
1.1234 + friend class TRtpReceivePacket;
1.1235 + };
1.1236 +
1.1237 +
1.1238 +
1.1239 +
1.1240 +/**
1.1241 +@publishedAll
1.1242 +@released
1.1243 +
1.1244 +An RTP event.
1.1245 +
1.1246 +An event is generated when anything happens that a client might want
1.1247 +to know about. The class encapulates two pieces of information:
1.1248 +1. An event type as defined by a TRtpEventType value.
1.1249 +2. Additional information whose meaning is dependent on the event type.
1.1250 +
1.1251 +Additional information may be implicitly associated with the event, but still
1.1252 +needs to be fetched from another object, for example, when processing
1.1253 +an ERtpPacketReceived event, the packet (represented by a RRtpReceivePacket
1.1254 +handle) must be obtained from the receive stream (represented by a
1.1255 +RRtpReceiveStream handle).
1.1256 +
1.1257 +Events are always associated with either an RTP session, a send stream or
1.1258 +a receive stream, and this class has functions for getting the corresponding
1.1259 +handle.
1.1260 +
1.1261 +@see RRtpSession
1.1262 +@see RRtpSendSource
1.1263 +@see RRtpReceiveSource
1.1264 +*/
1.1265 +class TRtpEvent
1.1266 + {
1.1267 + public:
1.1268 + IMPORT_C TRtpEvent(TRtpEventType aType, TInt aStatus, TAny* aData);
1.1269 + IMPORT_C RRtpSession Session() const;
1.1270 + IMPORT_C RRtpSendSource SendSource() const;
1.1271 + IMPORT_C RRtpReceiveSource ReceiveSource() const;
1.1272 + IMPORT_C TBool IsSessionEvent() const;
1.1273 + IMPORT_C TBool IsSendSourceEvent() const;
1.1274 + IMPORT_C TBool IsReceiveSourceEvent() const;
1.1275 +
1.1276 + inline TRtpEventType Type() const;
1.1277 + inline TInt Status() const;
1.1278 + private:
1.1279 + TRtpEventType iType;
1.1280 + TInt iStatus;
1.1281 + TAny* iData;
1.1282 + };
1.1283 +
1.1284 +
1.1285 +
1.1286 +
1.1287 +/**
1.1288 +@publishedAll
1.1289 +@released
1.1290 +
1.1291 +Reresents an RTP packet's header extension.
1.1292 +
1.1293 +The format of a header extension is profile-defined.
1.1294 +*/
1.1295 +class RRtpHeaderExtension
1.1296 + {
1.1297 + public:
1.1298 + IMPORT_C TUint16 Type() const;
1.1299 + IMPORT_C void SetType(TUint16 aType);
1.1300 + IMPORT_C TPtrC8 Data();
1.1301 + private:
1.1302 + friend class RRtpPacket;
1.1303 + TRtpPacket* iPtr;
1.1304 + };
1.1305 +
1.1306 +
1.1307 +
1.1308 +
1.1309 +/**
1.1310 +@publishedAll
1.1311 +@released
1.1312 +
1.1313 +A handle representing the list of CSRCs in an RTP packet.
1.1314 +*/
1.1315 +class RRtpCSRCs
1.1316 + {
1.1317 + public:
1.1318 + IMPORT_C TInt Count() const;
1.1319 + IMPORT_C TUint operator [](TUint aIndex) const;
1.1320 + private:
1.1321 + friend class RRtpPacket;
1.1322 +
1.1323 + TRtpPacket* iPtr;
1.1324 + };
1.1325 +
1.1326 +
1.1327 +/**
1.1328 +@publishedPartner
1.1329 +
1.1330 +A set of panic codes.
1.1331 +
1.1332 +in release mode, different panic codes, such as
1.1333 +KERN-EXEC 3 may be generated instead.
1.1334 +*/
1.1335 +enum TRtpPanicCode
1.1336 + {
1.1337 + ERtpPacketIsClosed = 1,
1.1338 + ERtpPayloadTypeOutOfRange = 2,
1.1339 + ERtpSessionIsClosed = 3,
1.1340 + ERtpSourceIsClosed = 4,
1.1341 + ERtpNoExtension = 5,
1.1342 + ERtpLeaveInResponseToError = 6,
1.1343 + ERtpCantSend2PacketsAtOnce = 7,
1.1344 + ERtpWrongEventType = 8,
1.1345 + ERtpWrongParameter = 9,
1.1346 + ERtpSendSourceAlreadyOpen = 10,
1.1347 + ERtpSessionAlreadyOpen = 11,
1.1348 + //
1.1349 + ERtpCoreController = 100,
1.1350 + };
1.1351 +
1.1352 +GLREF_C void Panic(TRtpPanicCode aPanicCode);
1.1353 +
1.1354 +#include "rtp.inl"
1.1355 +
1.1356 +#endif // RTP_H