1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 #ifndef RTSP_TRANSPORT_H 19 #define RTSP_TRANSPORT_H 20 21 #include "oscl_base.h" 22 #include "rtsp_session_types.h" 23 24 struct RtspTransport 25 { 26 27 typedef enum { RTP_PROTOCOL, RDT_PROTOCOL, UNKNOWN_PROTOCOL } ProtocolType; 28 typedef enum { AVP_PROFILE, TCP_PROFILE, UNKNOWN_PROFILE } ProfileType; 29 typedef enum { UDP_TRANSPORT, TCP_TRANSPORT, UNKNOWN_TRANSPORT } TransportType; 30 typedef enum { UNICAST_DELIVERY, MULTICAST_DELIVERY } DeliveryType; 31 32 ProtocolType protocol; 33 bool protocolIsSet; 34 ProfileType profile; 35 bool profileIsSet; 36 TransportType transportType; 37 bool transportTypeIsSet; 38 DeliveryType delivery; 39 bool deliveryIsSet; 40 41 StrPtrLen destination; 42 bool destinationIsSet; 43 44 uint16 channel1; 45 uint16 channel2; 46 bool channelIsSet; 47 48 bool append; 49 bool appendIsSet; 50 51 uint16 ttl; 52 bool ttlIsSet; 53 54 uint32 layers; 55 bool layersIsSet; 56 57 uint16 port1; 58 uint16 port2; 59 bool portIsSet; 60 61 uint16 client_port1; 62 uint16 client_port2; 63 bool client_portIsSet; 64 65 uint16 server_port1; 66 uint16 server_port2; 67 bool server_portIsSet; 68 69 struct 70 { 71 unsigned int reserved: 72 30; 73 bool play_mode: 74 1; 75 bool record_mode: 76 1; 77 } mode; 78 bool modeIsSet; 79 80 Ssrc ssrc; 81 bool ssrcIsSet; 82 RtspTransportRtspTransport83 RtspTransport() 84 { 85 oscl_memset(this, 0, sizeof(this)); 86 } 87 88 }; 89 90 91 #endif 92