A Gazebo plugin that can be attached to a camera and then streams the video data using gstreamer. It streams to a configurable UDP port, default is 5600. More...
#include <gazebo_gst_camera_plugin.h>

Public Member Functions | |
| void | gstCallback (GstElement *appsrc) |
| GstCameraPlugin () | |
| virtual void | Load (sensors::SensorPtr sensor, sdf::ElementPtr sdf) |
| virtual void | OnNewFrame (const unsigned char *image, unsigned int width, unsigned int height, unsigned int depth, const std::string &format) |
| void | startGstThread () |
| virtual | ~GstCameraPlugin () |
Protected Attributes | |
| rendering::CameraPtr | camera |
| unsigned int | depth |
| std::string | format |
| unsigned int | height |
| sensors::CameraSensorPtr | parentSensor |
| float | rate |
| int | udpPort |
| unsigned int | width |
Private Attributes | |
| GstBuffer * | frameBuffer |
| std::mutex | frameBufferMutex |
| GstClockTime | gstTimestamp |
| GMainLoop * | mainLoop |
| std::string | namespace_ |
| event::ConnectionPtr | newFrameConnection |
| transport::NodePtr | node_handle_ |
| const std::string | topicName = "gst_video" |
A Gazebo plugin that can be attached to a camera and then streams the video data using gstreamer. It streams to a configurable UDP port, default is 5600.
Connect to the stream via command line with: gst-launch-1.0 -v udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' \ ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink fps-update-interval=1000 sync=false
Definition at line 44 of file gazebo_gst_camera_plugin.h.
| GstCameraPlugin::GstCameraPlugin | ( | ) |
Definition at line 161 of file gazebo_gst_camera_plugin.cpp.
|
virtual |
Definition at line 168 of file gazebo_gst_camera_plugin.cpp.
| void GstCameraPlugin::gstCallback | ( | GstElement * | appsrc | ) |
Definition at line 43 of file gazebo_gst_camera_plugin.cpp.
|
virtual |
Definition at line 183 of file gazebo_gst_camera_plugin.cpp.
|
virtual |
Definition at line 246 of file gazebo_gst_camera_plugin.cpp.
| void GstCameraPlugin::startGstThread | ( | ) |
Definition at line 76 of file gazebo_gst_camera_plugin.cpp.
|
protected |
Definition at line 66 of file gazebo_gst_camera_plugin.h.
|
protected |
Definition at line 59 of file gazebo_gst_camera_plugin.h.
|
protected |
Definition at line 61 of file gazebo_gst_camera_plugin.h.
|
private |
Definition at line 74 of file gazebo_gst_camera_plugin.h.
|
private |
Definition at line 75 of file gazebo_gst_camera_plugin.h.
|
private |
Definition at line 77 of file gazebo_gst_camera_plugin.h.
|
protected |
Definition at line 59 of file gazebo_gst_camera_plugin.h.
|
private |
Definition at line 76 of file gazebo_gst_camera_plugin.h.
|
private |
Definition at line 71 of file gazebo_gst_camera_plugin.h.
|
private |
Definition at line 68 of file gazebo_gst_camera_plugin.h.
|
private |
Definition at line 70 of file gazebo_gst_camera_plugin.h.
|
protected |
Definition at line 65 of file gazebo_gst_camera_plugin.h.
|
protected |
Definition at line 60 of file gazebo_gst_camera_plugin.h.
|
private |
Definition at line 72 of file gazebo_gst_camera_plugin.h.
|
protected |
Definition at line 63 of file gazebo_gst_camera_plugin.h.
|
protected |
Definition at line 59 of file gazebo_gst_camera_plugin.h.