Commit 681d109e authored by Claes Sjofors's avatar Claes Sjofors

Xtt stream bugfix for camera control not used

parent a753db72
......@@ -1298,6 +1298,9 @@ void XttStreamGtk::activate_zoomreset( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->zoom_absolute( 0);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1309,6 +1312,9 @@ void XttStreamGtk::activate_zoomin( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->zoom_relative( 5);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1320,6 +1326,9 @@ void XttStreamGtk::activate_zoomout( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->zoom_relative( -5);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1331,6 +1340,9 @@ void XttStreamGtk::activate_scroll_left( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->pan_relative( -3);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1342,6 +1354,9 @@ void XttStreamGtk::activate_scroll_right( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->pan_relative( 3);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1353,6 +1368,9 @@ void XttStreamGtk::activate_page_left( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->pan_relative( -15);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1364,6 +1382,9 @@ void XttStreamGtk::activate_page_right( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->pan_relative( 15);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1375,6 +1396,9 @@ void XttStreamGtk::activate_scroll_down( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->tilt_relative( -3);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1386,6 +1410,9 @@ void XttStreamGtk::activate_scroll_up( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->tilt_relative( 3);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1397,6 +1424,9 @@ void XttStreamGtk::activate_page_down( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->tilt_relative( -15);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1408,6 +1438,9 @@ void XttStreamGtk::activate_page_up( GtkWidget *w, gpointer data)
{
XttStreamGtk *strm = (XttStreamGtk *)data;
if ( !strm->camera_control)
return;
strm->camera_control->tilt_relative( 15);
if ( strm->ptz_box_displayed) {
g_object_set( strm->ptz_box, "visible", FALSE, NULL);
......@@ -1642,6 +1675,9 @@ void XttStreamGtk::activate_get_position( GtkWidget *w, gpointer data)
int sts;
char pan_str[20], tilt_str[20], zoom_str[20];
if ( !strm->camera_control)
return;
sts = strm->camera_control->get_position( &pan, &tilt, &zoom);
if ( EVEN(sts)) return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment