| OLD | NEW | 
|---|
|  | (Empty) | 
| 1 /* |  | 
| 2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |  | 
| 3  * |  | 
| 4  *  Use of this source code is governed by a BSD-style license |  | 
| 5  *  that can be found in the LICENSE file in the root of the source |  | 
| 6  *  tree. An additional intellectual property rights grant can be found |  | 
| 7  *  in the file PATENTS.  All contributing project authors may |  | 
| 8  *  be found in the AUTHORS file in the root of the source tree. |  | 
| 9  */ |  | 
| 10 |  | 
| 11 #ifndef WEBRTC_VIDEO_ENGINE_VIE_DEFINES_H_ |  | 
| 12 #define WEBRTC_VIDEO_ENGINE_VIE_DEFINES_H_ |  | 
| 13 |  | 
| 14 #include "webrtc/engine_configurations.h" |  | 
| 15 |  | 
| 16 // TODO(mflodman) Remove. |  | 
| 17 #ifdef WEBRTC_ANDROID |  | 
| 18 #include <arpa/inet.h>  // NOLINT |  | 
| 19 #include <linux/net.h>  // NOLINT |  | 
| 20 #include <netinet/in.h>  // NOLINT |  | 
| 21 #include <pthread.h>  // NOLINT |  | 
| 22 #include <stdio.h>  // NOLINT |  | 
| 23 #include <stdlib.h>  // NOLINT |  | 
| 24 #include <string.h>  // NOLINT |  | 
| 25 #include <sys/socket.h>  // NOLINT |  | 
| 26 #include <sys/time.h>  // NOLINT |  | 
| 27 #include <sys/types.h>  // NOLINT |  | 
| 28 #include <time.h>  // NOLINT |  | 
| 29 #endif |  | 
| 30 |  | 
| 31 namespace webrtc { |  | 
| 32 |  | 
| 33 // General |  | 
| 34 enum { kViEMinKeyRequestIntervalMs = 300 }; |  | 
| 35 |  | 
| 36 // ViEBase |  | 
| 37 enum { kViEMaxNumberOfChannels = 64 }; |  | 
| 38 |  | 
| 39 // ViECodec |  | 
| 40 enum { kViEMaxCodecWidth = 4096 }; |  | 
| 41 enum { kViEMaxCodecHeight = 3072 }; |  | 
| 42 enum { kViEMaxCodecFramerate = 60 }; |  | 
| 43 enum { kViEMinCodecBitrate = 30 }; |  | 
| 44 |  | 
| 45 // ViENetwork |  | 
| 46 enum { kViEMaxMtu = 1500 }; |  | 
| 47 enum { kViESocketThreads = 1 }; |  | 
| 48 enum { kViENumReceiveSocketBuffers = 500 }; |  | 
| 49 |  | 
| 50 // ViERender |  | 
| 51 // Max valid time set in SetRenderTimeoutImage |  | 
| 52 enum { kViEMaxRenderTimeoutTimeMs  = 10000 }; |  | 
| 53 // Min valid time set in SetRenderTimeoutImage |  | 
| 54 enum { kViEMinRenderTimeoutTimeMs = 33 }; |  | 
| 55 enum { kViEDefaultRenderDelayMs = 10 }; |  | 
| 56 |  | 
| 57 // ViERTP_RTCP |  | 
| 58 enum { kSendSidePacketHistorySize = 600 }; |  | 
| 59 |  | 
| 60 // NACK |  | 
| 61 enum { kMaxPacketAgeToNack = 450 };  // In sequence numbers. |  | 
| 62 enum { kMaxNackListSize = 250 }; |  | 
| 63 |  | 
| 64 // Id definitions |  | 
| 65 enum { |  | 
| 66   kViEChannelIdBase = 0x0, |  | 
| 67   kViEChannelIdMax = 0xFF, |  | 
| 68   kViEDummyChannelId = 0xFFFF |  | 
| 69 }; |  | 
| 70 |  | 
| 71 // Module id |  | 
| 72 // Create a unique id based on the ViE instance id and the |  | 
| 73 // channel id. ViE id > 0 and 0 <= channel id <= 255 |  | 
| 74 |  | 
| 75 inline int ViEId(const int vieId, const int channelId = -1) { |  | 
| 76   if (channelId == -1) { |  | 
| 77     return static_cast<int>((vieId << 16) + kViEDummyChannelId); |  | 
| 78   } |  | 
| 79   return static_cast<int>((vieId << 16) + channelId); |  | 
| 80 } |  | 
| 81 |  | 
| 82 inline int ViEModuleId(const int vieId, const int channelId = -1) { |  | 
| 83   if (channelId == -1) { |  | 
| 84     return static_cast<int>((vieId << 16) + kViEDummyChannelId); |  | 
| 85   } |  | 
| 86   return static_cast<int>((vieId << 16) + channelId); |  | 
| 87 } |  | 
| 88 |  | 
| 89 inline int ChannelId(const int moduleId) { |  | 
| 90   return static_cast<int>(moduleId & 0xffff); |  | 
| 91 } |  | 
| 92 |  | 
| 93 // Windows specific. |  | 
| 94 #if defined(_WIN32) |  | 
| 95   #define RENDER_MODULE_TYPE kRenderWindows |  | 
| 96 |  | 
| 97   // Include libraries. |  | 
| 98   #pragma comment(lib, "winmm.lib") |  | 
| 99 |  | 
| 100   #ifndef WEBRTC_EXTERNAL_TRANSPORT |  | 
| 101   #pragma comment(lib, "ws2_32.lib") |  | 
| 102   #pragma comment(lib, "Iphlpapi.lib")   // _GetAdaptersAddresses |  | 
| 103   #endif |  | 
| 104 #endif |  | 
| 105 |  | 
| 106 // Mac specific. |  | 
| 107 #ifdef WEBRTC_MAC |  | 
| 108   #define SLEEP(x) usleep(x * 1000) |  | 
| 109   #define RENDER_MODULE_TYPE kRenderWindows |  | 
| 110 #endif |  | 
| 111 |  | 
| 112 // Android specific. |  | 
| 113 #ifdef WEBRTC_ANDROID |  | 
| 114   #define FAR |  | 
| 115   #define __cdecl |  | 
| 116 #endif  // WEBRTC_ANDROID |  | 
| 117 |  | 
| 118 }  // namespace webrtc |  | 
| 119 |  | 
| 120 #endif  // WEBRTC_VIDEO_ENGINE_VIE_DEFINES_H_ |  | 
| OLD | NEW | 
|---|