areaDetector  3-5-0
EPICS areaDetector framework
ffmpegCommon.h
Go to the documentation of this file.
1 #ifndef ffmpegCommon_H
2 #define ffmpegCommon_H
3 
4 #ifndef __STDC_CONSTANT_MACROS
5 #define __STDC_CONSTANT_MACROS
6 #endif
7 
8 /* ffmpeg includes */
9 extern "C" {
10 #include "libavcodec/avcodec.h"
11 #include "libswscale/swscale.h"
12 #include "libavformat/avformat.h"
13 }
14 
15 /* areaDetector includes */
16 #include "NDArray.h"
17 
18 /* asyn includes */
19 #include "asynDriver.h"
20 
21 /* This wraps the initialisation of the ffmpeg library */
22 void ffmpegInitialise();
23 
24 /* This is needed to give a neutral colour to Mono8 jpegs. Needs to be at
25  least maxw * maxh / 2 in size */
26 #define NEUTRAL_FRAME_SIZE 4000 * 3000 / 2
27 
28 /* This formats an NDArray so that it matches the input for a particular
29  codec context */
30 int formatArray(NDArray *pArray, asynUser *pasynUser, AVFrame *inPicture,
31  struct SwsContext **pCtx, AVCodecContext *c, AVFrame *scPicture);
32 
33 #endif
34 
int formatArray(NDArray *pArray, asynUser *pasynUser, AVFrame *inPicture, struct SwsContext **pCtx, AVCodecContext *c, AVFrame *scPicture)
Format an NDArray as an AVFrame using the codec context c.
Definition: ffmpegCommon.cpp:30
void ffmpegInitialise()
Initialise the ffmpeg library.
Definition: ffmpegCommon.cpp:7
N-dimensional array class; each array has a set of dimensions, a data type, pointer to data,...
Definition: NDArray.h:92