Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // 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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 class RRtpReceivePacket;
25 class RRtpReceiveSource;
27 class RRtpHeaderExtension;
30 class CRtpReceiveSource;
41 A set of values that defines the event types that may be handled.
43 See all variants of the RegisterEventCallbackL() function.
50 A special event type that is interpreted by all of
51 the RegisterEventCallbackL() set of functions to mean that the registered
52 callback function is to be called for any event except failure events.
58 Defines a base value for session events.
60 All session event types have values that are greater than this.
62 ERtpSessionEventBase = 0x100,
66 An event type that indicates that a session-level error has occurred.
68 The event status is a standard Symbian OS error code.
69 The callback parameter is used to register interest in only one
72 ERtpSessionFail = 0x101,
76 An event type that indicates that a new stream has been received.
78 The event status is the SSRC of the stream.
80 ERtpNewSource = 0x102,
84 An event type that indicates that an RTCP RR (Receiver Report) has been
87 The event status is the SSRC of the sender.
89 Note - This event type has not been implemented yet.
95 An event type that indicates that a packet bigger than the expected maximum
98 When this event occurs, the packet is deleted.
100 ERtpBufferOverflow = 0x104,
104 An event type that indicates that a packet has been recived that
105 is smaller than its header.
107 When this event occurs, the packet is deleted.
109 ERtpUndersizedPacket = 0x105,
113 Not an event type, but defines the upper limit for session event
116 ERtpSessionEventEnd = 0x1ff,
120 Not an event type but defines a base value for send stream events.
122 All send stream event types have values that are greater than this.
124 ERtpSendEventBase = 0x200,
128 An event type that indicates that an error has occurred while sending
131 The event status is a standard Symbian OS error code. The callback parameter
132 is used only to register interest in one type of error.
134 ERtpSendFail = 0x201,
138 An event type that indicates that a send packet operation has succeeded.
140 ERtpSendSucceeded = 0x202,
144 Not an event type, but defines the upper limit for send stream event
147 ERtpSendEventEnd = 0x2ff,
151 Not an event type but defines a base value for receive stream events.
153 All receive stream event types have values that are greater than this.
155 ERtpSourceEventBase = 0x300,
159 An event type that indicates that an error has occurred.
161 The event status is a standard Symbian OS error code. The callback parameter
162 is used only to register interest in one type of error.
164 ERtpSourceFail = 0x301,
168 An event type that indicates that an in-sequence packet has been received.
170 ERtpPacketReceived = 0x302,
174 An event type that indicates that the codec has changed.
176 The event status is the new payload type.
178 ERtpCodecChange = 0x303,
182 An event type that indicates that a marker packet has arrived.
188 An event type that indicates that a misordered packet has arrived.
190 ERtpMisorder = 0x305,
194 An event type that indicates that a dropout has been detected.
200 An event type that indicates that a SDES (Source Description) RTCP packet
203 For SDES events, the callback parameter is used to specify the type of
204 SDES. Use a value from TRtpSendPacketType
206 The event status is the SSRC of the sender.
208 @see RRtpSession::TRtpSendPacketType
214 An event type that indicates that a APP (Application Defined) RTCP packet
217 The event status is the SSRC of the sender.
224 An event type that indicates that a SR (Sender Report) RTCP packet
227 The event status is the SSRC of the sender.
234 An event type that indicates that a RR (Receiver Report) RTCP packet
237 The event status is the SSRC of the sender.
243 An event type that indicates that a BYE (Goodbye) RTCP packet
246 The event status is the SSRC of the sender.
252 Not an event type, but defines the upper limit for receive stream event
255 ERtpSourceEventEnd = 0x3ff
263 Indicates whether a callback function can be called once, or more than once.
265 The appropriate enum value is passed as an argument to the
266 RegisterEventCallbackL() functions of RRtpSession, RRtpSendSource,
267 and RRtpReceiveSource, or to the equivalent static functions.
271 @see RRtpReceiveSource
276 Indicates that the call back function can be called more than once.
282 Indicates that the call back function is only called once.
284 ERtpOneShot = 0x40000000
293 typedef void (*TRtpCallbackFunction)(TAny* aPtr, const TRtpEvent& aEvent);
300 const TInt KRtpNoParameter = KRequestPending;
303 //Needed for recv-only option for RTP or RTCP
304 //This must map to TRtpType
318 A value that can be passed as the second parameter in a call to either
319 RRtpSendSource::NewSendPacketL() or RRtpSendSource::NewSendPacketLC()
320 to indicate that no exension is required for the RTP send packet.
322 const TInt KRtpNoExtension = -1;
330 A handle to an RTP session.
332 This is the interface to the socket-level RTP service, and provides additional
333 facilities such as header parsing, re-ordering out-of-order packets,
334 demultiplexing multiple sources etc.
336 The class abstracts all RTP information going to/from a RTP socket, and its
337 corresponding RTCP data.
339 Each RTP endpoint on a device needs its own RTP session.
341 Multiple hosts streaming to a port on this device correspond
342 to different RRtpReceiveSource objects associated with the session.
344 The class behaviour assumes that an active scheduler has already been created
345 and started; the class does not function correctly if not.
351 A set of bit values passed as a parameter to RRtpSession::SendRTCPPacketL()
352 to specify the SDES (Source Description) items that are to be sent with
353 the packet. One or more of these may be set.
355 @see RRtpSession::SendRTCPPacketL()
357 enum TRtpSendPacketType
360 Canonical End-Point Identifier SDES Item.
362 ERtcpPacketCNAME = 1,
370 Electronic Mail Address SDES Item.
372 ERtcpPacketEMAIL = 4,
375 Phone Number SDES Item.
377 ERtcpPacketPHONE = 8,
380 Geographic User Location SDES Item.
385 Application or Tool Name SDES Item
387 ERtcpPacketTOOL = 32,
390 Notice/Status SDES Item
392 ERtcpPacketNOTE = 64,
395 Private Extensions SDES Item
397 ERtcpPacketPRIV = 128
400 inline RRtpSession();
401 inline TBool IsOpen() const;
403 IMPORT_C void OpenL(RSocketServ& aServer, TSockAddr& aLocalAddr,
404 TSockAddr& aRemoteAddr,
405 TInt aMaxRXSize, RConnection& aConnection, TInt aPriority = EPriorityNormal,
406 const TDesC8& aCNAME = KNullDesC8);
409 IMPORT_C void OpenL(RSocketServ& aServer, TSockAddr& aLocalAddr,
410 TSockAddr& aRemoteAddr,
411 TInt aMaxRXSize, TInt aPriority = EPriorityNormal,
412 const TDesC8& aCNAME = KNullDesC8);
418 Opens the session and initialises it.
420 No events will be generated until after control returns to the
421 active scheduler. The client has this time to initialise the
422 object by adding event callbacks.
424 @param aSocket The connected socket.
425 @param aMaxRXSize The maximum size of a received packet.
426 @param aRtcpSocket The RTCP socket.
427 @param aPriority The priority to be used for internal active objects
428 @param aCNAME The CNAME. A sensible default is supplied if none is
431 IMPORT_C void OpenL(RSocket& aSocket, TInt aMaxRXSize,
432 RSocket& aRtcpSocket,
433 TInt aPriority = EPriorityNormal,
434 const TDesC8& aCNAME = KNullDesC8);
436 IMPORT_C void OpenL(RSocket& aSocket, TInt aMaxRXSize,
437 TInt aPriority = EPriorityNormal);
439 IMPORT_C void Close();
441 IMPORT_C void SetMaxRXSize(TInt aMaxRXSize);
443 IMPORT_C TInt MaxRXSize();
450 Sets the estimated bandwidth used by the session.
452 This is used to decide when to send RTCP status packets.
453 The default value is read from a resource file and should be a reasonably
454 sensible default based on the maximum bandwidth of the handset.
456 @param aBandwidth The bandwidth in bps.
458 IMPORT_C void SetBandwidth(TUint aBandwidth);
465 Supplies information about the profile-specific RTP
468 This is used to generate the RTP timestamps in RTCP packets.
469 It is not used to generate timestamps in RTP packets as they must
470 accurately relate to the time of the sample.
472 @param aNow The time now in RTP format
473 @param aConversion The number of nanoseconds per RTP timer tick.
475 IMPORT_C void SetRTPTimeConversion(TUint aNow, TUint aConversion);
476 IMPORT_C RRtpReceiveSource NewReceiveSourceL();
477 IMPORT_C RRtpReceiveSource NewReceiveSourceLC();
480 Registers a callback for the specified event.
482 Some compilers may not support templated member functions. A static version
483 of this function is available that offers the same behaviour:
484 RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent&),T*,TRtpOneShotness,TInt)
486 @param aType The type of event.
487 @param aCallback The callback function. The function is templated, and is
488 prototyped to take a pointer to an object of the template
489 type and a const reference to a TRtpEvent. The function
491 @param aPtr A pointer that is passed to the callback function when
492 that function is called.
493 @param aOneShot Indicates whether the callback function is only
494 called once, or can be called more than once.
495 @param aParameter A parameter to be passed to the registration function.
496 The meaning of this depends entirely on the event type.
497 The parameter is optional - the other overload of this
498 function is available for registrations that don't need
501 template <class T> inline void
502 RegisterEventCallbackL(TRtpEventType aType,
503 void (*aCallback)(T*, const TRtpEvent&),
505 TRtpOneShotness aOneShot,
508 PrivRegisterEventCallbackL(
510 reinterpret_cast<TRtpCallbackFunction>(aCallback),
511 static_cast<TAny*>(aPtr), aParameter);
515 Registers a callback for the specified event.
517 Some compilers may not support templated member functions. A static version
518 of this function is available that offers the same behaviour:
519 RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent&),T*,TRtpOneShotness)
521 @param aType The type of event.
522 @param aCallback The callback function. The function is templated, and is
523 prototyped to take a pointer to an object of the template
524 type and a const reference to a TRtpEvent. The function
526 @param aPtr A pointer that is passed to the callback function when
527 that function is called.
528 @param aOneShot Indicates whether the callback function is only
529 called once, or can be called more than once. If not
530 specified, the default is to allow the callback function
531 to be called more than once.
533 template <class T> inline void
534 RegisterEventCallbackL(TRtpEventType aType,
535 void (*aCallback)(T*, const TRtpEvent&),
537 TRtpOneShotness aOneShot = ERtpNotOneShot)
539 PrivRegisterEventCallbackL(
541 reinterpret_cast<TRtpCallbackFunction>(aCallback),
542 static_cast<TAny*>(aPtr));
550 Gets an array contining the most recent RR (Receiver Report) from
551 all hosts who are reporting on our send stream.
553 @return The array of RRs.
555 IMPORT_C RRtcpRRPart GetRRs();
562 Gets the data associated with the specified RTCP SDES (Source Description)
565 Note a that the PRIV (Private Extensions) SDES item is not supported
568 @param aType The value identifying the RTCP SDES item.
570 @param aValue A descriptor reference to the SDES item data.
572 @return KErrNotFound if the item type was not found in the most recent RTCP packet
573 KErrNone if the operation is successful
575 IMPORT_C TInt GetSDES(const TInt aType, TDes8& aValue);
582 Sets the data associated with the specified RTCP SDES (Source Description)
583 item for sending in the next SDES packet only.
585 The function Leaves if duplicate values are set for the same CNAME.
587 Note a that the PRIV (Private Extensions) SDES item is not supported
590 NOTE - This call cannot be used to set a different CNAME for this session.
591 The default CNAME is send with every SDES packets.
593 @param aType The value identfying the RTCP SDES item.
594 @param aValue The SDES item data.
596 @return KErrTooBig if the length of the aValue is more than KMaxSdesItemLength(=255)
597 KErrNone if the operation is successful
599 IMPORT_C TInt SetSDESL(TInt aType, const TDesC8& aValue);
605 Sets the data associated with the PRIV (Private Extensions) SDES item.
607 @param aPrefix The value identfying the RTCP SDES item.
608 @param aValue The SDES item data.
610 @return KErrTooBig if the length of the aValue and aPrefix combined is more
611 than KMaxSdesItemLength(=255)
612 KErrNone if the operation is successful
614 IMPORT_C TInt SetPRIVL(const TDesC8& aPrefix, const TDesC8& aValue);
620 Sends an APP (Application Defined) RTCP Packet.
622 The packet is sent immediately.
624 If used with RTCP auto-send, the function disrupts the auto-send
625 intervals. Note however that Symbian reserves the right to fix this.
627 @param aApp A handle to a RTCP APP (Application Defined) packet,
628 for experimental extensions to RTCP.
630 IMPORT_C void SendAPPL(const TDesC8& aName, const TDesC8& aAppData = KNullDesC8, TUint8 aSubType = 0);
637 Enables or disables the automatic sending of RTCP SR (Sender Report),
638 RR (Receiver Report), and SDES (Source Description) packets.
640 Note that if automatic sending is not enabled and RTCP sending is required,
641 then explicit calls to SendRTCPPacketL() will be required.
643 @param aAutoSend ETrue, if RTCP packets need to be send automatically
646 @see RRtpSession::SendRTCPPacketL()
648 IMPORT_C void SetRTCPAutoSend(TBool aAutoSend);
655 Gets the RTCP Auto Send status.
657 @return True, if RTCP SR, RR and SDES packets are automatically sent,
660 @see RRtpSession::SetRTCPAutoSend()
662 IMPORT_C TBool RTCPAutoSend() const;
668 Sets the RTCP Auto Send interval.
669 This disables the RFC based calculation of RTCP intervals.
670 To re-enable auto calculation, set the interval to zero.
672 @param aInterval Time interval after which an RTCP auto-send will take place
674 IMPORT_C void SetRtcpInterval(TTimeIntervalMicroSeconds32& aInterval);
679 Enables Receive only option for rtp or rtcp
681 @param aRtpOrRtcp Takes the values from the enum TPacketType
683 @see RRtpSession::DontReceive()
685 IMPORT_C void DontReceive(TInt aRtpOrRtcp);
690 Sends an RTCP packet now.
692 Calling this function doesn't make much sense if auto-send is
693 on, as it will result in packets being sent at rather
694 incoherent intervals.
696 @param aPacketType Zero or more of the bit values defined by
697 the TRtpSendPacketType enum. The packet sent will
698 contain a SR (Sender Report) or RR (Receiver Report),
699 depending on whether any packets have actually been
700 sent, together with all SDES (Source Description) items
701 specified by this parameter.
703 @see TRtpSendPacketType
705 IMPORT_C void SendRTCPPacketL(TDesC8& aPacket);
711 Creates a new send stream, and returns the send stream handle.
713 Only one send stream per session is permitted, which means that you must not
714 call this function if the send stream has already been created.
716 As the send stream is an active object, it cannot handle request
717 completion events until control returns to the active scheduler.
718 Typically, clients will want to add event registrations before that.
720 The Code panics if the SendSource has alredy been opened.
722 @return The send stream handle.
724 This function may leave if memory is not enough.
726 IMPORT_C RRtpSendSource NewSendSourceL();
733 Gets the handle to the send stream object associated with this session.
735 The send stream object is the one created in a previous call
736 to NewSendSourceL(). If the send stream object has not been created, then
737 the returned handle will refer to a closed send stream.
739 @return The handle to the send stream object.
741 @see RRtpSendSource NewSendSourceL()
743 IMPORT_C RRtpSendSource SendSource();
750 Sets the number of sequential packets that must be received
751 before a stream is considered good.
753 Sets the maximum number of dropped packets to be considered a
754 dropout, as opposed to an ended and restarted stream.
756 Sets the maximum number of packets by which a packet can be delayed
757 before it is considered dropped.
759 @param aMaxMisorder The maximum number of packets.
761 @param aMaxDropout The number of sequential packets.
763 @param aMinSequential The number of sequential packets.
764 @post The session will be 'restarted',
765 i.e. it resets the sequence number sequence and resets all RTCP statistics.
767 IMPORT_C void SetRtpStreamParameters(TInt aMinSequential, TInt aMaxMisorder, TInt aMaxDropout);
769 inline TBool operator == (RRtpSession aThat) const;
770 inline TBool operator != (RRtpSession aThat) const;
776 The event manager contains a number of callback registrations, each of which
777 binds a function and pointer (normally an object) to a particular kind of
778 event. Registrations can be bound to all events on a stream.
780 If a function is registered for a particular event, it will be called when
781 that event occurs. One callback function can be associated with more than 1
782 callback registration. Callback functions take a pointer argument
783 which was supplied as part of the registration
785 @param aType Event type
787 @param aCallback Callback object
789 @param aPtr Pointer to data that needs to be passed to the callback function
791 @param aParameter Parameter to be passed to internal callback subsystem
793 IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
794 TRtpCallbackFunction aCallback,
802 The event manager contains a number of callback registrations, each of which
803 binds a function and pointer (normally an object) to a particular kind of
804 event. Registrations can be bound to all events on a stream.
806 If a function is registered for a particular event, it will be called when
807 that event occurs. One callback function can be associated with more than 1
808 callback registration. Callback functions take a pointer argument
809 which was supplied as part of the registration
811 @param aType Event type
813 @param aCallback Callback object
815 @param aPtr Pointer to data that needs to be passed to the callback function
817 IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
818 TRtpCallbackFunction aCallback,
822 friend class TRtpEvent;
824 // Note: Comments that start with //\ are pseudo-variables used to get
825 // Doxygen collaboration diagrams to look right. Ignore them.
826 //\ RRtpSendSource sndSource_1_01;
827 //\ RRtpReceiveSource rcvSource_1_n;
828 //\ TRtpCallback callbacks_1_n;
829 //\ TRtpEvent events_1_n;
839 A handle to a send stream.
841 Use this class to manage the creation and sending of packets.
842 A session can have only one send stream.
844 Only one packet can be sent at any one time.
845 Once a packet has been sent, the packet cannot be closed and no further packets
846 can be sent until an event signalling the completion of the send operation has
847 occurred. This will be one of the events defined by the enum values:
848 ERtpSendSucceeded and ERtpSendFail.
850 A client must monitor these events so that it can schedule the sending of
852 It does this by implementing and registering callback functions that
860 inline RRtpSendSource();
861 inline TBool IsOpen() const;
862 IMPORT_C void Close();
864 IMPORT_C void Cancel();
866 template <class T> inline void
867 RegisterEventCallbackL(TRtpEventType aType,
868 void (*aCallback)(T*, const TRtpEvent&),
870 TRtpOneShotness aOneShot,
873 PrivRegisterEventCallbackL(aType|aOneShot,
874 reinterpret_cast<TRtpCallbackFunction>(aCallback),
875 static_cast<TAny*>(aPtr), aParameter);
879 template <class T> inline void
880 RegisterEventCallbackL(TRtpEventType aType,
881 void (*aCallback)(T*, const TRtpEvent&),
883 TRtpOneShotness aOneShot = ERtpNotOneShot)
885 PrivRegisterEventCallbackL(aType|aOneShot,
886 reinterpret_cast<TRtpCallbackFunction>(aCallback),
887 static_cast<TAny*>(aPtr));
892 IMPORT_C RRtpSendPacket NewSendPacketL(TInt aPayloadSize = 0,
893 TInt aHeaderExtensionSize =
896 IMPORT_C RRtpSendPacket NewSendPacketLC(TInt aPayloadSize = 0,
897 TInt aHeaderExtensionSize =
900 IMPORT_C TBool IsSending();
901 IMPORT_C void SetPayloadType(TUint aPayloadType);
902 IMPORT_C void SetDefaultPayloadSize(TInt aPayloadSize);
907 Sends a Bye RTCP packet.
909 @param aReason The reason for sending the Bye RTCP packet.
911 IMPORT_C void ByeL(TDesC8& aReason);
912 IMPORT_C TUint32 GetLocalSSRC();
914 IMPORT_C void SetAlignment(TInt aAlignment);
915 IMPORT_C TInt Alignment() const;
917 inline TBool operator == (RRtpSendSource aThat) const;
918 inline TBool operator != (RRtpSendSource aThat) const;
924 The event manager contains a number of callback registrations, each of which
925 binds a function and pointer (normally an object) to a particular kind of
926 event. Registrations can be bound to all events on a stream.
928 If a function is registered for a particular event, it will be called when
929 that event occurs. One callback function can be associated with more than 1
930 callback registration. Callback functions take a pointer argument
931 which was supplied as part of the registration
933 @param aType Event type
935 @param aCallback Callback object
937 @param aPtr Pointer to data that needs to be passed to the callback function
939 @param aParameter Parameter to be passed to internal callback subsystem
941 IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
942 TRtpCallbackFunction aCallback,
950 The event manager contains a number of callback registrations, each of which
951 binds a function and pointer (normally an object) to a particular kind of
952 event. Registrations can be bound to all events on a stream.
954 If a function is registered for a particular event, it will be called when
955 that event occurs. One callback function can be associated with more than 1
956 callback registration. Callback functions take a pointer argument
957 which was supplied as part of the registration
959 @param aType Event type
961 @param aCallback Callback object
963 @param aPtr Pointer to data that needs to be passed to the callback function
965 IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
966 TRtpCallbackFunction aCallback,
969 friend class RRtpSession;
970 friend class TRtpEvent;
971 CRtpSendSource* iPtr;
972 // Note: Comments that start with //\ are pseudo-variables used to get
973 // Doxygen collaboration diagrams to look right. Ignore them.
974 //\ TRtpCallback callbacks_1_n;
975 //\ TRtpEvent events_1_n;
976 //\ TRtpSendPacket packets_1_n;
986 A handle to a receive stream.
988 An object of this type represents the stream of data on a single SSRC and
989 delivers the RTP packets and RTCP information in the order they
992 Note that RTP does not guarantee the order of delivery, which means that the
993 client may want to buffer the data.
995 class RRtpReceiveSource
999 inline TBool IsOpen() const;
1001 IMPORT_C void Close();
1004 template <class T> inline void
1005 RegisterEventCallbackL(TRtpEventType aType,
1006 void (*aCallback)(T*, const TRtpEvent&),
1008 TRtpOneShotness aOneShot,
1011 PrivRegisterEventCallbackL(aType|aOneShot,
1012 reinterpret_cast<TRtpCallbackFunction>(aCallback),
1013 static_cast<TAny*>(aPtr), aParameter);
1017 template <class T> inline void
1018 RegisterEventCallbackL(TRtpEventType aType,
1019 void (*aCallback)(T*, const TRtpEvent&),
1021 TRtpOneShotness aOneShot = ERtpNotOneShot)
1023 PrivRegisterEventCallbackL(aType|aOneShot,
1024 reinterpret_cast<TRtpCallbackFunction>(aCallback),
1025 static_cast<TAny*>(aPtr));
1032 Gets the data associated with the specified RTCP SDES (Source Description)
1035 Note a that the PRIV (Private Extensions) SDES item is not supported
1038 @param aType The value identifying the RTCP SDES item.
1040 @return A descriptor reference to the SDES item data.
1042 IMPORT_C TInt GetSDES(const TInt aType, TDes8& aValue);
1049 Gets the most recent SR ((Sender Report) from this SSRC.
1051 @return A handle to the SR.
1053 IMPORT_C RRtcpSRPart GetSR();
1060 Gets the reason for a BYE packet.
1062 @return A descriptor contaning the BYE message. This is
1063 KNullDesC if the source has not sent a BYE packet.
1065 IMPORT_C TDesC8& GetByeReason();
1072 Parameters from the last APP (Application Defined) packet.
1074 @param aName Four-bytes application name
1075 @param aAppData Applciation specific data
1076 @param aSubType Application defined sub-type of the APP packet
1078 IMPORT_C void GetLastApp(TPtrC8& aName, TPtrC8& aAppData, TUint& aSubType);
1080 IMPORT_C RRtpReceivePacket Packet();
1086 Gets the SSRC of the remote end
1088 @return The SSRC of the remote end
1090 IMPORT_C TUint SSRC() const;
1092 inline TBool operator == (RRtpReceiveSource aThat) const;
1093 inline TBool operator != (RRtpReceiveSource aThat) const;
1099 The event manager contains a number of callback registrations, each of which
1100 binds a function and pointer (normally an object) to a particular kind of
1101 event. Registrations can be bound to all events on a stream.
1103 If a function is registered for a particular event, it will be called when
1104 that event occurs. One callback function can be associated with more than 1
1105 callback registration. Callback functions take a pointer argument
1106 which was supplied as part of the registration
1108 @param aType Event type
1110 @param aCallback Callback object
1112 @param aPtr Pointer to data that needs to be passed to the callback function
1114 @param aParameter Parameter to be passed to internal callback subsystem
1116 IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
1117 TRtpCallbackFunction aCallback,
1118 TAny* aPtr, TInt aParameter);
1124 The event manager contains a number of callback registrations, each of which
1125 binds a function and pointer (normally an object) to a particular kind of
1126 event. Registrations can be bound to all events on a stream.
1128 If a function is registered for a particular event, it will be called when
1129 that event occurs. One callback function can be associated with more than 1
1130 callback registration. Callback functions take a pointer argument
1131 which was supplied as part of the registration
1133 @param aType Event type
1135 @param aCallback Callback object
1137 @param aPtr Pointer to data that needs to be passed to the callback function
1140 IMPORT_C void PrivRegisterEventCallbackL(TUint aType,
1141 TRtpCallbackFunction aCallback,
1144 friend class RRtpSession;
1145 friend class TRtpEvent;
1146 CRtpReceiveSource* iPtr;
1147 // Note: Comments that start with //\ are pseudo-variables used to get
1148 // Doxygen collaboration diagrams to look right. Ignore them.
1149 //\ TRtpCallback callbacks_1_n;
1150 //\ TRtpEvent events_1_n;
1151 //\ TRtpReceivePacket packets_1_n;
1161 A handle to an RTP packet.
1163 The packet is accessed through the interface provided by this handle.
1168 inline RRtpPacket();
1169 inline TBool IsOpen() const;
1171 IMPORT_C void Close();
1172 IMPORT_C TPtrC8 Payload() const;
1173 IMPORT_C TUint SequenceNumber() const;
1174 IMPORT_C TUint Timestamp() const;
1175 IMPORT_C TUint SSRC() const;
1176 IMPORT_C RRtpCSRCs CSRCs() const;
1177 IMPORT_C TBool ExtensionPresent() const;
1178 IMPORT_C RRtpHeaderExtension Extension() const;
1179 IMPORT_C TBool Marker() const;
1180 IMPORT_C TUint PayloadType() const;
1181 IMPORT_C TUint Flags() const;
1183 inline TBool operator == (RRtpPacket aThat) const;
1184 inline TBool operator != (RRtpPacket aThat) const;
1188 // Note: Comments that start with //\ are pseudo-variables used to get
1189 // Doxygen collaboration diagrams to look right. Ignore them.
1190 //\ RRtpHeaderExtension extension_1_01;
1191 //\ RRtpCSRCs csrcs_1_01;
1201 A handle to an RTP packet to be sent (an RTP send packet).
1205 class RRtpSendPacket : public RRtpPacket
1208 IMPORT_C void Send();
1209 IMPORT_C TDes8& WritePayload();
1210 IMPORT_C void SetTimestamp(TUint aTimestamp);
1211 IMPORT_C void SetMarker(TBool aMark);
1212 IMPORT_C void SetPayloadType(TUint aPayloadType);
1213 IMPORT_C void SetFlags(TUint aFlags);
1215 friend class RRtpSendSource;
1225 A handle to an RTP packet received from another source.
1227 class RRtpReceivePacket : public RRtpPacket
1229 friend class RRtpReceiveSource;
1230 friend class TRtpReceivePacket;
1242 An event is generated when anything happens that a client might want
1243 to know about. The class encapulates two pieces of information:
1244 1. An event type as defined by a TRtpEventType value.
1245 2. Additional information whose meaning is dependent on the event type.
1247 Additional information may be implicitly associated with the event, but still
1248 needs to be fetched from another object, for example, when processing
1249 an ERtpPacketReceived event, the packet (represented by a RRtpReceivePacket
1250 handle) must be obtained from the receive stream (represented by a
1251 RRtpReceiveStream handle).
1253 Events are always associated with either an RTP session, a send stream or
1254 a receive stream, and this class has functions for getting the corresponding
1259 @see RRtpReceiveSource
1264 IMPORT_C TRtpEvent(TRtpEventType aType, TInt aStatus, TAny* aData);
1265 IMPORT_C RRtpSession Session() const;
1266 IMPORT_C RRtpSendSource SendSource() const;
1267 IMPORT_C RRtpReceiveSource ReceiveSource() const;
1268 IMPORT_C TBool IsSessionEvent() const;
1269 IMPORT_C TBool IsSendSourceEvent() const;
1270 IMPORT_C TBool IsReceiveSourceEvent() const;
1272 inline TRtpEventType Type() const;
1273 inline TInt Status() const;
1275 TRtpEventType iType;
1287 Reresents an RTP packet's header extension.
1289 The format of a header extension is profile-defined.
1291 class RRtpHeaderExtension
1294 IMPORT_C TUint16 Type() const;
1295 IMPORT_C void SetType(TUint16 aType);
1296 IMPORT_C TPtrC8 Data();
1298 friend class RRtpPacket;
1309 A handle representing the list of CSRCs in an RTP packet.
1314 IMPORT_C TInt Count() const;
1315 IMPORT_C TUint operator [](TUint aIndex) const;
1317 friend class RRtpPacket;
1326 A set of panic codes.
1328 in release mode, different panic codes, such as
1329 KERN-EXEC 3 may be generated instead.
1333 ERtpPacketIsClosed = 1,
1334 ERtpPayloadTypeOutOfRange = 2,
1335 ERtpSessionIsClosed = 3,
1336 ERtpSourceIsClosed = 4,
1337 ERtpNoExtension = 5,
1338 ERtpLeaveInResponseToError = 6,
1339 ERtpCantSend2PacketsAtOnce = 7,
1340 ERtpWrongEventType = 8,
1341 ERtpWrongParameter = 9,
1342 ERtpSendSourceAlreadyOpen = 10,
1343 ERtpSessionAlreadyOpen = 11,
1345 ERtpCoreController = 100,
1348 GLREF_C void Panic(TRtpPanicCode aPanicCode);