10224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber/*
2a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber * Copyright 2013, The Android Open Source Project
30224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber *
40224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber * Licensed under the Apache License, Version 2.0 (the "License");
50224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber * you may not use this file except in compliance with the License.
60224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber * You may obtain a copy of the License at
70224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber *
80224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber *     http://www.apache.org/licenses/LICENSE-2.0
90224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber *
100224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber * Unless required by applicable law or agreed to in writing, software
110224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber * distributed under the License is distributed on an "AS IS" BASIS,
120224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
130224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber * See the License for the specific language governing permissions and
140224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber * limitations under the License.
150224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber */
160224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
17a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber#ifndef RTP_BASE_H_
180224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
19a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber#define RTP_BASE_H_
200224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
210224bf170a3904576bba81593eaab113c5d3a4e7Andreas Hubernamespace android {
220224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
23a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huberstruct RTPBase {
24a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber    enum PacketizationMode {
25a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber        PACKETIZATION_TRANSPORT_STREAM,
26a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber        PACKETIZATION_H264,
27a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber        PACKETIZATION_AAC,
288f1f6a4814403dd78539250c845f8326f6137a61Andreas Huber        PACKETIZATION_NONE,
29a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber    };
300224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
31a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber    enum TransportMode {
32a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber        TRANSPORT_UNDEFINED,
336e98aba4d23d00cab236d993d895f57ea76ea0e5Andreas Huber        TRANSPORT_NONE,
34a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber        TRANSPORT_UDP,
35a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber        TRANSPORT_TCP,
36a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber        TRANSPORT_TCP_INTERLEAVED,
37a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber    };
380224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
390224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber    enum {
40a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber        // Really UDP _payload_ size
41a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber        kMaxUDPPacketSize = 1472,   // 1472 good, 1473 bad on Android@Home
420224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber    };
430224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
44a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber    static int32_t PickRandomRTPPort();
450224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber};
460224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
470224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber}  // namespace android
480224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
49a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber#endif  // RTP_BASE_H_
50a556c4822fc205db0d27834ba5b637c351d73ffaAndreas Huber
510224bf170a3904576bba81593eaab113c5d3a4e7Andreas Huber
52