MeVisLab Toolbox Reference
macos::VideoFoundationMovie Class Reference

Movie related functions. More...

#include <macVideoFoundation.h>

Public Types

enum  VFFileType { VFFileTypeQuickTimeMovie , VFFileTypeMPEG4 }
 Specifies the different folder types. More...
 

Public Member Functions

 VideoFoundationMovie ()
 C-tor. More...
 
 ~VideoFoundationMovie ()
 D-tor. More...
 
bool create (const VFFileType fileType=VFFileTypeQuickTimeMovie, const std::string &videoCodecType=std::string())
 Create an empty movie container (with the given, optional codec type) More...
 
bool canAddImages ()
 Returns 'true' if the movie container allows images to be added. More...
 
bool addImageFile (const std::string &filename, double durationInMilliSecs=1000./30.)
 Add the given image file to the movie (UTF8) (the default duration for a frame will result in 30fps) More...
 
bool addMLImage (void *pagedImage, double durationInMilliSecs=1000./30.)
 Add an ML paged image to the movie (the default duration for a frame will result in 30fps) More...
 
bool addRGB8Image (void *data, bool flipVertically, unsigned int width, unsigned int height, double durationInMilliSecs=1000./30.)
 Add an RGB8 memory image (8-bit RGB interleaved) to the movie (the default duration for a frame will result in 30fps) More...
 
bool save (const std::string &filename, const std::string &exportPresetName=std::string())
 Saves the movie (UTF8) (with the given, optional export preset, e.g. AVAssetExportPreset1920x1080) More...
 
std::string temporaryMovieFilename ()
 Returns the file name of the temporary movie file (used for interface tests) More...
 

Static Public Member Functions

static std::string defaultVideoCodecType ()
 Returns the default video codec type. More...
 
static bool isVideoCodecTypeAvailable (const std::string &videoCodecType)
 Returns 'true' if the specified video codec type is available. More...
 
static VFFileType fileTypeFromFilename (const std::string &filename)
 Derives and returns the file type from the given file name. More...
 
static std::set< std::string > availableVideoCodecTypes ()
 Returns the code names of all video codecs of the current system. More...
 
static std::string videoCodecDisplayName (const std::string &videoCodecType)
 Return the human readable name of the given video codec code name. More...
 

Detailed Description

Movie related functions.

Definition at line 30 of file macVideoFoundation.h.

Member Enumeration Documentation

◆ VFFileType

Specifies the different folder types.

Enumerator
VFFileTypeQuickTimeMovie 

QuickTime movie file format, files are identified with the .mov and .qt extensions.

VFFileTypeMPEG4 

MPEG-4 file format, files are identified with the .mp4 extension.

Definition at line 35 of file macVideoFoundation.h.

Constructor & Destructor Documentation

◆ VideoFoundationMovie()

macos::VideoFoundationMovie::VideoFoundationMovie ( )

C-tor.

◆ ~VideoFoundationMovie()

macos::VideoFoundationMovie::~VideoFoundationMovie ( )

D-tor.

Member Function Documentation

◆ addImageFile()

bool macos::VideoFoundationMovie::addImageFile ( const std::string &  filename,
double  durationInMilliSecs = 1000./30. 
)

Add the given image file to the movie (UTF8) (the default duration for a frame will result in 30fps)

◆ addMLImage()

bool macos::VideoFoundationMovie::addMLImage ( void *  pagedImage,
double  durationInMilliSecs = 1000./30. 
)

Add an ML paged image to the movie (the default duration for a frame will result in 30fps)

◆ addRGB8Image()

bool macos::VideoFoundationMovie::addRGB8Image ( void *  data,
bool  flipVertically,
unsigned int  width,
unsigned int  height,
double  durationInMilliSecs = 1000./30. 
)

Add an RGB8 memory image (8-bit RGB interleaved) to the movie (the default duration for a frame will result in 30fps)

◆ availableVideoCodecTypes()

static std::set<std::string> macos::VideoFoundationMovie::availableVideoCodecTypes ( )
static

Returns the code names of all video codecs of the current system.

◆ canAddImages()

bool macos::VideoFoundationMovie::canAddImages ( )

Returns 'true' if the movie container allows images to be added.

◆ create()

bool macos::VideoFoundationMovie::create ( const VFFileType  fileType = VFFileTypeQuickTimeMovie,
const std::string &  videoCodecType = std::string() 
)

Create an empty movie container (with the given, optional codec type)

If no codec type is given or the codec does not exist on the system, a default codec type is chosen by the implementation

◆ defaultVideoCodecType()

static std::string macos::VideoFoundationMovie::defaultVideoCodecType ( )
static

Returns the default video codec type.

◆ fileTypeFromFilename()

static VFFileType macos::VideoFoundationMovie::fileTypeFromFilename ( const std::string &  filename)
static

Derives and returns the file type from the given file name.

◆ isVideoCodecTypeAvailable()

static bool macos::VideoFoundationMovie::isVideoCodecTypeAvailable ( const std::string &  videoCodecType)
static

Returns 'true' if the specified video codec type is available.

◆ save()

bool macos::VideoFoundationMovie::save ( const std::string &  filename,
const std::string &  exportPresetName = std::string() 
)

Saves the movie (UTF8) (with the given, optional export preset, e.g. AVAssetExportPreset1920x1080)

Note: Providing an export preset name or a filename with different file type extension may result in a reencoding of the recorded movie.

◆ temporaryMovieFilename()

std::string macos::VideoFoundationMovie::temporaryMovieFilename ( )

Returns the file name of the temporary movie file (used for interface tests)

◆ videoCodecDisplayName()

static std::string macos::VideoFoundationMovie::videoCodecDisplayName ( const std::string &  videoCodecType)
static

Return the human readable name of the given video codec code name.


The documentation for this class was generated from the following file: