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 PVMF_SOCKET_NODE_TUNABLES_H_INCLUDED 19 #define PVMF_SOCKET_NODE_TUNABLES_H_INCLUDED 20 21 /*! 22 //Tunable parameters for socket node 23 */ 24 25 /*! 26 //This defines the default buffer size for TCP receive operations. 27 //The value can be modified at runtime by the 28 //PVMFSocketNodeExtensionInterface::SetMaxTCPRecvBufferSize API. 29 */ 30 #define SNODE_DEFAULT_SOCKET_TCP_BUFFER_SIZE (64000) 31 32 /*! 33 //This sets the allowed maximum for the buffer size for TCP receive operations. 34 */ 35 #define SNODE_DEFAULT_MAX_TCP_RECV_BUFFER_SIZE (1024*1024) 36 37 /*! 38 //This defines the default memory pool size for TCP receive operations. 39 //The value can be modified at runtime by the 40 //PVMFSocketNodeExtensionInterface::SetMaxTCPRecvBufferCount API. 41 */ 42 #define SNODE_DEFAULT_SOCKET_TCP_BUFFER_COUNT 8 43 44 /*! 45 //This defines the size of the memory pool for the RTCP ports. 46 */ 47 #define SNODE_DEFAULT_NUMBER_MEDIADATA_IN_MEMPOOL 4 48 49 /*! 50 // For the UDP multiple receives. 51 // This is a 1/0 switch to entirely enable or disable the feature 52 // This can be modified at compile-time by redefining the value 53 // in an Oscl config file. 54 */ 55 #ifndef SNODE_ENABLE_UDP_MULTI_PACKET 56 #define SNODE_ENABLE_UDP_MULTI_PACKET 1 57 #endif 58 59 /*! 60 // Define the number of messages in the PVMFMediaFragGroup allocator 61 // pool. This is tailored to current JB node behavior. 62 // JB node will repackage the media messages right away, so the max number 63 // of messages just needs to match or exceed the JB input port queue depth 64 // to avoid running out of memory. 65 // This can be modified at compile-time by redefining the value 66 // in an Oscl config file. 67 */ 68 #ifndef SNODE_UDP_MULTI_FRAG_ALLOCATOR_MAX_MSGS 69 #define SNODE_UDP_MULTI_FRAG_ALLOCATOR_MAX_MSGS 16 70 #endif 71 72 /*! 73 // The max fragments per message defines the initial reserve on the oscl_vector 74 // that is used to hold the multiple packets. It's not a hard limit on the 75 // number of packets. 76 // This can be modified at compile-time by redefining the value 77 // in an Oscl config file. 78 */ 79 #ifndef SNODE_UDP_MULTI_FRAG_ALLOCATOR_MAX_FRAGS_PER_MSG 80 #define SNODE_UDP_MULTI_FRAG_ALLOCATOR_MAX_FRAGS_PER_MSG 10 81 #endif 82 83 /*! 84 // Define the max amount of UDP data to receive in one call. 85 // We may actually receive this much plus one more packet. 86 // Using a value of zero will effectively disable multi-packet 87 // receive, although the multi-recv logic will still be exercised. 88 // To really disable the feature, use the ENABLE switch above. 89 // This can be modified at compile-time by redefining the value 90 // in an Oscl config file. 91 */ 92 #ifndef SNODE_UDP_MULTI_MAX_BYTES_PER_RECV 93 #define SNODE_UDP_MULTI_MAX_BYTES_PER_RECV (16*1024) 94 #define SNODE_UDP_MULTI_MIN_BYTES_PER_RECV (2*1024) 95 #endif 96 97 #endif// PVMF_SOCKET_NODE_TUNABLES_H_INCLUDED 98 99 100 101