v4l2rtspserver/inc/H264_V4l2DeviceSource.h

47 lines
1.5 KiB
C
Raw Normal View History

/* ---------------------------------------------------------------------------
** This software is in the public domain, furnished "as is", without technical
** support, and with no warranty, express or implied, as to its usefulness for
** any purpose.
**
** H264_V4l2DeviceSource.h
**
** H264 V4L2 live555 source
**
** -------------------------------------------------------------------------*/
#ifndef H264_V4L2_DEVICE_SOURCE
#define H264_V4L2_DEVICE_SOURCE
// project
#include "V4l2DeviceSource.h"
// ---------------------------------
// H264 V4L2 FramedSource
// ---------------------------------
const char H264marker[] = {0,0,0,1};
2015-09-05 15:58:59 +00:00
const char H264shortmarker[] = {0,0,1};
class H264_V4L2DeviceSource : public V4L2DeviceSource
{
public:
2016-09-18 19:57:53 +00:00
static H264_V4L2DeviceSource* createNew(UsageEnvironment& env, DeviceCapture * device, int outputFd, unsigned int queueSize, bool useThread, bool repeatConfig, bool keepMarker) ;
protected:
2016-09-18 19:57:53 +00:00
H264_V4L2DeviceSource(UsageEnvironment& env, DeviceCapture * device, int outputFd, unsigned int queueSize, bool useThread, bool repeatConfig, bool keepMarker);
virtual ~H264_V4L2DeviceSource();
2015-03-29 09:09:57 +00:00
unsigned char* extractFrame(unsigned char* frame, size_t& size, size_t& outsize);
// overide V4L2DeviceSource
virtual std::list< std::pair<unsigned char*,size_t> > splitFrames(unsigned char* frame, unsigned frameSize);
private:
std::string m_sps;
std::string m_pps;
bool m_repeatConfig;
bool m_keepMarker;
int m_frameType;
};
#endif