整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
52
video/ffmpeg/Util.h
Normal file
52
video/ffmpeg/Util.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#ifndef CAEDF84E_DEDF_40BF_A293_86ED2D0A044A
|
||||
#define CAEDF84E_DEDF_40BF_A293_86ED2D0A044A
|
||||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "../core/CodecID.h"
|
||||
#include "../core/ChannelLayout.h"
|
||||
#include "../core/SampleFormat.h"
|
||||
extern "C"
|
||||
{
|
||||
#include <libavutil/avutil.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavutil/imgutils.h>
|
||||
#include <libswscale/swscale.h>
|
||||
}
|
||||
#include <string>
|
||||
|
||||
namespace Video
|
||||
{
|
||||
namespace FFmpeg
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
class Util
|
||||
{
|
||||
public:
|
||||
static std::string getMediaTypeString(enum AVMediaType mediaType);
|
||||
static std::string getErrorString(int err);
|
||||
static std::string getCodecIDString(AVCodecID id);
|
||||
static std::string getSampleFormatString(AVSampleFormat fmt);
|
||||
|
||||
static const AVCodec* getEncoder(Core::CodecID codec);
|
||||
static const AVCodec* getDecoder(Core::CodecID codec);
|
||||
|
||||
static const Core::CodecID getCodecID(AVCodecID id);
|
||||
|
||||
static AVChannelLayout getChannelLayout(Core::ChannelLayout layout);
|
||||
static Core::ChannelLayout getChannelLayout(AVChannelLayout layout);
|
||||
|
||||
static AVSampleFormat getSampleFormat(Core::SampleFormat format);
|
||||
static Core::SampleFormat getSampleFormat(AVSampleFormat format);
|
||||
static int convertJPG2NV16(std::string srcPath, std::string dstPath);
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue