资源简介
rtsp_server 为工程主目录
livelib 为live555 库目录
RtspServer.cpp 为主程序
H264LiveVideoServerMediaSubsession.cpp H264LiveVideoSource.cpp
为创建对话和获取帧类 其他为平台获取帧代码和库
代码片段和文件信息
#include “H264LiveVideoServerMediaSubsession.hh“
#include “H264VideoRTPSink.hh“
#include “H264VideoStreamframer.hh“
#include “H265VideoRTPSink.hh“
#include “H265VideoStreamframer.hh“
#include “H264LiveVideoSource.hh“
H264LiveVideoServerMediaSubsession*
H264LiveVideoServerMediaSubsession::createNew(UsageEnvironment& env
char const* chanID
Boolean reuseFirstSource) {
return new H264LiveVideoServerMediaSubsession(env chanID reuseFirstSource);
}
H264LiveVideoServerMediaSubsession::H264LiveVideoServerMediaSubsession(UsageEnvironment& env
char const* chanID Boolean reuseFirstSource)
: OnDemandServerMediaSubsession(envreuseFirstSource)
fAuxSDPLine(NULL) fDoneFlag(0) fDummyRTPSink(NULL) {
fChanID = strDup(chanID);
if(NULL == fChanID)
fChanID = strDup(“720p-stream“);
env << “H264LiveVideoServerMediaSubsession::fChanID:“ << fChanID <<“\n“;
#ifdef GET_VIDEO_frame_FROM_DRIVER
TENDCAM_PARAM_VIDEO video[2];
tend_CamVideo_hal_initDevice(TEND_STREAMID_LIVE &video[TEND_STREAMID_LIVE]);
#endif
// printf(“~~~~~~~%s line :%d \n “__func____LINE__);
}
H264LiveVideoServerMediaSubsession::~H264LiveVideoServerMediaSubsession() {
// printf(“~~~~~~~%s line :%d \n “__func____LINE__);
#ifdef GET_VIDEO_frame_FROM_DRIVER
tend_CamVideo_hal_releaseallDevice();
#endif
delete[] fAuxSDPLine;
delete[] fChanID;
}
static void afterPlayingDummy(void* clientData) {
// printf(“~~~~~~~%s line :%d \n “__func____LINE__);
H264LiveVideoServerMediaSubsession* subsess = (H264LiveVideoServerMediaSubsession*)clientData;
subsess->afterPlayingDummy1();
}
void H264LiveVideoServerMediaSubsession::afterPlayingDummy1() {
// printf(“~~~~~~~%s line :%d \n “__func____LINE__);
// Unschedule any pending ‘checking‘ task:
envir().taskScheduler().unscheduleDelayedTask(nextTask());
// Signal the event loop that we‘re done:
setDoneFlag();
}
static void checkForAuxSDPLine(void* clientData) {
// printf(“~~~~~~~%s line :%d \n “__func____LINE__);
H264LiveVideoServerMediaSubsession* subsess = (H264LiveVideoServerMediaSubsession*)clientData;
subsess->checkForAuxSDPLine1();
}
void H264LiveVideoServerMediaSubsession::checkForAuxSDPLine1() {
// printf(“~~~~~~~%s line :%d \n “__func____LINE__);
char const* dasl;
if (fAuxSDPLine != NULL) {
// Signal the event loop that we‘re done:
setDoneFlag();
} else if (fDummyRTPSink != NULL && (dasl = fDummyRTPSink->auxSDPLine()) != NULL) {
fAuxSDPLine = strDup(dasl);
fDummyRTPSink = NULL;
// Signal the event loop that we‘re done:
setDoneFlag();
} else if (!fDoneFlag) {
// try again after a brief delay:
//int uSecsToDelay = 100000; // 100 ms
int uSecsToDelay = 10; // 100 ms
nextTask() = envir().taskScheduler().scheduleDelayedTask(uSecsToDelay
(TaskFunc*)checkForAuxSDPLine this);
}
}
char const* H264LiveVideoServerMediaSubsession::getAuxSDPLine(RTPSink* rtpSink framedSource* inputSource)
相关资源
- SDK播放器加速.zip
- live555通过VS2013编译,自己整理的,附
- live555Camera摄像头直播
- Linux基于Live555获取rstp实时264视频流并
- live555 RTSP RTCP RTP。live555类关系图,
- 一个h.264文件,可以作为live555的测试
- Windows下利用live555实现H264实时流RTSP发
- live555实现H264实时流进行RTSP发送
- 基于hi3531的live555发送h264
- live555-20181214基于ARM-linux从网络摄像机
- vs2013 live555流媒体服务 直播点播编译
- 基于live555实现的rtsp点播客户端,并将
- Live555_2017-vs2015 x64 x86 完全编译版本(
- live555流媒体服务器windows版
- live555 的openRTSP 改写
- live555代理服务器
- 基于Live555的从多个摄像头实时获取
- Live555基于h264嵌入式linux下rtsp项目的裁
- testRTSPClient+mp4v2录制mp4
- live555MediaServer.exe
- Live555 Media Server是一个纯粹的RTSP服务
- V4L2+FFMPEG+live555实现流媒体服务端
评论
共有 条评论