rename files and use #pragma once in each include

pull/296/head
mpromonet 3 years ago
parent 1f0c7686c3
commit 842dce97e2

@ -11,8 +11,7 @@
**
** -------------------------------------------------------------------------*/
#ifndef ALSA_CAPTURE
#define ALSA_CAPTURE
#pragma once
#include <list>
@ -63,6 +62,5 @@ class ALSACapture : public DeviceInterface
snd_pcm_format_t m_fmt;
};
#endif

@ -3,7 +3,7 @@
** support, and with no warranty, express or implied, as to its usefulness for
** any purpose.
**
** ServerMediaSubsession.h
** BaseServerMediaSubsession.h
**
** -------------------------------------------------------------------------*/
@ -22,7 +22,7 @@
#include <linux/videodev2.h>
#include "DeviceSource.h"
#include "V4L2DeviceSource.h"
#include "logger.h"
#ifdef HAVE_ALSA

@ -8,8 +8,7 @@
** -------------------------------------------------------------------------*/
#ifndef DEVICE_INTERFACE
#define DEVICE_INTERFACE
#pragma once
// ---------------------------------
@ -31,4 +30,3 @@ class DeviceInterface
};
#endif

@ -13,7 +13,7 @@
#include <linux/videodev2.h>
#include "DeviceSource.h"
#include "V4L2DeviceSource.h"
#include "H264_V4l2DeviceSource.h"
class DeviceSourceFactory {

@ -10,11 +10,10 @@
** -------------------------------------------------------------------------*/
#ifndef H264_V4L2_DEVICE_SOURCE
#define H264_V4L2_DEVICE_SOURCE
#pragma once
// project
#include "DeviceSource.h"
#include "V4L2DeviceSource.h"
// ---------------------------------
// H264 V4L2 FramedSource
@ -72,4 +71,3 @@ class H265_V4L2DeviceSource : public H26X_V4L2DeviceSource
std::string m_vps;
};
#endif

@ -9,7 +9,7 @@
#pragma once
#include "ServerMediaSubsession.h"
#include "BaseServerMediaSubsession.h"
// -----------------------------------------
// ServerMediaSubsession for Multicast

@ -9,7 +9,7 @@
#pragma once
#include "ServerMediaSubsession.h"
#include "BaseServerMediaSubsession.h"
// -----------------------------------------
// ServerMediaSubsession for Unicast

@ -3,15 +3,14 @@
** support, and with no warranty, express or implied, as to its usefulness for
** any purpose.
**
** DeviceSource.h
** V4L2DeviceSource.h
**
** live555 source
**
** -------------------------------------------------------------------------*/
#ifndef DEVICE_SOURCE
#define DEVICE_SOURCE
#pragma once
#include <string>
#include <list>
@ -24,28 +23,10 @@
#include <liveMedia.hh>
#include "DeviceInterface.h"
#include "V4l2Capture.h"
// -----------------------------------------
// Video Device Capture Interface
// Video Device Source
// -----------------------------------------
class VideoCaptureAccess : public DeviceInterface
{
public:
VideoCaptureAccess(V4l2Capture* device) : m_device(device) {}
virtual ~VideoCaptureAccess() { delete m_device; }
virtual size_t read(char* buffer, size_t bufferSize) { return m_device->read(buffer, bufferSize); }
virtual int getFd() { return m_device->getFd(); }
virtual unsigned long getBufferSize() { return m_device->getBufferSize(); }
virtual int getWidth() { return m_device->getWidth(); }
virtual int getHeight() { return m_device->getHeight(); }
virtual int getVideoFormat() { return m_device->getFormat(); }
protected:
V4l2Capture* m_device;
};
class V4L2DeviceSource: public FramedSource
{
public:
@ -95,7 +76,7 @@ class V4L2DeviceSource: public FramedSource
protected:
static void* threadStub(void* clientData) { return ((V4L2DeviceSource*) clientData)->thread();};
void* thread();
virtual void* thread();
static void deliverFrameStub(void* clientData) {((V4L2DeviceSource*) clientData)->deliverFrame();};
void deliverFrame();
static void incomingPacketHandlerStub(void* clientData, int mask) { ((V4L2DeviceSource*) clientData)->incomingPacketHandler(); };
@ -123,4 +104,3 @@ class V4L2DeviceSource: public FramedSource
std::string m_auxLine;
};
#endif

@ -17,7 +17,6 @@
#include <BasicUsageEnvironment.hh>
#include <GroupsockHelper.hh>
#include "ServerMediaSubsession.h"
#include "UnicastServerMediaSubsession.h"
#include "MulticastServerMediaSubsession.h"
#include "TSServerMediaSubsession.h"

@ -0,0 +1,37 @@
/* ---------------------------------------------------------------------------
** 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.
**
** DeviceSource.h
**
** live555 source
**
** -------------------------------------------------------------------------*/
#pragma once
#include "DeviceInterface.h"
#include "V4l2Capture.h"
// -----------------------------------------
// Video Device Capture Interface
// -----------------------------------------
class VideoCaptureAccess : public DeviceInterface
{
public:
VideoCaptureAccess(V4l2Capture* device) : m_device(device) {}
virtual ~VideoCaptureAccess() { delete m_device; }
virtual size_t read(char* buffer, size_t bufferSize) { return m_device->read(buffer, bufferSize); }
virtual int getFd() { return m_device->getFd(); }
virtual unsigned long getBufferSize() { return m_device->getBufferSize(); }
virtual int getWidth() { return m_device->getWidth(); }
virtual int getHeight() { return m_device->getHeight(); }
virtual int getVideoFormat() { return m_device->getFormat(); }
protected:
V4l2Capture* m_device;
};

@ -8,7 +8,6 @@
** -------------------------------------------------------------------------*/
#include "MulticastServerMediaSubsession.h"
#include "DeviceSource.h"
// -----------------------------------------
// ServerMediaSubsession for Multicast

@ -11,9 +11,8 @@
#include <linux/videodev2.h>
// project
#include "ServerMediaSubsession.h"
#include "BaseServerMediaSubsession.h"
#include "MJPEGVideoSource.h"
#include "DeviceSource.h"
// ---------------------------------
// BaseServerMediaSubsession

@ -9,7 +9,6 @@
#include "UnicastServerMediaSubsession.h"
#include "DeviceSource.h"
// -----------------------------------------
// ServerMediaSubsession for Unicast

@ -15,7 +15,7 @@
// project
#include "logger.h"
#include "DeviceSource.h"
#include "V4L2DeviceSource.h"
// ---------------------------------
// V4L2 FramedSource Stats

@ -18,6 +18,7 @@
#include "V4l2Output.h"
#include "DeviceSourceFactory.h"
#include "V4l2RTSPServer.h"
#include "VideoCaptureAccess.h"
#ifdef HAVE_ALSA
#include "ALSACapture.h"

Loading…
Cancel
Save