<?xml version="1.0" encoding="UTF-8"?> <!-- Sizes in kb, time in seconds --> <!-- <skt> <rcvLoWatermark>XXXX</rcvLoWatermark> - DOES NOT WORK on Linux! man socket(7): ... The select(2) and poll(2) system calls currently do not respect the SO_RCVLOWAT setting on Linux, and mark a socket readable when even a single byte of data is available. ... --> <!-- XML validators: - http://www.xmlvalidation.com/ - xmllint - -noout msd.conf "- -": remove space before arg. install: /usr/ports/textproc/libxml2 --> <msd> <log> <file>/opt/var/log/msd.log</file> </log> <threadPool> <threadsCountMax>3</threadsCountMax> <!-- 0 = auto --> <fBindToCPU>yes</fBindToCPU> <!-- Bind threads to CPUs. --> <fCacheGetTimeSyscall>yes</fCacheGetTimeSyscall> <!-- Cache gettime() syscalls.. --> <timerGranularity>100</timerGranularity> <!-- 1/1000 sec --> </threadPool> <systemResourceLimits> <!-- "unlimited" - value valid only in this section! --> <maxOpenFiles>8192</maxOpenFiles> <!-- Numbers only! --> <maxCoreFileSize>unlimited</maxCoreFileSize> <maxMemLock>unlimited</maxMemLock> <processPriority>-10</processPriority> <!-- Program scheduling priority. setpriority(). Hi: -20, Low: 20, Default: 0 --> </systemResourceLimits> <!-- HTTP server --> <!-- Sizes in kb, time in seconds --> <HTTP> <!-- HTTP server settings. --> <skt> <!-- Defaults for all bindings. --> <backlog>-1</backlog> <rcvBuf>0</rcvBuf> <sndBuf>0</sndBuf> <rcvTimeout>30</rcvTimeout> <sndTimeout>30</sndTimeout> <fKeepAlive>no</fKeepAlive> <keepAliveIDLEtime>0</keepAliveIDLEtime> <keepAliveProbesInterval>0</keepAliveProbesInterval> <keepAliveNumberOfProbes>0</keepAliveNumberOfProbes> <congestionControl /> <!-- TCP_CONGESTION: replace congestion control from OS default --> </skt> <ioBufInitSize>4</ioBufInitSize> <!-- HTTP request receive buf initial size. --> <ioBufMaxSize>4</ioBufMaxSize> <!-- HTTP request receive max buf size. --> <bindList> <bind> <!-- All possible bind settings example. --> <backlog>1024</backlog> <rcvBuf>4</rcvBuf> <sndBuf>256</sndBuf> <rcvTimeout>30</rcvTimeout> <sndTimeout>30</sndTimeout> <fKeepAlive>yes</fKeepAlive> <keepAliveIDLEtime>600</keepAliveIDLEtime> <keepAliveProbesInterval>8</keepAliveProbesInterval> <keepAliveNumberOfProbes>4</keepAliveNumberOfProbes> <congestionControl>htcp</congestionControl> <!-- TCP_CONGESTION: replace congestion control from OS default --> <address>192.168.1.1:7088</address> <ifName>vlan777</ifName> <!-- Get IP address and replace in 'address' before bind. --> <hostnameList> <!-- Host names for this bind. --> <hostname>megahost.sample</hostname> </hostnameList> </bind> <bind> <address>0.0.0.0:7088</address> </bind> <bind> <address>0.0.0.0:40788</address> </bind> <bind> <address>[::]:7088</address> </bind> <bind> <address>[::1]:7088</address> <hostnameList> <!-- Host names for this bind. --> <hostname>localhost</hostname> </hostnameList> </bind> <bind> <address>127.0.0.1:7088</address> <hostnameList> <!-- Host names for this bind. --> <hostname>localhost</hostname> </hostnameList> </bind> </bindList> <hostnameList> <!-- Host names for all bindings. --> <hostname>*</hostname> <hostname>netlab.linkpc.net</hostname> <hostname>www.netlab.linkpc.net</hostname> <hostname>netlab.dhis.org</hostname> <hostname>net-lab.slyip.net</hostname> </hostnameList> </HTTP> <limits> <!-- Client params limits (from http request args). --> <precacheMin>0</precacheMin> <!-- No less than StreamHUB/skt/rcvLoWatermark, def: 0 --> <precacheMax>8192</precacheMax> <!-- max/def: StreamHUB/ringBufSize --> <sndBlockSizeMin>32</sndBlockSizeMin> <!-- Min send block size. --> <sndBlockSizeMax>512</sndBlockSizeMax> <!-- Max send block size. --> </limits> <hubProfileList> <!-- Stream hub profiles templates. --> <hubProfile> <name>default</name> <fPrecacheWait>no</fPrecacheWait> <!-- For new clients: wait untill data in ring buf less than client want to receive in first time. --> <fDropSlowClients>yes</fDropSlowClients> <!-- Disconnect slow clients. --> <fUsePollingForSend>yes</fUsePollingForSend> <!-- Add lagged client socket descriptor to OS io polling (kqueue/epoll). --> <fZeroCopyOnSend>no</fZeroCopyOnSend> <!-- Enable Zero Copy on send to clients. --> <fZeroSrcBitratePersistent>no</fZeroSrcBitratePersistent> <!-- Do not destroy hub if no data received from all sources. --> <fZeroCliPersistent>no</fZeroCliPersistent> <!-- Do not destroy hub if no connected clients, othertwice self destroy after zeroCliTimeout seconds. --> <zeroCliTimeout>60</zeroCliTimeout> <!-- Time to destroy hub if no connected clients. Ignored if fZeroCliPersistent set. --> <skt> <!-- Client socket tunings. --> <sndBuf>1024</sndBuf> <!-- Max send block size, apply to clients sockets only, must be > rcvLoWatermark. --> <sndLoWatermark>64</sndLoWatermark> <!-- Default send block size. Can be overwritten by arg from user request. --> <sndTimeout>30</sndTimeout> <!-- Send data to client timeout. --> <fHalfClosedRcv>no</fHalfClosedRcv> <!-- Enable shutdown(SHUT_RD) for clients. --> <fTCPNoDelay>no</fTCPNoDelay> <!-- Enable TCP_NODELAY for clients. --> <fTCPNoPush>no</fTCPNoPush> <!-- Enable TCP_NOPUSH / TCP_CORK for clients. --> <congestionControl>htcp</congestionControl> <!-- TCP_CONGESTION: this value replace/overwrite(!) all others cc settings: cc from http req args, http server settings, OS default --> </skt> <precache>4096</precache> <!-- Default pre cache size. Can be overwritten by arg from user request. --> <headersList> <!-- Custom HTTP headers (sended before stream). --> <header>Pragma: no-cache</header> <header>Content-Type: video/mpeg</header> <header>ContentFeatures.DLNA.ORG: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000</header> <header>TransferMode.DLNA.ORG: Streaming</header> </headersList> <HLS> <!-- HLS settings. Require fMPEG2TSAnalyzing on sources. --> <fEnable>yes</fEnable> <targetDuration>5</targetDuration> <!-- EXT-X-TARGETDURATION. --> </HLS> <sourceProfile> <!-- Defaults for all sources. --> <MPEG2TS> <!-- Overwrite hub param same name flag if set. --> <fEnable>yes</fEnable> <!-- Enable MPEG2-TS analyzer. Overwrite hub param same name flag if set. --> <filterPIDList> <PID>reset</PID> <!-- Clear PIDs filtering list. --> <PID>16</PID> <!-- Drop NIT PID. --> <PID>17</PID> <!-- Drop SDT PID. --> <PID>18</PID> <!-- Drop EIT PID. --> <PID>null</PID> <!-- = 8191 Drop NULL PID. --> <PID>unknown</PID> <!-- Drop all unknown PIDs. --> </filterPIDList> </MPEG2TS> <ringBufSize>65536</ringBufSize> <!-- Stream receive ring buffer size. --> <ringBufStorePath>shm</ringBufStorePath> <!-- Only if fZeroCopyOnSend set. Path to store file with ring buf. "shm" = use posix shared memory. --> <errorRateInterval>60</errorRateInterval> <!-- Error rate calculation interval. Work only if fMPEG2TSAnalyzing set. --> <errorRateMax>10</errorRateMax> <!-- Error rate max value before change source status to: STREAM_ERRORS. Work only if fMPEG2TSAnalyzing set. overwrite all sources same name value if set to nonzero. --> <skt> <rcvBuf>1024</rcvBuf> <!-- Socket recv buf size. --> <rcvLoWatermark>48</rcvLoWatermark> <!-- Actual cli_snd_block_min if polling is off. --> <rcvTimeout>10</rcvTimeout> <!-- STATUS, recv timeout. --> <fHalfClosedSnd>no</fHalfClosedSnd> <!-- Enable shutdown(SHUT_WR) for clients. --> </skt> </sourceProfile> </hubProfile> <hubProfile> <name>default-HD</name> <fPrecacheWait>no</fPrecacheWait> <!-- For new clients: wait untill data in ring buf less than client want to receive in first time. --> <fDropSlowClients>yes</fDropSlowClients> <!-- Disconnect slow clients. --> <fUsePollingForSend>yes</fUsePollingForSend> <!-- Add lagged client socket descriptor to OS io polling (kqueue/epoll). --> <fZeroCopyOnSend>no</fZeroCopyOnSend> <!-- Enable Zero Copy on send to clients. --> <fZeroSrcBitratePersistent>no</fZeroSrcBitratePersistent> <!-- Do not destroy hub if no data received from all sources. --> <fZeroCliPersistent>no</fZeroCliPersistent> <!-- Do not destroy hub if no connected clients, othertwice self destroy after zeroCliTimeout seconds. --> <zeroCliTimeout>60</zeroCliTimeout> <!-- Time to destroy hub if no connected clients. Ignored if fZeroCliPersistent set. --> <skt> <!-- Client socket tunings. --> <sndBuf>1024</sndBuf> <!-- Max send block size, apply to clients sockets only, must be > rcvLoWatermark. --> <sndLoWatermark>64</sndLoWatermark> <!-- Default send block size. Can be overwritten by arg from user request. --> <sndTimeout>30</sndTimeout> <!-- Send data to client timeout. --> <fHalfClosedRcv>no</fHalfClosedRcv> <!-- Enable shutdown(SHUT_RD) for clients. --> <fTCPNoDelay>no</fTCPNoDelay> <!-- Enable TCP_NODELAY for clients. --> <fTCPNoPush>no</fTCPNoPush> <!-- Enable TCP_NOPUSH / TCP_CORK for clients. --> <congestionControl>htcp</congestionControl> <!-- TCP_CONGESTION: this value replace/overwrite(!) all others cc settings: cc from http req args, http server settings, OS default --> </skt> <precache>8192</precache> <!-- Default pre cache size. Can be overwritten by arg from user request. --> <headersList> <!-- Custom HTTP headers (sended before stream). --> <header>Pragma: no-cache</header> <header>Content-Type: video/mpeg</header> <header>ContentFeatures.DLNA.ORG: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000</header> <header>TransferMode.DLNA.ORG: Streaming</header> </headersList> <sourceProfile> <!-- Defaults for all sources. --> <MPEG2TS> <!-- Overwrite hub param same name flag if set. --> <fEnable>yes</fEnable> <!-- Enable MPEG2-TS analyzer. Overwrite hub param same name flag if set. --> <filterPIDList> <PID>reset</PID> <!-- Clear PIDs filtering list. --> <PID>16</PID> <!-- Drop NIT PID. --> <PID>17</PID> <!-- Drop SDT PID. --> <PID>18</PID> <!-- Drop EIT PID. --> <PID>null</PID> <!-- = 8191 Drop NULL PID. --> <PID>unknown</PID> <!-- Drop all unknown PIDs. --> </filterPIDList> </MPEG2TS> <ringBufSize>131072</ringBufSize> <!-- Stream receive ring buffer size. --> <ringBufStorePath>shm</ringBufStorePath> <!-- Only if fZeroCopyOnSend set. Path to store file with ring buf. "shm" = use posix shared memory. --> <errorRateInterval>60</errorRateInterval> <!-- Error rate calculation interval. Work only if fMPEG2TSAnalyzing set. --> <errorRateMax>10</errorRateMax> <!-- Error rate max value before change source status to: STREAM_ERRORS. Work only if fMPEG2TSAnalyzing set. overwrite all sources same name value if set to nonzero. --> <skt> <rcvBuf>1024</rcvBuf> <!-- Socket recv buf size. --> <rcvLoWatermark>48</rcvLoWatermark> <!-- Actual cli_snd_block_min if polling is off. --> <rcvTimeout>10</rcvTimeout> <!-- STATUS, recv timeout. --> <fHalfClosedSnd>no</fHalfClosedSnd> <!-- Enable shutdown(SHUT_WR) for clients. --> </skt> </sourceProfile> </hubProfile> </hubProfileList> <sourceProfileList> <!-- Stream source profiles templates. --> <sourceProfile> <name>multicast-udp-default</name> <MPEG2TS> <!-- Overwrite hub param same name flag if set. --> <fEnable>yes</fEnable> <!-- Enable MPEG2-TS analyzer. Overwrite hub param same name flag if set. --> <filterPIDList> <PID>reset</PID> <!-- Clear PIDs filtering list. --> <PID>16</PID> <!-- Drop NIT PID. --> <PID>17</PID> <!-- Drop SDT PID. --> <PID>18</PID> <!-- Drop EIT PID. --> <PID>null</PID> <!-- = 8191 Drop NULL PID. --> <PID>unknown</PID> <!-- Drop all unknown PIDs. --> </filterPIDList> </MPEG2TS> <ringBufSize>32768</ringBufSize> <!-- Stream receive ring buffer size. Overwrite hub params same name value if set. --> <ringBufStorePath>shm</ringBufStorePath> <!-- Only if fZeroCopyOnSend set. Path to store file with ring buf. "shm" = use posix shared memory. Overwrite hub params same name value if set. --> <errorRateInterval>60</errorRateInterval> <!-- Error rate calculation interval. Work only if fMPEG2TSAnalyzing set. Overwrite hub params same name value if set o. --> <errorRateMax>10</errorRateMax> <!-- Error rate max value before change source status to: STREAM_ERRORS. Work only if fMPEG2TSAnalyzing set. Overwrite hub params same name value if set. --> <skt> <rcvBuf>1024</rcvBuf> <!-- Socket recv buf size. --> <rcvLoWatermark>48</rcvLoWatermark> <!-- Actual cli_snd_block_min if polling is off. --> <rcvTimeout>10</rcvTimeout> <!-- STATUS, recv timeout. --> <fHalfClosedSnd>no</fHalfClosedSnd> <!-- Enable shutdown(SHUT_WR) for clients. --> </skt> <!-- Source connection specific info. --> <udp> <!-- For: udp, udp-rtp, multicast-udp and multicast-udp-rtp. --> <address>239.0.0.22:1234</address> </udp> <multicast> <!-- For: multicast-udp and multicast-udp-rtp. --> <ifName>lan0</ifName> <!-- For multicast receive. --> </multicast> </sourceProfile> <sourceProfile> <name>tcp-http-default</name> <MPEG2TS> <!-- Overwrite hub param same name flag if set. --> <fEnable>yes</fEnable> <!-- Enable MPEG2-TS analyzer. Overwrite hub param same name flag if set. --> <filterPIDList> <PID>reset</PID> <!-- Clear PIDs filtering list. --> <PID>16</PID> <!-- Drop NIT PID. --> <PID>17</PID> <!-- Drop SDT PID. --> <PID>18</PID> <!-- Drop EIT PID. --> <PID>null</PID> <!-- = 8191 Drop NULL PID. --> <PID>unknown</PID> <!-- Drop all unknown PIDs. --> </filterPIDList> </MPEG2TS> <ringBufSize>32768</ringBufSize> <!-- Stream receive ring buffer size. Overwrite hub params same name value if set. --> <ringBufStorePath>shm</ringBufStorePath> <!-- Only if fZeroCopyOnSend set. Path to store file with ring buf. "shm" = use posix shared memory. Overwrite hub params same name value if set. --> <errorRateInterval>60</errorRateInterval> <!-- Error rate calculation interval. Work only if fMPEG2TSAnalyzing set. Overwrite hub params same name value if set o. --> <errorRateMax>10</errorRateMax> <!-- Error rate max value before change source status to: STREAM_ERRORS. Work only if fMPEG2TSAnalyzing set. Overwrite hub params same name value if set. --> <skt> <rcvBuf>1024</rcvBuf> <!-- Socket recv buf size. --> <rcvLoWatermark>48</rcvLoWatermark> <!-- Actual cli_snd_block_min if polling is off. --> <rcvTimeout>30</rcvTimeout> <!-- STATUS, recv timeout. --> <fHalfClosedSnd>no</fHalfClosedSnd> <!-- Enable shutdown(SHUT_WR) for clients. --> </skt> <!-- Source connection specific info. --> <tcp> <!-- For: tcp- and tcp-http. --> <remonteHostname>93.95.99.231:9500</remonteHostname> <connectTimeout>5</connectTimeout> <!-- Connect timeout. --> <reconnectInterval>5</reconnectInterval> <!-- Retry connect delay. --> <reconnectCount>4294967295</reconnectCount> <!-- Retry count. --> </tcp> <http> <urlPath>http/93.95.99.231:9500/udp/234.1.1.26:10000</urlPath> <headersList> <!-- Custom HTTP headers for request. --> <header>Accept: */*</header> <header>User-Agent: NSPlayer/7.10.0.3059</header> <header>getcontentFeatures.dlna.org: 1</header> </headersList> </http> </sourceProfile> </sourceProfileList> <streamProxy> <!-- Auto generated stream hubs from user request. --> <multicast> <fEnable>yes</fEnable> <hubProfileName>default</hubProfileName> <!-- Profile template. --> <sourceProfileName>multicast-udp-default</sourceProfileName> <!-- Profile template. --> </multicast> <http> <fEnable>yes</fEnable> <hubProfileName>default</hubProfileName> <!-- Profile template. --> <sourceProfileName>tcp-http-default</sourceProfileName> <!-- Profile template. --> </http> <transparent> <!-- Like HTTP, but 'host' header point to other host. --> <fEnable>yes</fEnable> <hubProfileName>default</hubProfileName> <!-- Profile template. --> <sourceProfileName>tcp-http-default</sourceProfileName> <!-- Profile template. --> </transparent> </streamProxy> <channelList> <includeFile>/home/rim/docs/Progs/msd/msd/conf/msd_channels.conf</includeFile> <c-hannel> <name>Test1.ts</name> <!-- Channel name, used in request: /channel/... . --> <hubProfileName>default</hubProfileName> <!-- Profile template. --> <precache>8192</precache> <skt> <sndBuf>1024</sndBuf> <!-- Max send block size, apply to clients sockets only, must be > rcvLoWatermark. --> </skt> <sourceList> <source> <type>multicast-udp</type> <sourceProfileName>multicast-udp-default</sourceProfileName> <!-- Profile template name. --> <udp> <address>239.0.0.2:1234</address> </udp> <multicast> <ifName>vlan777</ifName> </multicast> </source> <source> <type>multicast-udp</type> <sourceProfileName>multicast-udp-default</sourceProfileName> <!-- Profile template name. --> <udp> <address>239.0.0.3:1234</address> </udp> <multicast> <ifName>vlan777</ifName> </multicast> </source> <source> <type>tcp-http</type> <sourceProfileName>tcp-http-default</sourceProfileName> <!-- Profile template. --> <tcp> <!-- For: tcp- and tcp-http. --> <remonteHostname>93.95.99.231:9500</remonteHostname> </tcp> <http> <urlPath>udp/234.1.1.26:10000</urlPath> </http> </source> </sourceList> </c-hannel> </channelList> </msd>
我设置修改的部分为(bro0.41 和 IP地址):
1 2 3
<address>192.168.6.115:7088</address> <ifName>bro0.41</ifName><!-- Get IP address and replace in 'address' before bind. -->