Add ffmpeg code into InputStream and create option for it in the cmake
configuration
This commit is contained in:
1 parent
73fbd05488
commit
e4c78ae031
4 files changed
+294
-31
No files matched your search
@@ -36,6 +36,13 @@
|
||||
#include <opencv2/opencv.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef USE_FFMPEG
|
||||
#include "libavutil/imgutils.h"
|
||||
#include "libavutil/samplefmt.h"
|
||||
#include "libavutil/timestamp.h"
|
||||
#include "libavformat/avformat.h"
|
||||
#endif
|
||||
|
||||
#include "TypeDef.h"
|
||||
|
||||
namespace plaYUVer
|
||||
@@ -46,6 +53,21 @@ enum InputStream_Errors
|
||||
NO_ERROR = 0, READING = 1,
|
||||
};
|
||||
|
||||
#ifdef USE_FFMPEG
|
||||
typedef struct __LibAvContext
|
||||
{
|
||||
AVFormatContext *fmt_ctx;
|
||||
AVCodecContext *video_dec_ctx;
|
||||
AVStream *video_stream;
|
||||
Int video_stream_idx;
|
||||
AVFrame *frame;
|
||||
AVPacket pkt;
|
||||
uint8_t *video_dst_data[4];
|
||||
int video_dst_linesize[4];
|
||||
int video_dst_bufsize;
|
||||
} LibAvContext;
|
||||
#endif
|
||||
|
||||
class InputStream
|
||||
{
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user