LinuxÏÂC++ÀàµÄÏ̺߳¯Êý
×î½üÔÚÓÃC++±àдһ¸öRTSPµÄ¿Í»§¶Ë£¬ÓÉÓÚÒªÓõ½Ị̈߳¬¸ù¾ÝC±à³ÌµÄ¾Ñ飬дÁËÈçÏ´úÂ룺
class LiRtspSession
{
public:
void* MainThreadFunc(void* pvData);
void* AudioProcThreadFunc(void* pvData);
void Connect();
//Ê¡ÂԵĴúÂë
private:
pthread_t m_hProcHandle, m_hAudioProcHandle;
//Ê¡ÂԵĴúÂë
};
void LiRtspSession::Connect()
{
//create main thread creating rtsp session and receiving rtp/rtcp packet
int ret = pthread_create(&m_hProcHandle, NULL, MainThreadFunc, this);
if(ret != 0)
{
return;
}
//create a thread receiving audio data
if(m_bAudioEnabled && m_eProtoType == ptUDP);
{
ret = pthread_create(&m_hAudioProcHandle, NULL, AudioProcThreadFunc, this);
if(ret != 0)
{
return;
}
}
pthread_join(m_hProcHandle, NULL);
if(m_bAudioEnabled && m_eProtoType == ptUDP);
{
pthread_join(m_hAudioProcHandle, NULL);
}
}
µ«ÊÇÔÚ±àÒëʱȴ³öÏÖÈçÏ´íÎó£º
LiRtspSession.cpp: In member function ‘void LiRtspSession::Connect()’:
LiRtspSession.cpp:176: error: argume
Ïà¹ØÎĵµ£º
´î½¨eclipse C/C++¿ª·¢»·¾³£º
1¡¢ÏÂÔØ²¢°²×°Eclipse for C++£ºhttp://www.eclipse.org¡£×îаæÊÇ»ùÓÚEclipse 3.5 galileo£¬ÎļþÃûΪeclipse-cpp-galileo-SR1-win32.zip¡£É蹤×÷Ŀ¼ΪD:\workspace_cpp¡£
2¡¢eclipse for C/C++ IDEûÓаüº¬C/C++µÄ±àÒëÆ÷ºÍµ÷ÊÔÆ ......
»·¾³ËµÃ÷£º±¾»úÖ»ÓÐÒ»ÕÅÍø¿¨£¬Ê¹Óþ²Ì¬IPÉÏÍø
ÃüÁapt-get install shorewall ubuntu»á×Ô¶¯µÄ¸øÄã°²×°ºÃ£¬µ«ÊÇshorewallûÓÐÅäÖÃ
ҲûÓÐÆô¶¯
¡¸1¡¹Ê×ÏÈcp /usr/share/doc/shorewall/examples/one-interface/* /etc/shorewall
¡¸2¡¹ÐÞ¸Ä/etc/shorewall/shor ......
µ±ÄÚ´æ³öÏÖ²»¹»ÓõÄʱºò£¬oom-killer»ákillµôһЩ½ø³Ì
Õâ¸öÐÅÏ¢¿ÉÒÔÔÚ/var/log/messgerÀï²éµ½
µ±ÕâÖÖÇé¿ö³öÏÖµÄʱºò£¬¿ÉÒÔ½«ÏµÍ³ÀïһЩnattachΪ0µÄshmÇåÀíµô
¹ØÓڸߵͶËÄÚ´æµÄÎÊÌâ¿ÉÒÔ¿´ÈçÏÂ
Since this problem seems to popup on different lists, this message has
been cross-posted to the general Red Hat disc ......
linuxÌí¼Ó·ÓÉ
http://baikgd.blog.163.com/blog/static/35402495200972111353827/
·þÎñÆ÷ip(eth0)
[root@localhost net]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:E3:9A:15
inet addr:172.18.3.205 Bcast:172.18.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fee3:9a15/64 Scope:Link
UP BR ......