pylon/AviCompressionOptions.h#
Namespaces#
Name |
---|
Pylon Contains definitions of pylon types. |
Classes#
Name | |
---|---|
struct | Pylon::SAviCompressionOptions Wraps the AVI compression options of the Video for Window API. |
Source code#
//------------------------------------------------------------------------------
// Basler pylon SDK
// Copyright (c) 2011-2022 Basler AG
// http://www.baslerweb.com
// Author: AG
//------------------------------------------------------------------------------
#ifndef INCLUDED_AVICOMPRESSIONOPTIONS_H_6841242
#define INCLUDED_AVICOMPRESSIONOPTIONS_H_6841242
#include <pylon/Platform.h>
#include <pylon/stdinclude.h>
#ifdef PYLON_WIN_BUILD
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable : 4201 ) // warning C4201: nonstandard extension used : nameless struct/union
#endif
#include <vfw.h>
#ifdef _MSC_VER
#pragma warning( pop )
#endif
#ifdef _MSC_VER
# pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */
namespace Pylon
{
struct SAviCompressionOptions
{
SAviCompressionOptions( bool optionalShowDialog = false, HWND optionalHParentWindow = NULL )
: hParentWindow( optionalHParentWindow )
, showDialog( optionalShowDialog )
, userDialogReturnOk( false )
, autoKeyFrameInsertionRate( 20 )
{
::ZeroMemory( &compressionOptions, sizeof( compressionOptions ) );
}
SAviCompressionOptions( const char* fourCharacterCode, bool optionalShowDialog = false, HWND optionalHParentWindow = NULL )
: hParentWindow( optionalHParentWindow )
, showDialog( optionalShowDialog )
, userDialogReturnOk( false )
, autoKeyFrameInsertionRate( 20 )
{
::ZeroMemory( &compressionOptions, sizeof( compressionOptions ) );
//Set compression.
compressionOptions.dwFlags = AVICOMPRESSF_VALID;
//Handle the case if the code passes has fewer than four characters.
String_t fourCharacterCodeLocal( fourCharacterCode );
fourCharacterCodeLocal += " ";
fourCharacterCodeLocal.resize( 4 );
//Set four character code.
compressionOptions.fccHandler = mmioFOURCC( fourCharacterCodeLocal[0], fourCharacterCodeLocal[1], fourCharacterCodeLocal[2], fourCharacterCodeLocal[3] );
}
HWND hParentWindow;
bool showDialog;
bool userDialogReturnOk;
LONG autoKeyFrameInsertionRate;
AVICOMPRESSOPTIONS compressionOptions;
};
}
#else
//No AVI support for Linux.
#endif
#ifdef _MSC_VER
# pragma pack(pop)
#endif /* _MSC_VER */
#endif /* INCLUDED_AVICOMPRESSIONOPTIONS_H_6841242 */
Updated on 5 July 2022 at 15:30:01