Chinaunix首页 | 论坛 | 博客
  • 博客访问: 397402
  • 博文数量: 48
  • 博客积分: 1820
  • 博客等级: 上尉
  • 技术积分: 705
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-28 23:10
文章分类

全部博文(48)

文章存档

2012年(1)

2011年(12)

2010年(34)

2009年(1)

分类: 嵌入式

2010-07-23 23:53:44

#ifndef RTP_SESSION_H_INCLUDE
#define RTP_SESSION_H_INCLUDE

#include "rtpsession.h"
#include "rtppacket.h"
#include "rtpudpv4transmitter.h"
#include "rtpipv4address.h"
#include "rtpsessionparams.h"
#include "rtperrors.h"
#include "rtpsourcedata.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;


string rtp_error(int rtperr);

//
// The new class routine
//

class BaseRTPSession : public RTPSession
{
public:
BaseRTPSession();
int cur_num_dest(){return num_dest;}
protected:
void OnNewSource(RTPSourceData *dat);
void OnBYEPacket(RTPSourceData *dat);
void OnRemoveSource(RTPSourceData *dat);
private:
int num_dest;
};


class CRtpService
{
public:

CRtpService();
~CRtpService();
int start(string port);
int stop();

int send_rtp_packet(const string& data);
int process_task();
private:
//string rtp_error(const int& rtp_err);
private:
queue m_task_queue;
private:

pthread_t   m_thread_id;
pthread_cond_t m_pthread_cond;
pthread_mutex_t m_mutex;
BaseRTPSession m_rtp_session;

private:
bool started;
long m_timestamp;
};



#endif


阅读(1428) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~