Skip to content

pylon/VideoWriter.h#

Contains support for writing video files in MP4 format, provided by a supplementary software package.

Namespaces#

Name
Pylon
Contains definitions of pylon types.

Classes#

Name
class Pylon::CVideoWriter
Supports writing video files.

Source code#

//------------------------------------------------------------------------------
//  Basler pylon SDK
//  Copyright (c) 2018-2022 Basler AG
//  http://www.baslerweb.com
//  Author:  DV
//------------------------------------------------------------------------------
#ifndef INCLUDED_VIDEOWRITER_H_3842348390
#define INCLUDED_VIDEOWRITER_H_3842348390

#include <pylon/Platform.h>

#ifdef _MSC_VER
#   pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */

#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable : 4275 ) // Class must have a dll interface to be used by clients of the class.
#endif

#include <pylon/stdinclude.h>
#include <pylon/PylonUtility.h>
#include <pylon/Image.h>
#include <pylon/_VideoWriterParams.h>
#include <GenApi/INodeMap.h>




namespace Pylon
{
    class CVideoWriterImpl;
    using namespace Basler_VideoWriterParams;

    class PYLONUTILITY_API CVideoWriter : public Basler_VideoWriterParams::CVideoWriterParams_Params
    {
    public:
        CVideoWriter();

        virtual ~CVideoWriter();

        static bool IsSupported();

        virtual void SetParameter(
            uint32_t width, uint32_t height,
            EPixelType inputPixelType,
            double framesPerSecondPlaybackSpeed,
            uint32_t quality
            );

        virtual void Open( const Pylon::String_t& filename );

        virtual bool IsOpen() const;

        virtual void Close();

        virtual void Add( const void* pBuffer, size_t bufferSize, Pylon::EPixelType pixelType, uint32_t width, uint32_t height, size_t paddingX, Pylon::EImageOrientation orientation );

        virtual void Add( const Pylon::IImage& image );

        virtual bool CanAddWithoutConversion( Pylon::EPixelType pixelType, uint32_t width, uint32_t height, size_t paddingX, Pylon::EImageOrientation orientation );

        virtual bool CanAddWithoutConversion( const Pylon::IImage& image );

        virtual GenApi::INodeMap& GetNodeMap();

    protected:
        CLock& GetLock();

    private:
        CVideoWriterImpl* m_pImpl;
    };
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#ifdef _MSC_VER
#   pragma pack(pop)
#endif /* _MSC_VER */

#endif // INCLUDED_VIDEOWRITER_H_3842348390

Updated on 5 July 2022 at 15:30:01