reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

#include <ofGstUtils.h>

Inheritance diagram for ofGstVideoUtils:
ofBaseVideo ofGstUtils ofBaseHasPixels_< unsigned char > ofBaseUpdates ofAbstractHasPixels

Public Member Functions

 ofGstVideoUtils ()
 
virtual ~ofGstVideoUtils ()
 
bool setPipeline (std::string pipeline, ofPixelFormat pixelFormat=OF_PIXELS_RGB, bool isStream=false, int w=-1, int h=-1)
 
bool setPixelFormat (ofPixelFormat pixelFormat)
 Set the requested ofPixelFormat.
 
ofPixelFormat getPixelFormat () const
 
bool allocate (int w, int h, ofPixelFormat pixelFormat)
 
void reallocateOnNextFrame ()
 
bool isFrameNew () const
 
ofPixelsgetPixels ()
 Get a reference to the underlying ofPixels.
 
const ofPixelsgetPixels () const
 Get a const reference to the underlying ofPixels.
 
ofTexturegetTexture ()
 
void update ()
 Update the object's state.
 
float getHeight () const
 
float getWidth () const
 
void close ()
 Close the video source.
 
bool isInitialized () const
 Determine if the video source is initialized.
 
void setCopyPixels (bool copy)
 
- Public Member Functions inherited from ofBaseVideo
virtual ~ofBaseVideo ()
 Destroy the ofBaseVideo.
 
- Public Member Functions inherited from ofBaseHasPixels_< unsigned char >
virtual ~ofBaseHasPixels_ ()
 Destroy the ofAbstractHasPixels.
 
- Public Member Functions inherited from ofAbstractHasPixels
virtual ~ofAbstractHasPixels ()
 Destroy the ofAbstractHasPixels.
 
- Public Member Functions inherited from ofBaseUpdates
virtual ~ofBaseUpdates ()
 Destroy the ofBaseUpdates.
 
- Public Member Functions inherited from ofGstUtils
 ofGstUtils ()
 
virtual ~ofGstUtils ()
 
bool setPipelineWithSink (std::string pipeline, std::string sinkname="sink", bool isStream=false)
 
bool setPipelineWithSink (GstElement *pipeline, GstElement *sink, bool isStream=false)
 
bool startPipeline ()
 
void play ()
 
void stop ()
 
void setPaused (bool bPause)
 
bool isPaused () const
 
bool isLoaded () const
 
bool isPlaying () const
 
float getPosition () const
 
int64_t getPositionNanos () const
 
float getSpeed () const
 
float getDuration () const
 
int64_t getDurationNanos () const
 
bool getIsMovieDone () const
 
void setPosition (float pct)
 
void setVolume (float volume)
 
void setLoopState (ofLoopType state)
 
ofLoopType getLoopState () const
 
void setSpeed (float speed)
 
void setFrameByFrame (bool bFrameByFrame)
 
bool isFrameByFrame () const
 
GstElementgetPipeline () const
 
GstElementgetSink () const
 
GstElementgetGstElementByName (const std::string &name) const
 
uint64_t getMinLatencyNanos () const
 
uint64_t getMaxLatencyNanos () const
 
void setSinkListener (ofGstAppSink *appsink)
 

Public Attributes

ofEvent< ofPixelsprerollEvent
 
ofEvent< ofPixelsbufferEvent
 
ofEvent< ofEventArgseosEvent
 

Protected Member Functions

GstFlowReturn process_buffer (std::shared_ptr< GstBuffer > buffer)
 
GstFlowReturn preroll_cb (std::shared_ptr< GstBuffer > buffer)
 
GstFlowReturn buffer_cb (std::shared_ptr< GstBuffer > buffer)
 
void eos_cb ()
 

Protected Attributes

ofPixels pixels
 
ofPixels backPixels
 
ofPixels eventPixels
 
- Protected Attributes inherited from ofGstUtils
ofGstAppSinkappsink
 
bool isStream
 
bool closing
 

Additional Inherited Members

- Static Public Member Functions inherited from ofGstUtils
static void startGstMainLoop ()
 
static GMainLoop * getGstMainLoop ()
 
static void quitGstMainLoop ()
 

Constructor & Destructor Documentation

◆ ofGstVideoUtils()

ofGstVideoUtils::ofGstVideoUtils ( )

◆ ~ofGstVideoUtils()

ofGstVideoUtils::~ofGstVideoUtils ( )
virtual

Member Function Documentation

◆ allocate()

bool ofGstVideoUtils::allocate ( int  w,
int  h,
ofPixelFormat  pixelFormat 
)

◆ buffer_cb()

GstFlowReturn ofGstVideoUtils::buffer_cb ( std::shared_ptr< GstBuffer buffer)
protectedvirtual

Reimplemented from ofGstUtils.

◆ close()

void ofGstVideoUtils::close ( )
virtual

Close the video source.

Implements ofBaseVideo.

◆ eos_cb()

void ofGstVideoUtils::eos_cb ( )
protectedvirtual

Reimplemented from ofGstUtils.

◆ getHeight()

float ofGstVideoUtils::getHeight ( ) const

◆ getPixelFormat()

ofPixelFormat ofGstVideoUtils::getPixelFormat ( ) const
virtual
Returns
the current ofPixelFormat.

Implements ofBaseVideo.

◆ getPixels() [1/2]

ofPixels & ofGstVideoUtils::getPixels ( )
virtual

Get a reference to the underlying ofPixels.

Returns
a reference the underlying ofPixels.

Implements ofBaseHasPixels_< unsigned char >.

◆ getPixels() [2/2]

const ofPixels & ofGstVideoUtils::getPixels ( ) const
virtual

Get a const reference to the underlying ofPixels.

Returns
a const reference the underlying ofPixels.

Implements ofBaseHasPixels_< unsigned char >.

◆ getTexture()

ofTexture * ofGstVideoUtils::getTexture ( )

◆ getWidth()

float ofGstVideoUtils::getWidth ( ) const

◆ isFrameNew()

bool ofGstVideoUtils::isFrameNew ( ) const
virtual
Returns
true if the pixel data was updated since the last call to update().

Implements ofBaseVideo.

◆ isInitialized()

bool ofGstVideoUtils::isInitialized ( ) const
virtual

Determine if the video source is initialized.

Video sources such as cameras are often initialized with a setup() method. Video sources such as movie players are often initialized with a load() method.

Returns
true if the video source is initialized.

Implements ofBaseVideo.

◆ preroll_cb()

GstFlowReturn ofGstVideoUtils::preroll_cb ( std::shared_ptr< GstBuffer buffer)
protectedvirtual

Reimplemented from ofGstUtils.

◆ process_buffer()

GstFlowReturn ofGstVideoUtils::process_buffer ( std::shared_ptr< GstBuffer buffer)
protected

◆ reallocateOnNextFrame()

void ofGstVideoUtils::reallocateOnNextFrame ( )

◆ setCopyPixels()

void ofGstVideoUtils::setCopyPixels ( bool  copy)

◆ setPipeline()

bool ofGstVideoUtils::setPipeline ( std::string  pipeline,
ofPixelFormat  pixelFormat = OF_PIXELS_RGB,
bool  isStream = false,
int  w = -1,
int  h = -1 
)

◆ setPixelFormat()

bool ofGstVideoUtils::setPixelFormat ( ofPixelFormat  pixelFormat)
virtual

Set the requested ofPixelFormat.

Parameters
pixelFormatthe requested ofPixelFormat.
Returns
true if the format was successfully changed.

Implements ofBaseVideo.

◆ update()

void ofGstVideoUtils::update ( )
virtual

Update the object's state.

Implements ofBaseUpdates.

Member Data Documentation

◆ backPixels

ofPixels ofGstVideoUtils::backPixels
protected

◆ bufferEvent

ofEvent<ofPixels> ofGstVideoUtils::bufferEvent

◆ eosEvent

ofEvent<ofEventArgs> ofGstVideoUtils::eosEvent

◆ eventPixels

ofPixels ofGstVideoUtils::eventPixels
protected

◆ pixels

ofPixels ofGstVideoUtils::pixels
protected

◆ prerollEvent

ofEvent<ofPixels> ofGstVideoUtils::prerollEvent

The documentation for this class was generated from the following files:
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/video/ofGstUtils.h
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/video/ofGstUtils.cpp