整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
52
video/core/AudioOutput.h
Normal file
52
video/core/AudioOutput.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#ifndef F16FAA29_322A_4A89_945E_E56FFADAC2CD
|
||||
#define F16FAA29_322A_4A89_945E_E56FFADAC2CD
|
||||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "AudioAdaptablePipe.h"
|
||||
#include "util/FactoryManager.h"
|
||||
#include "util/Task.h"
|
||||
#include <string>
|
||||
|
||||
namespace Video
|
||||
{
|
||||
namespace Core
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
class AudioOutputSelector
|
||||
{
|
||||
public:
|
||||
static const std::string select(const std::string& arg)
|
||||
{
|
||||
auto pos = arg.find(':');
|
||||
return (pos != std::string::npos) ? arg.substr(0, pos) : arg;
|
||||
}
|
||||
};
|
||||
|
||||
class AudioOutput
|
||||
: public AudioAdaptablePipe,
|
||||
public ::Util::FactoryManager<AudioOutput, const std::string, AudioOutputSelector, const std::string&>
|
||||
{
|
||||
public:
|
||||
using AudioAdaptablePipe::AudioAdaptablePipe;
|
||||
|
||||
protected:
|
||||
void start() override;
|
||||
void stop() override;
|
||||
|
||||
virtual void writeFrame(Frame::Ptr pFrame) = 0;
|
||||
void onLink(Core::Component::Ptr pPrevious) override;
|
||||
|
||||
private:
|
||||
Util::Task _task;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue