易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关文档:

Linux c/c++ 开发工具集锦

我之前是一个C程序员,而且是个Windows的程序员,在windows下使用VC6.0/VS2005等microsoft的傻瓜式工具工作,
对于那个vc 6.0/vs2005的快捷操作,debug操作是那么的熟悉,可以说vc
6.0/vs2005是window下开发c/c++最好用的工具了,可以查看调用堆栈,内存变化情况,变量值,另外安装 visual assist
x后让VC看起来是那么 ......

linux的文件系统认识(1)

1.谈到linux的文件系统,我们必须关注/etc/fstab文件的内容;在linux中的所有挂载分区和设备都在fstab表格中。
/etc/fstab表格中的选择项参数定义如下:
ro or rw
Read only or read write
noauto
Do not respond to mount -a. Used for external devices CDROMs ...
noexec
Executables cannot be started from the ......

Linux iscsi initiator 在RHEL AS 4配置

这个和RHEL5上面的iscsi-initiator-utils-6.xxxx不一致,RHEL5上面的方式网上有比较多的方式,这里主要介绍的是TRHEL4下的iscsi-initiator-utils-4.xxxx的配置方式
linux 版本
[oracle@inthrac02 ~]vi /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
ulimit -r
[oracle@inthrac02 ~]$ ......

Linux笔记


linux目录架构
/   根目录
/bin    常用的命令
binary file 的目錄
/boot   存放系统启动时必须读取的档案,包括核心
(kernel) 在内
     /boot/grub/menu.lst   GRUB设置
     /boot/vmlinuz   内核
  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号