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>

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 |
ofPixels & | getPixels () |
Get a reference to the underlying ofPixels. | |
const ofPixels & | getPixels () const |
Get a const reference to the underlying ofPixels. | |
ofTexture * | getTexture () |
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) |
![]() | |
virtual | ~ofBaseVideo () |
Destroy the ofBaseVideo. | |
![]() | |
virtual | ~ofBaseHasPixels_ () |
Destroy the ofAbstractHasPixels. | |
![]() | |
virtual | ~ofAbstractHasPixels () |
Destroy the ofAbstractHasPixels. | |
![]() | |
virtual | ~ofBaseUpdates () |
Destroy the ofBaseUpdates. | |
![]() | |
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 |
GstElement * | getPipeline () const |
GstElement * | getSink () const |
GstElement * | getGstElementByName (const std::string &name) const |
uint64_t | getMinLatencyNanos () const |
uint64_t | getMaxLatencyNanos () const |
void | setSinkListener (ofGstAppSink *appsink) |
Public Attributes | |
ofEvent< ofPixels > | prerollEvent |
ofEvent< ofPixels > | bufferEvent |
ofEvent< ofEventArgs > | eosEvent |
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 |
![]() | |
ofGstAppSink * | appsink |
bool | isStream |
bool | closing |
Additional Inherited Members | |
![]() | |
static void | startGstMainLoop () |
static GMainLoop * | getGstMainLoop () |
static void | quitGstMainLoop () |
Constructor & Destructor Documentation
◆ ofGstVideoUtils()
ofGstVideoUtils::ofGstVideoUtils | ( | ) |
◆ ~ofGstVideoUtils()
|
virtual |
Member Function Documentation
◆ allocate()
bool ofGstVideoUtils::allocate | ( | int | w, |
int | h, | ||
ofPixelFormat | pixelFormat | ||
) |
◆ buffer_cb()
|
protectedvirtual |
Reimplemented from ofGstUtils.
◆ close()
|
virtual |
Close the video source.
Implements ofBaseVideo.
◆ eos_cb()
|
protectedvirtual |
Reimplemented from ofGstUtils.
◆ getHeight()
float ofGstVideoUtils::getHeight | ( | ) | const |
◆ getPixelFormat()
|
virtual |
- Returns
- the current ofPixelFormat.
Implements ofBaseVideo.
◆ getPixels() [1/2]
|
virtual |
Get a reference to the underlying ofPixels.
- Returns
- a reference the underlying ofPixels.
Implements ofBaseHasPixels_< unsigned char >.
◆ getPixels() [2/2]
|
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()
|
virtual |
- Returns
- true if the pixel data was updated since the last call to update().
Implements ofBaseVideo.
◆ isInitialized()
|
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()
|
protectedvirtual |
Reimplemented from ofGstUtils.
◆ process_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()
|
virtual |
Set the requested ofPixelFormat.
- Parameters
-
pixelFormat the requested ofPixelFormat.
- Returns
- true if the format was successfully changed.
Implements ofBaseVideo.
◆ update()
|
virtual |
Update the object's state.
Implements ofBaseUpdates.
Member Data Documentation
◆ backPixels
|
protected |
◆ bufferEvent
◆ eosEvent
ofEvent<ofEventArgs> ofGstVideoUtils::eosEvent |
◆ eventPixels
|
protected |
◆ pixels
|
protected |
◆ 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