http://blog.youkuaiyun.com/firehood_/article/details/16844397
版权声明:本文为博主原创文章,未经博主允许不得转载。
前面的文章中介绍了《H264视频通过RTMP流直播》,下面将介绍一下如何将H264实时视频通过RTSP直播。
实现思路是将视频流发送给live555, 由live555来实现H264数据流直播。
视频采集模块通过FIFO队列将H264数据帧发送给live555. live555 在收到客户端的RTSP播放请求后,开始从FIFO中读取H264视频数据并通过RTSP直播出去。整个流程如下图所示:
调整和修改Live555 MediaServer
下载live555源码,在media目录下增加四个文件并修改文件live555MediaServer.cpp。增加的四个文件如下:
WW_H264VideoServerMediaSubsession.h
WW_H264VideoServerMediaSubsession.cpp
WW_H264VideoSource.h
WW_H264VideoSource.cpp
下面附上四个文件的源码:
WW_H264VideoServerMediaSubsession.h
- #pragma once
- #include "liveMedia.hh"
- #include "BasicUsageEnvironment.hh"
- #include "GroupsockHelper.hh"
- #include "OnDemandServerMediaSubsession.hh"
- #include "WW_H264VideoSource.h"
- class WW_H264VideoServerMediaSubsession : public OnDemandServerMediaSubsession
- {
- public:
- WW_H264VideoServerMediaSubsession(UsageEnvironment & env, FramedSource * source);
- ~WW_H264VideoServerMediaSubsession(void);
- public:
- virtual char const * getAuxSDPLine(RTPSink * rtpSink, FramedSource * inputSource);
- virtual FramedSource * createNewStreamSource(unsigned clientSessionId, unsigned & estBitrate); // "estBitrate" is the stream's estimated bitrate, in kbps
- virtual RTPSink * createNewRTPSink(Groupsock * rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource * inputSource);
- static WW_H264VideoServerMediaSubsession * createNew(UsageEnvironment & env, FramedSource * source);
- static void afterPlayingDummy(void * ptr);
- static void chkForAuxSDPLine(void * ptr);
- void chkForAuxSDPLine1();
- private:
- FramedSource * m_pSource;
- char * m_pSDPLine;
- RTPSink * m_pDummyRTPSink;
- char m_done;
- };
WW_H264VideoServerMediaSubsession.cpp
- #include "WW_H264VideoServerMediaSubsession.h"
- WW_H264VideoServerMediaSubsession::WW_H264VideoServerMediaSubsession(UsageEnvironment & env, FramedSource * source) : OnDemandServerMediaSubsession(env, True)
- {
- m_pSource = source;
- m_pSDPLine = 0;
- }
- WW_H264VideoServerMediaSubsession::~WW_H264VideoServerMediaSubsession(void)
- {
- if (m_pSDPLine)
- {
- free(m_pSDPLine);
- }
- }
- WW_H264VideoServerMediaSubsession * WW_H264VideoServerMediaSubsession::createNew(UsageEnvironment & env, FramedSource * source)
- {
- return new WW_H264VideoServerMediaSubsession(env, source);
- }
- FramedSource * WW_H264VideoServerMediaSubsession::createNewStreamSource(unsigned clientSessionId, unsigned & estBitrate)
- {
- return H264VideoStreamFramer::createNew(envir(), new WW_H264VideoSource(envir()));
- }
- RTPSink * WW_H264VideoServerMediaSubsession::createNewRTPSink(Groupsock * rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource * inputSource)
- {
- return H264VideoRTPSink::createNew(envir(), rtpGroupsock, rtpPayloadTypeIfDynamic);
- }
- char const * WW_H264VideoServerMediaSubsession::getAuxSDPLine(RTPSink * rtpSink, FramedSource * inputSource)
- {
- if (m_pSDPLine)
- {
- return m_pSDPLine;
- }
- m_pDummyRTPSink = rtpSink;
- //mp_dummy_rtpsink->startPlaying(*source, afterPlayingDummy, this);
- m_pDummyRTPSink->startPlaying(*inputSource, 0, 0);
- chkForAuxSDPLine(this);
- m_done = 0;
- envir().taskScheduler().doEventLoop(&m_done);
- m_pSDPLine = strdup(m_pDummyRTPSink->auxSDPLine());
- m_pDummyRTPSink->stopPlaying();
- return m_pSDPLine;
- }
- void WW_H264VideoServerMediaSubsession::afterPlayingDummy(void * ptr)
- {
- WW_H264VideoServerMediaSubsession * This = (WW_H264VideoServerMediaSubsession *)ptr;
- This->m_done = 0xff;
- }
- void WW_H264VideoServerMediaSubsession::chkForAuxSDPLine(void * ptr)
- {
- WW_H264VideoServerMediaSubsession * This = (WW_H264VideoServerMediaSubsession *)ptr;
- This->chkForAuxSDPLine1();
- }
- void WW_H264VideoServerMediaSubsession::chkForAuxSDPLine1()
- {
- if (m_pDummyRTPSink->auxSDPLine())
- {
- m_done = 0xff;
- }
- else
- {
- double delay = 1000.0 / (FRAME_PER_SEC); // ms
- int to_delay = delay * 1000; // us
- nextTask() = envir().taskScheduler().scheduleDelayedTask(to_delay, chkForAuxSDPLine, this);
- }
- }
WW_H264VideoSource.h
- #ifndef _WW_H264VideoSource_H
- #define _WW_H264VideoSource_H
- #include "liveMedia.hh"
- #include "BasicUsageEnvironment.hh"
- #include "GroupsockHelper.hh"
- #include "FramedSource.hh"
- #define FRAME_PER_SEC 25
- class WW_H264VideoSource : public FramedSource
- {
- public:
- WW_H264VideoSource(UsageEnvironment & env);
- ~WW_H264VideoSource(void);
- public:
- virtual void doGetNextFrame();
- virtual unsigned int maxFrameSize() const;
- static void getNextFrame(void * ptr);
- void GetFrameData();
- private:
- void *m_pToken;
- char *m_pFrameBuffer;
- int m_hFifo;
- };
- #endif
- #include "WW_H264VideoSource.h"
- #include <stdio.h>
- #ifdef WIN32
- #include <windows.h>
- #else
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <string.h>
- #include <fcntl.h>
- #include <unistd.h>
- #include <limits.h>
- #endif
- #define FIFO_NAME "/tmp/H264_fifo"
- #define BUFFER_SIZE PIPE_BUF
- #define REV_BUF_SIZE (1024*1024)
- #ifdef WIN32
- #define mSleep(ms) Sleep(ms)
- #else
- #define mSleep(ms) usleep(ms*1000)
- #endif
- WW_H264VideoSource::WW_H264VideoSource(UsageEnvironment & env) :
- FramedSource(env),
- m_pToken(0),
- m_pFrameBuffer(0),
- m_hFifo(0)
- {
- m_hFifo = open(FIFO_NAME,O_RDONLY);
- printf("[MEDIA SERVER] open fifo result = [%d]\n",m_hFifo);
- if(m_hFifo == -1)
- {
- return;
- }
- m_pFrameBuffer = new char[REV_BUF_SIZE];
- if(m_pFrameBuffer == NULL)
- {
- printf("[MEDIA SERVER] error malloc data buffer failed\n");
- return;
- }
- memset(m_pFrameBuffer,0,REV_BUF_SIZE);
- }
- WW_H264VideoSource::~WW_H264VideoSource(void)
- {
- if(m_hFifo)
- {
- ::close(m_hFifo);
- }
- envir().taskScheduler().unscheduleDelayedTask(m_pToken);
- if(m_pFrameBuffer)
- {
- delete[] m_pFrameBuffer;
- m_pFrameBuffer = NULL;
- }
- printf("[MEDIA SERVER] rtsp connection closed\n");
- }
- void WW_H264VideoSource::doGetNextFrame()
- {
- // 根据 fps,计算等待时间
- double delay = 1000.0 / (FRAME_PER_SEC * 2); // ms
- int to_delay = delay * 1000; // us
- m_pToken = envir().taskScheduler().scheduleDelayedTask(to_delay, getNextFrame, this);
- }
- unsigned int WW_H264VideoSource::maxFrameSize() const
- {
- return 1024*200;
- }
- void WW_H264VideoSource::getNextFrame(void * ptr)
- {
- ((WW_H264VideoSource *)ptr)->GetFrameData();
- }
- void WW_H264VideoSource::GetFrameData()
- {
- gettimeofday(&fPresentationTime, 0);
- fFrameSize = 0;
- int len = 0;
- unsigned char buffer[BUFFER_SIZE] = {0};
- while((len = read(m_hFifo,buffer,BUFFER_SIZE))>0)
- {
- memcpy(m_pFrameBuffer+fFrameSize,buffer,len);
- fFrameSize+=len;
- }
- //printf("[MEDIA SERVER] GetFrameData len = [%d],fMaxSize = [%d]\n",fFrameSize,fMaxSize);
- // fill frame data
- memcpy(fTo,m_pFrameBuffer,fFrameSize);
- if (fFrameSize > fMaxSize)
- {
- fNumTruncatedBytes = fFrameSize - fMaxSize;
- fFrameSize = fMaxSize;
- }
- else
- {
- fNumTruncatedBytes = 0;
- }
- afterGetting(this);
- }
修改live555MediaServer.cpp文件如下
- /**********
- This library is free software; you can redistribute it and/or modify it under
- the terms of the GNU Lesser General Public License as published by the
- Free Software Foundation; either version 2.1 of the License, or (at your
- option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
- This library is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- more details.
- You should have received a copy of the GNU Lesser General Public License
- along with this library; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- **********/
- // Copyright (c) 1996-2013, Live Networks, Inc. All rights reserved
- // LIVE555 Media Server
- // main program
- #include <BasicUsageEnvironment.hh>
- #include "DynamicRTSPServer.hh"
- #include "version.hh"
- #include "WW_H264VideoSource.h"
- #include "WW_H264VideoServerMediaSubsession.h"
- int main(int argc, char** argv) {
- // Begin by setting up our usage environment:
- TaskScheduler* scheduler = BasicTaskScheduler::createNew();
- UsageEnvironment* env = BasicUsageEnvironment::createNew(*scheduler);
- UserAuthenticationDatabase* authDB = NULL;
- #ifdef ACCESS_CONTROL
- // To implement client access control to the RTSP server, do the following:
- authDB = new UserAuthenticationDatabase;
- authDB->addUserRecord("username1", "password1"); // replace these with real strings
- // Repeat the above with each <username>, <password> that you wish to allow
- // access to the server.
- #endif
- // Create the RTSP server:
- RTSPServer* rtspServer = RTSPServer::createNew(*env, 554, authDB);
- if (rtspServer == NULL) {
- *env << "Failed to create RTSP server: " << env->getResultMsg() << "\n";
- exit(1);
- }
- // Add live stream
- WW_H264VideoSource * videoSource = 0;
- ServerMediaSession * sms = ServerMediaSession::createNew(*env, "live", 0, "ww live test");
- sms->addSubsession(WW_H264VideoServerMediaSubsession::createNew(*env, videoSource));
- rtspServer->addServerMediaSession(sms);
- char * url = rtspServer->rtspURL(sms);
- *env << "using url \"" << url << "\"\n";
- delete[] url;
- // Run loop
- env->taskScheduler().doEventLoop();
- rtspServer->removeServerMediaSession(sms);
- Medium::close(rtspServer);
- env->reclaim();
- delete scheduler;
- return 1;
- }
发送H264视频流的RTSPStream
- /********************************************************************
- filename: RTSPStream.h
- created: 2013-08-01
- author: firehood
- purpose: 通过live555实现H264 RTSP直播
- *********************************************************************/
- #pragma once
- #include <stdio.h>
- #ifdef WIN32
- #include <windows.h>
- #else
- #include <pthread.h>
- #endif
- #ifdef WIN32
- typedef HANDLE ThreadHandle;
- #define mSleep(ms) Sleep(ms)
- #else
- typedef unsigned int SOCKET;
- typedef pthread_t ThreadHandle;
- #define mSleep(ms) usleep(ms*1000)
- #endif
- #define FILEBUFSIZE (1024 * 1024)
- class CRTSPStream
- {
- public:
- CRTSPStream(void);
- ~CRTSPStream(void);
- public:
- // 初始化
- bool Init();
- // 卸载
- void Uninit();
- // 发送H264文件
- bool SendH264File(const char *pFileName);
- // 发送H264数据帧
- int SendH264Data(const unsigned char *data,unsigned int size);
- };
- /********************************************************************
- filename: RTSPStream.cpp
- created: 2013-08-01
- author: firehood
- purpose: 通过live555实现H264 RTSP直播
- *********************************************************************/
- #include "RTSPStream.h"
- #ifdef WIN32
- #else
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <string.h>
- #include <fcntl.h>
- #include <unistd.h>
- #include <limits.h>
- #include <errno.h>
- #endif
- #define FIFO_NAME "/tmp/H264_fifo"
- #define BUFFERSIZE PIPE_BUF
- CRTSPStream::CRTSPStream(void)
- {
- }
- CRTSPStream::~CRTSPStream(void)
- {
- }
- bool CRTSPStream::Init()
- {
- if(access(FIFO_NAME,F_OK) == -1)
- {
- int res = mkfifo(FIFO_NAME,0777);
- if(res != 0)
- {
- printf("[RTSPStream] Create fifo failed.\n");
- return false;
- }
- }
- return true;
- }
- void CRTSPStream::Uninit()
- {
- }
- bool CRTSPStream::SendH264File(const char *pFileName)
- {
- if(pFileName == NULL)
- {
- return false;
- }
- FILE *fp = fopen(pFileName, "rb");
- if(!fp)
- {
- printf("[RTSPStream] error:open file %s failed!",pFileName);
- }
- fseek(fp, 0, SEEK_SET);
- unsigned char *buffer = new unsigned char[FILEBUFSIZE];
- int pos = 0;
- while(1)
- {
- int readlen = fread(buffer+pos, sizeof(unsigned char), FILEBUFSIZE-pos, fp);
- if(readlen<=0)
- {
- break;
- }
- readlen+=pos;
- int writelen = SendH264Data(buffer,readlen);
- if(writelen<=0)
- {
- break;
- }
- memcpy(buffer,buffer+writelen,readlen-writelen);
- pos = readlen-writelen;
- mSleep(25);
- }
- fclose(fp);
- delete[] buffer;
- return true;
- }
- // 发送H264数据帧
- int CRTSPStream::SendH264Data(const unsigned char *data,unsigned int size)
- {
- if(data == NULL)
- {
- return 0;
- }
- // open pipe with non_block mode
- int pipe_fd = open(FIFO_NAME, O_WRONLY|O_NONBLOCK);
- //printf("[RTSPStream] open fifo result = [%d]\n",pipe_fd);
- if(pipe_fd == -1)
- {
- return 0;
- }
- int send_size = 0;
- int remain_size = size;
- while(send_size < size)
- {
- int data_len = (remain_size<BUFFERSIZE) ? remain_size : BUFFERSIZE;
- int len = write(pipe_fd,data+send_size,data_len);
- if(len == -1)
- {
- static int resend_conut = 0;
- if(errno == EAGAIN && ++resend_conut<=3)
- {
- printf("[RTSPStream] write fifo error,resend..\n");
- continue;
- }
- resend_conut = 0;
- printf("[RTSPStream] write fifo error,errorcode[%d],send_size[%d]\n",errno,send_size);
- break;
- }
- else
- {
- send_size+= len;
- remain_size-= len;
- }
- }
- close(pipe_fd);
- //printf("[RTSPStream] SendH264Data datalen[%d], sendsize = [%d]\n",size,send_size);
- return 0;
- }
测试程序代码
- #include <stdio.h>
- #include "RTSPStream.h"
- int main(int argc,char* argv[])
- {
- CRTSPStream rtspSender;
- bool bRet = rtspSender.Init();
- rtspSender.SendH264File("E:\\测试视频\\test.264");
- system("pause");
- }
-
顶
- 5
-
踩
- 4
相关文章推荐
-
猜你在找
- 机器学习之概率与统计推断
- 机器学习之数学基础
- 机器学习之凸优化
- 机器学习之矩阵
- 响应式布局全新探索
- 探究Linux的总线、设备、驱动模型
- 深度学习基础与TensorFlow实践
- 深度学习之神经网络原理与实战技巧
- 前端开发在线峰会
- TensorFlow实战进阶:手把手教你做图像识别应用
19楼 xiaoxics 2017-06-10 13:10发表 [回复]-
-
直播地址是ip/live
18楼 aaqiujiaqi 2016-10-30 15:27发表 [回复]-
-
你好楼主,请问VLC的播放地址是什么?
Re: tantanya8990 2017-02-24 14:13发表 [回复]-
-
回复aaqiujiaqi:请问你知道VLC播放地址是什么了吗?
17楼 dtkong 2016-01-04 15:14发表 [回复]-
-
楼主,问一下这个方案的思想是 视频采集模块按固定的频率将采集的帧写入FIFO,然后LIVE555按规定的频率取帧,这两个个频率应该一致。
在发送侧是 mSleep(25); ---》 40
在Live555侧是 #define FRAME_PER_SEC 25
上面都是没有考虑代码运行时间的,能不能解释一下哈,谢谢!
Re: xalijianjun 2016-01-06 18:21发表 [回复]-
-
回复dtkong:1)int pipe_fd = open(FIFO_NAME,O_WRONLY|O_NONBLOCK);返回-1
----麻烦答复一以上问题是如何解决的,谢谢
16楼 dtkong 2016-01-04 15:13发表 [回复]-
-
楼主,问一下这个方案的思想是 视频采集模块按固定的频率将采集的帧写入FIFO,然后LIVE555按规定的频率取帧,这两个个频率应该一致。
在发送侧是 mSleep(25); ---》 40
在Live555侧是 #define FRAME_PER_SEC 25
上面都是没有考虑代码运行时间的,能不能解释一下哈,谢谢!
15楼 dtkong 2015-12-31 13:57发表 [回复]-
-
哪位大哥用上面的code在VC上编译通过了没?我编译出现了大量的错误:F_OK, Access(),mkfifo等等没有定义,貌似这个是在unistd.h这个头文件中(Unix),然而我用的是 win32.
编译通过的大哥能不能给我发一份哈,谢谢。827121992@qq.com
14楼 xuan_xuan_2 2015-10-20 14:28发表 [回复]-
-
Linux下编译出现这个问题:live555MediaServer.cpp:(.text.startup+0x70): undefined reference to `WW_H264VideoServerMediaSubsession::createNew(UsageEnvironment&, FramedSource*)'
collect2: ld returned 1 exit status
请问如何解决?
Re: wanwenqing 2015-10-20 16:20发表 [回复]-
-
回复xuan_xuan_2:在mediaServer的Makefiie修改
MEDIA_SERVER_OBJS = live555MediaServer.$(OBJ) DynamicRTSPServer.$(OBJ) WW_H264VideoServerMediaSubsession.$(OBJ) WW_H264VideoSource.$(OBJ)
Re: xuan_xuan_2 2016-09-04 16:33发表 [回复]-
-
回复wanwenqing:OK,谢谢
13楼 小白菜VS 2015-10-12 16:04发表 [回复]-
-
这样子处理之后,多个客户端同时接入该服务器是不是视频就该花屏了啊?
12楼 xgcdd 2015-04-23 10:27发表 [回复]-
-
放到mediaServer目录下就可以了,大谢楼主!!!
Re: qq_26206911 2015-07-30 17:02发表 [回复]-
-
回复xgcdd:RSTPStream在哪里运行啊,而且我修改了文件以后make会出现live555MediaServer.cpp:(.text.startup+0x83): undefined reference to `WW_H264VideoServerMediaSubsession::createNew(UsageEnvironment&, FramedSource*)'
collect2: error: ld returned 1 exit status
这种问题
11楼 xgcdd 2015-04-23 10:10发表 [回复]-
-
我把代码都放到livemedia这个文件夹下,直接在他的 上层目录make,结果显示:
WW_H264VideoSource.h:5:36: error: BasicUsageEnvironment.hh: No such file or directory
版本是 :live.2015.04.01.tar.gz
楼主能帮忙看看吗?
10楼 ydh7611 2015-01-03 05:28发表 [回复]-
-
我也遇到一样的问题,不过第一点通过查找FIFO资料解决了。
第二点还没弄清楚。第一点就是把测试代码中的初始与发送文件部分做到不同的线程,就能解决。
Re: 鞋子特大号 2015-01-30 14:53发表 [回复]-
-
回复ydh7611:你好,问下,这个工程是在linux下还是windows下?
Re: lp1900 2015-03-13 22:11发表 [回复]-
-
回复鞋子特大号:博主加了条件编译,win和linux都能跑吧
9楼 luoww1 2014-09-16 17:26发表 [回复]-
-
按照你的说明,我创建RTSPStream.cpp后就报错,说“Error :未定义标识符“access”,”、“Error :未定义标识符“F_OK”,等这样子的问题,该怎么解决?
8楼 sg0771 2014-09-12 11:24发表 [回复]-
-
很多定义在windows平台没有,蛋疼啊
Re: iamscopy 2014-09-13 18:50发表 [回复]-
-
回复sg0771:你搞定了没,兄弟
7楼 johborhw 2014-07-29 19:25发表 [回复]-
-
我照这个程序来写,有两个问题:
1)int pipe_fd = open(FIFO_NAME,O_WRONLY|O_NONBLOCK);返回-1
2)若去掉O_NONBLOCK,live555启动之后出现错误:
StreamParser internal error (0 + 204800 > 150000)
Aborted (core dumped)
请问是什么原因呢?
Re: bill_cao2015 2015-11-09 15:34发表 [回复]-
-
回复johborhw:你好,你的这个问题结局了吗?我这边也出现这样的问题
Re: 莫明888 2016-12-07 17:59发表 [回复]-
-
回复bill_cao2015:请问你这个问题解决了吗?,我也遇到同样问题
Re: tantanya8990 2017-02-28 15:53发表 [回复]-
-
回复莫明888:请问这个问题您解决了吗
6楼 cc_xueqin 2014-07-10 09:57发表 [回复]-
-
前两天我弄出来啦。还是通报楼主一下。感谢
Re: luoww1 2014-10-27 11:02发表 [回复]-
-
回复cc_xueqin:我在vs2010中编译中存在问题,error C3861:"open" :找不到标识符,error C2065:"O_RDONLY':未声明的标识符,error C2039:"close" :不是“global namespace” 的成员这些怎么解决啊?
Re: iamscopy 2014-09-13 18:49发表 [回复]-
-
回复cc_xueqin:能指导下不,这个是在windows下编译的吗?
Re: wcchylove 2014-07-19 12:06发表 [回复]-
-
回复cc_xueqin:刚学习live555一周,自己想做个直播的,有些细节问题,能帮忙指导一下吗?
Re: wcchylove 2014-07-19 12:05发表 [回复]-
-
回复cc_xueqin:我刚学习live555一周,想自己弄个直播,看这篇文章说的很详细,但有些细节问题处理不好,能帮忙指导一下吗?谢谢
5楼 cc_xueqin 2014-07-08 10:40发表 [回复]-
-
我知道我上个的问题了 是因为我的数据buffer太大 live555的是150000,但是我又出现了一个问题 ,在获取到sdplines以后 调用了Medium::close,相当于读端也close了,在获取StreamParameters时又去打开读端,这个时候就无法打开了,楼主,你在哪里呀,好想你出来指点一下
Re: peng_si548 2017-03-13 17:34发表 [回复]-
-
回复cc_xueqin: 是怎么解决的了
4楼 cc_xueqin 2014-07-04 17:30发表 [回复]-
-
代码都跑通了,每次用ffplay 播放的时候都报Invalid data found when processing input 楼主能指个方向查找问题么,是我解析的264数据有问题么
3楼 kun_hust 2014-05-07 15:53发表 [回复]-
-
博主,我用你的代码直播时,直播了几帧后报错 Error in `./live555MediaServer': double free or corruption (out): 0x0817bce0 ***
Aborted (core dumped)
我用gdb看函数堆栈,出错在这里
#10 0x0804ccea in H264VideoStreamParser::parse() ()
#11 0x08061ef3 in MPEGVideoStreamFramer::continueReadProcessing() ()
#12 0x0804d84f in H264FUAFragmenter::doGetNextFrame() ()
#13 0x0804f716 in MultiFramedRTPSink::packFrame() ()
不知道楼主遇到过这个问题没?
2楼 wanwenqing 2014-05-02 22:10发表 [回复] [引用] [举报]-
-
写的非常详细,连测试代码都贴出来,感谢楼主。
1楼 随波足流 2013-12-24 20:50发表 [回复]-
-
这个直播测试程序运行发送端怎么出现段错误?大神你这是咋哪个里面建的工程?
Re: firehood 2013-12-25 08:44发表 [回复]-
-
回复随波足流:你用gdb跟踪一下,看一下问题出现在什么地方。