我使用的是定制的德州仪器OMAP-L138板,基本上由基于ARM9的SoC和DSP处理器组成.它连接到相机镜头.我要做的是捕获发送到dsp处理器的实时视频流,用于H264编码,该编码通过uPP以8192字节的数据包发送.我想使用Live555提供的testH264VideoStreamer在RTSP上直播H264编码视频.我修改过的代码如下所示:
#include <liveMedia.hh>
#include <BasicUsageEnvironment.hh>
#include <GroupsockHelper.hh>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <string.h>
#include <unistd.h> //to allow read() function
UsageEnvironment* env;
H264VideoStreamFramer* videoSource;
RTPSink* videoSink;
//-------------------------------------------------------------------------------
/* Open File Descriptor*/
int stream = open("/dev/upp", O_RDONLY);
/* Declaring a static 8 bit unsigned integer of size 8192 bytes that keeps its value between invocations */
static uint8_t buf[8192];
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Execute play function as a forwarding mechanism
//------------------------------------------------------------------------------
void play(); // forward …Run Code Online (Sandbox Code Playgroud)