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
Ïà¹ØÎĵµ£º
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
Ò»¡¢LINUXϹØÓÚÎļþȨÏ޵ıíʾ·½·¨ºÍ½âÎö
LINUXÏ¿ÉÒÔÓÃls -l ÃüÁîÀ´¿´µ½ÎļþµÄȨÏÞ¡£ÓÃlsÃüÁîËùµÃµ½µÄ±íʾ·¨µÄ¸ñʽÊÇÀàËÆÕâÑùµÄ£º-rwxr-xr-x ¡£ÏÂÃæ½âÎöһϸñʽËù±íʾµÄÒâ˼¡£ÕâÖÖ±íʾ·½·¨Ò»¹²ÓÐʮλ£º
9 8 7 6 5 4 3 2 1 0
- r w x r - x r - x
µÚ9λ±íʾÎļþÀàÐÍ,¿ÉÒÔΪp¡¢d¡¢l¡¢s¡¢c ......
ÔÚ×ÀÃæ²Ù×÷ϵͳÁìÓò£¬WindowsºÍMac
OS¢¶Ïמø´ó²¿·ÖÊг¡£¬Linux¡¢BSDµÈÆäËû¸÷ÖÖϵͳֻÄÜÆ«°²Ò»Ó磬²»¹ýËüÃǵķ¢Ðа汾ȴÊÇÏ൱·á¸»£¬³ýÁË×î³£¼ûµÄUbuntuÖ®Í⻹ÓÐ
Fedora¡¢Debian¡¢FreeBSD¡¢OpenBSD¡¢OpenSolarisµÈµÈ£¬½ñÌìÎÒÃǾ͵¥´ÓÐÔÄܽǶȱȽÏÒ»ÏÂÕâЩ²»Í¬°æ±¾¡£
¡¡¡¡²Î²â¶ÔÏó(¾ùΪ64λ°æ±¾)£º
¡¡¡¡£ Fedora 12£ºÊ ......
Èç¹ûÄãÕýÔÚΪlinux·ÖÇø¿Õ¼ä²»×ã¶ø¿àÄÕʱ£¬ÇëÄãÒ»¶¨ÒªÍùÏ¿´¡£
linux LVM£¨logical volumes management£©,Õâ¸öʱlinuxÖеÄÂß¼¾í¹ÜÀíÈí¼þ£¬¿ÉÒÔÔÚ¿ª»úÇé¿öÏÂÖØл®·Ö·ÖÇø´óС¡£
LVMÔÊÐíÒ»×鲻ͬµÄ¿éÉ豸£¨Ó²ÅÌ£¬·ÖÇø£¬´ÅÅÌÕóÁÐ...£©×éºÏµ½Ò»Æð³ÉΪһ¸ö´ó´æ´¢É豸£¬Õâ¾ÍÊǾí×é(volume group)¡£
ÏÂÃæÎÒÃÇÀ´¿ªÊ¼½¨Á¢Ò»¸ö¾í×é ......
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 ......