-
Notifications
You must be signed in to change notification settings - Fork 0
/
camera_rtsp_gstreamer.orogen
68 lines (54 loc) · 2.2 KB
/
camera_rtsp_gstreamer.orogen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name "camera_rtsp_gstreamer"
using_library 'base-logging', typekit: false
using_library 'gstreamer-video-1.0', typekit: false
using_library 'gstreamer-app-1.0', typekit: false
import_types_from 'base'
import_types_from "camera_rtsp_gstreamerTypes.hpp"
using_library "camera_onvif"
import_types_from "camera_onvif/CameraOnvif.hpp"
OroGen::Spec::Deployment.register_global_initializer(:gstreamer)
if defined?(OroGen::Gen::RTT_CPP::Deployment)
OroGen::Gen::RTT_CPP::Deployment.register_global_initializer(
:gstreamer,
deployment_cmake: <<~GST_DEPLOYMENT_CMAKE,
orogen_pkg_check_modules(gstreamer_app_1_0 REQUIRED gstreamer-app-1.0)
include_directories(${gstreamer_app_1_0_INCLUDE_DIRS})
add_definitions(${gstreamer_app_1_0_CFLAGS_OTHER})
link_directories(${gstreamer_app_1_0_LIBRARY_DIRS})
target_link_libraries(<%= deployer.name %> ${gstreamer_app_1_0_LIBRARIES})
GST_DEPLOYMENT_CMAKE
global_scope: <<~GST_TOPLEVEL,
#include <gst/gst.h>
GST_TOPLEVEL
init: <<~GST_INIT,
gst_init(&argc, &argv);
GST_INIT
exit: <<~GST_EXIT
gst_deinit();
GST_EXIT
)
end
# Declare a new task context (i.e., a component)
#
# The corresponding C++ class can be edited in tasks/Task.hpp and
# tasks/Task.cpp, and will be put in the camera_rtsp_gstreamer namespace.
task_context 'ReceiverTask' do
needs_configuration
needs_global_initializer :gstreamer
# The imaging options are percentage 0-1.
property 'contrast', 'float', 0.5
property 'brightness', 'float', 0.5
property 'color_saturation', 'float', 0.5
# The resolution options (width, height) are: (1920, 1080) - (1280, 960) - (1280, 720)
property 'width', 'int', 1280
property 'height', 'int', 720
property 'ip', '/std/string'
property 'pass', '/std/string'
property 'user', '/std/string'
# The images to stream
output_port 'images', ro_ptr('/base/samples/frame/Frame')
# Parameters to set through ONVIF (brightness, contrast and color saturation)
input_port 'image_param', 'camera_onvif::ImageParam'
exception_states 'GSTREAMER_ERROR'
port_driven 'image_param'
end