gstreamermm  1.10.0
Public Member Functions | List of all members
Gst::VideoInfo Class Reference

Information describing image properties. More...

#include <gstreamermm/videoinfo.h>

Public Member Functions

 VideoInfo ()
 
 VideoInfo (const VideoInfo& other)
 
VideoInfooperator= (const VideoInfo& other)
 
 VideoInfo (GstVideoInfo* castitem, bool take_ownership)
 This constructor allows to wrap both dynamic and static allocated GstVideoInfo object. More...
 
 ~VideoInfo ()
 
GstVideoInfo* gobj ()
 
const GstVideoInfo* gobj () const
 
void init ()
 Initialize info with default values. More...
 
void set_format (Gst::VideoFormat format, guint width, guint height)
 Set the default info for a video frame of format and width and height. More...
 
bool from_caps (const Glib::RefPtr< const Gst::Caps >& caps)
 Parse caps and update info. More...
 
Glib::RefPtr< Gst::Capsto_caps () const
 Convert the values of info into a Gst::Caps. More...
 
bool convert (Gst::Format src_format, gint64 src_value, Gst::Format dest_format, gint64& dest_value)
 Converts among various Gst::Format types. More...
 
bool is_equal (const Gst::VideoInfo& other) const
 Compares two Gst::VideoInfo and returns whether they are equal or not. More...
 
const VideoFormatInfo get_finfo () const
 
Gst::VideoInterlaceMode get_interlace_mode () const
 
void set_interlace_mode (const Gst::VideoInterlaceMode& value)
 
Gst::VideoFlags get_flags () const
 
void set_flags (const Gst::VideoFlags& value)
 
gint get_width () const
 
void set_width (const gint& value)
 
gint get_height () const
 
void set_height (const gint& value)
 
gsize get_size () const
 
void set_size (const gsize& value)
 
gint get_views () const
 
void set_views (const gint& value)
 
Gst::VideoChromaSite get_chroma_site () const
 
void set_chroma_site (const Gst::VideoChromaSite& value)
 
gint get_par_n () const
 
void set_par_n (const gint& value)
 
gint get_par_d () const
 
void set_par_d (const gint& value)
 
gint get_fps_n () const
 
void set_fps_n (const gint& value)
 
gint get_fps_d () const
 
void set_fps_d (const gint& value)
 
Gst::VideoMultiviewMode get_multiview_mode () const
 
void set_multiview_mode (const Gst::VideoMultiviewMode& value)
 
Gst::VideoMultiviewFlags get_multiview_flags () const
 
void set_multiview_flags (const Gst::VideoMultiviewFlags& value)
 

Detailed Description

Information describing image properties.

This information can be filled in from Gst::Caps with from_caps(). The information is also used to store the specific video info when mapping a video frame with VideoFrame::map().

Last reviewed on 2016-09-14 (1.8.0).

Constructor & Destructor Documentation

◆ VideoInfo() [1/3]

Gst::VideoInfo::VideoInfo ( )

◆ VideoInfo() [2/3]

Gst::VideoInfo::VideoInfo ( const VideoInfo other)

◆ VideoInfo() [3/3]

Gst::VideoInfo::VideoInfo ( GstVideoInfo *  castitem,
bool  take_ownership 
)

This constructor allows to wrap both dynamic and static allocated GstVideoInfo object.

If castitem is either static allocated or dynamic allocated, but will be freed somewhere else, take_ownership should be set to false. If take_ownership is set to true, castitem is freed in VideoInfo destructor.

◆ ~VideoInfo()

Gst::VideoInfo::~VideoInfo ( )

Member Function Documentation

◆ convert()

bool Gst::VideoInfo::convert ( Gst::Format  src_format,
gint64  src_value,
Gst::Format  dest_format,
gint64 &  dest_value 
)

Converts among various Gst::Format types.

This function handles GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For raw video, GST_FORMAT_DEFAULT corresponds to video frames. This function can be used to handle pad queries of the type GST_QUERY_CONVERT.

Parameters
src_formatGst::Format of the src_value.
src_valueValue to convert.
dest_formatGst::Format of the dest_value.
dest_valuePointer to destination value.
Returns
true if the conversion was successful.

◆ from_caps()

bool Gst::VideoInfo::from_caps ( const Glib::RefPtr< const Gst::Caps >&  caps)

Parse caps and update info.

Parameters
capsA Gst::Caps.
Returns
true if caps could be parsed.

◆ get_chroma_site()

Gst::VideoChromaSite Gst::VideoInfo::get_chroma_site ( ) const

◆ get_finfo()

const VideoFormatInfo Gst::VideoInfo::get_finfo ( ) const

◆ get_flags()

Gst::VideoFlags Gst::VideoInfo::get_flags ( ) const

◆ get_fps_d()

gint Gst::VideoInfo::get_fps_d ( ) const

◆ get_fps_n()

gint Gst::VideoInfo::get_fps_n ( ) const

◆ get_height()

gint Gst::VideoInfo::get_height ( ) const

◆ get_interlace_mode()

Gst::VideoInterlaceMode Gst::VideoInfo::get_interlace_mode ( ) const

◆ get_multiview_flags()

Gst::VideoMultiviewFlags Gst::VideoInfo::get_multiview_flags ( ) const

◆ get_multiview_mode()

Gst::VideoMultiviewMode Gst::VideoInfo::get_multiview_mode ( ) const

◆ get_par_d()

gint Gst::VideoInfo::get_par_d ( ) const

◆ get_par_n()

gint Gst::VideoInfo::get_par_n ( ) const

◆ get_size()

gsize Gst::VideoInfo::get_size ( ) const

◆ get_views()

gint Gst::VideoInfo::get_views ( ) const

◆ get_width()

gint Gst::VideoInfo::get_width ( ) const

◆ gobj() [1/2]

GstVideoInfo* Gst::VideoInfo::gobj ( )
inline

◆ gobj() [2/2]

const GstVideoInfo* Gst::VideoInfo::gobj ( ) const
inline

◆ init()

void Gst::VideoInfo::init ( )

Initialize info with default values.

◆ is_equal()

bool Gst::VideoInfo::is_equal ( const Gst::VideoInfo other) const

Compares two Gst::VideoInfo and returns whether they are equal or not.

Parameters
otherA Gst::VideoInfo.
Returns
true if info and other are equal, else false.

◆ operator=()

VideoInfo& Gst::VideoInfo::operator= ( const VideoInfo other)

◆ set_chroma_site()

void Gst::VideoInfo::set_chroma_site ( const Gst::VideoChromaSite value)

◆ set_flags()

void Gst::VideoInfo::set_flags ( const Gst::VideoFlags value)

◆ set_format()

void Gst::VideoInfo::set_format ( Gst::VideoFormat  format,
guint  width,
guint  height 
)

Set the default info for a video frame of format and width and height.

Note
This initializes info first, no values are preserved. This function does not set the offsets correctly for interlaced vertically subsampled formats.
Parameters
formatThe format.
widthA width.
heightA height.

◆ set_fps_d()

void Gst::VideoInfo::set_fps_d ( const gint &  value)

◆ set_fps_n()

void Gst::VideoInfo::set_fps_n ( const gint &  value)

◆ set_height()

void Gst::VideoInfo::set_height ( const gint &  value)

◆ set_interlace_mode()

void Gst::VideoInfo::set_interlace_mode ( const Gst::VideoInterlaceMode value)

◆ set_multiview_flags()

void Gst::VideoInfo::set_multiview_flags ( const Gst::VideoMultiviewFlags value)

◆ set_multiview_mode()

void Gst::VideoInfo::set_multiview_mode ( const Gst::VideoMultiviewMode value)

◆ set_par_d()

void Gst::VideoInfo::set_par_d ( const gint &  value)

◆ set_par_n()

void Gst::VideoInfo::set_par_n ( const gint &  value)

◆ set_size()

void Gst::VideoInfo::set_size ( const gsize &  value)

◆ set_views()

void Gst::VideoInfo::set_views ( const gint &  value)

◆ set_width()

void Gst::VideoInfo::set_width ( const gint &  value)

◆ to_caps()

Glib::RefPtr<Gst::Caps> Gst::VideoInfo::to_caps ( ) const

Convert the values of info into a Gst::Caps.

Returns
A new Gst::Caps containing the info of info.