reference

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

ofGstVideoGrabber.h
Go to the documentation of this file.
1#pragma once
2
3#include "ofGstUtils.h"
4
5
10
12 std::string mimetype;
13 std::string format_name;
14 int width;
15 int height;
16 std::vector<ofGstFramerate> framerates;
18};
19
21 std::string video_device;
22 std::string gstreamer_src;
23 std::string product_name;
24 std::string serial_id;
25 std::vector<ofGstVideoFormat> video_formats;
27};
28
30 std::vector<ofGstDevice> webcam_devices;
31 bool bInited;
32};
33
35public:
38
40 bool setPixelFormat(ofPixelFormat pixelFormat);
42
43 void videoSettings(){};//TODO: what is this??
44
45 std::vector<ofVideoDevice> listDevices() const;
46 void setDeviceID(int id);
47 void setDesiredFrameRate(int framerate);
48 bool setup(int w, int h);
49
50 void update();
51 bool isFrameNew() const;
52
54 const ofPixels & getPixels() const;
56
57 float getHeight() const;
58 float getWidth() const;
59 void close();
60
61 void setVerbose(bool bVerbose);
62 bool isInitialized() const;
63
65private:
66 ofGstVideoFormat& selectFormat(int w, int h, int desired_framerate, ofPixelFormat desiredPixelFormat);
67
68 mutable ofGstCamData camData;
69 bool bIsCamera;
70 int attemptFramerate;
71 int deviceID;
72 ofPixelFormat internalPixelFormat;
73 ofGstVideoUtils videoUtils;
74};
A base class representing a video device such as a camera.
Definition ofVideoBaseTypes.h:110
Definition ofGstVideoGrabber.h:34
void setDesiredFrameRate(int framerate)
Set the video grabber's desired frame rate.
Definition ofGstVideoGrabber.cpp:820
bool isFrameNew() const
Definition ofGstVideoGrabber.cpp:833
void update()
Update the object's state.
Definition ofGstVideoGrabber.cpp:829
void setDeviceID(int id)
Set the video grabber's device ID.
Definition ofGstVideoGrabber.cpp:678
bool setPixelFormat(ofPixelFormat pixelFormat)
needs to be called before initGrabber
Definition ofGstVideoGrabber.cpp:611
ofPixels & getPixels()
Get a reference to the underlying ofPixels.
Definition ofGstVideoGrabber.cpp:838
float getHeight() const
Get the video grabber's height.
Definition ofGstVideoGrabber.cpp:850
ofGstVideoGrabber()
Definition ofGstVideoGrabber.cpp:598
bool isInitialized() const
Determine if the video source is initialized.
Definition ofGstVideoGrabber.cpp:629
float getWidth() const
Get the video grabber's width.
Definition ofGstVideoGrabber.cpp:854
bool setup(int w, int h)
Set up the grabber with the requested width and height.
Definition ofGstVideoGrabber.cpp:708
std::vector< ofVideoDevice > listDevices() const
Get a list of available video grabber devices.
Definition ofGstVideoGrabber.cpp:649
void close()
Close the video source.
Definition ofGstVideoGrabber.cpp:858
void videoSettings()
Request a native GUI for video grabber settings.
Definition ofGstVideoGrabber.h:43
ofTexture * getTexturePtr()
Get the video grabber's internal ofTexture pointer if available.
Definition ofGstVideoGrabber.cpp:846
~ofGstVideoGrabber()
Definition ofGstVideoGrabber.cpp:607
void setVerbose(bool bVerbose)
Set the video grabber's hardware verbosity level.
Definition ofGstVideoGrabber.cpp:624
ofPixelFormat getPixelFormat() const
Definition ofGstVideoGrabber.cpp:616
ofGstVideoUtils * getGstVideoUtils()
Definition ofGstVideoGrabber.cpp:824
Definition ofGstUtils.h:156
A wrapper class for an OpenGL texture.
Definition ofTexture.h:253
ofPixelFormat
Used to represent the available pixel formats.
Definition ofPixels.h:68
Definition ofGstVideoGrabber.h:29
bool bInited
Definition ofGstVideoGrabber.h:31
std::vector< ofGstDevice > webcam_devices
Definition ofGstVideoGrabber.h:30
Definition ofGstVideoGrabber.h:20
std::string video_device
Definition ofGstVideoGrabber.h:21
std::string gstreamer_src
Definition ofGstVideoGrabber.h:22
std::string product_name
Definition ofGstVideoGrabber.h:23
std::vector< ofGstVideoFormat > video_formats
Definition ofGstVideoGrabber.h:25
int current_format
Definition ofGstVideoGrabber.h:26
std::string serial_id
Definition ofGstVideoGrabber.h:24
Definition ofGstVideoGrabber.h:6
int denominator
Definition ofGstVideoGrabber.h:8
int numerator
Definition ofGstVideoGrabber.h:7
Definition ofGstVideoGrabber.h:11
ofGstFramerate choosen_framerate
Definition ofGstVideoGrabber.h:17
std::string format_name
Definition ofGstVideoGrabber.h:13
int width
Definition ofGstVideoGrabber.h:14
int height
Definition ofGstVideoGrabber.h:15
std::string mimetype
Definition ofGstVideoGrabber.h:12
std::vector< ofGstFramerate > framerates
Definition ofGstVideoGrabber.h:16