areaDetector  3-5-0
EPICS areaDetector framework
Macros | Functions
ffmpegCommon.h File Reference
#include "libavcodec/avcodec.h"
#include "libswscale/swscale.h"
#include "libavformat/avformat.h"
#include "NDArray.h"
#include "asynDriver.h"

Go to the source code of this file.

Macros

#define __STDC_CONSTANT_MACROS
 
#define NEUTRAL_FRAME_SIZE   4000 * 3000 / 2
 

Functions

void ffmpegInitialise ()
 Initialise the ffmpeg library. More...
 
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. More...
 

Detailed Description

License

Author: Diamond Light Source, Copyright 2010

'ffmpegServer' is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

'ffmpegServer' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with 'ffmpegServer'. If not, see http://www.gnu.org/licenses/.

Macro Definition Documentation

◆ __STDC_CONSTANT_MACROS

#define __STDC_CONSTANT_MACROS

◆ NEUTRAL_FRAME_SIZE

#define NEUTRAL_FRAME_SIZE   4000 * 3000 / 2

Function Documentation

◆ ffmpegInitialise()

void ffmpegInitialise ( )

Initialise the ffmpeg library.

◆ formatArray()

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.

Use inPicture to wrap the data in pArray, use swscale to convert it to scPicture using the output parameters stored in c. Special case for gray8 -> YUVx, can use the data as is and add a neutral array for the colour info.