Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
755a618a
Commit
755a618a
authored
Dec 10, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More xtt camera control
parent
21b54ca4
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
920 additions
and
377 deletions
+920
-377
src/wbl/pwrb/src/pwrb_c_a_cameraptz.wb_load
src/wbl/pwrb/src/pwrb_c_a_cameraptz.wb_load
+3
-3
src/wbl/pwrb/src/pwrb_c_cameraposition.wb_load
src/wbl/pwrb/src/pwrb_c_cameraposition.wb_load
+95
-0
src/wbl/pwrb/src/pwrb_c_xttvideo.wb_load
src/wbl/pwrb/src/pwrb_c_xttvideo.wb_load
+1
-1
src/wbl/pwrb/src/pwrb_td_sevdatabaseenum.wb_load
src/wbl/pwrb/src/pwrb_td_sevdatabaseenum.wb_load
+10
-0
src/wbl/pwrb/src/pwrb_td_videooptionsmask.wb_load
src/wbl/pwrb/src/pwrb_td_videooptionsmask.wb_load
+18
-8
src/wbl/pwrs/src/pwrs_c_object.wb_load
src/wbl/pwrs/src/pwrs_c_object.wb_load
+7
-0
xtt/lib/xtt/gtk/xtt_multiview_gtk.cpp
xtt/lib/xtt/gtk/xtt_multiview_gtk.cpp
+4
-0
xtt/lib/xtt/gtk/xtt_stream_gtk.cpp
xtt/lib/xtt/gtk/xtt_stream_gtk.cpp
+375
-233
xtt/lib/xtt/gtk/xtt_stream_gtk.h
xtt/lib/xtt/gtk/xtt_stream_gtk.h
+4
-0
xtt/lib/xtt/src/xtt_c_object.cpp
xtt/lib/xtt/src/xtt_c_object.cpp
+145
-0
xtt/lib/xtt/src/xtt_stream.cpp
xtt/lib/xtt/src/xtt_stream.cpp
+211
-111
xtt/lib/xtt/src/xtt_stream.h
xtt/lib/xtt/src/xtt_stream.h
+16
-15
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+31
-6
xtt/mmi/xtt/src/xtt_get_pos.png
xtt/mmi/xtt/src/xtt_get_pos.png
+0
-0
No files found.
src/wbl/pwrb/src/pwrb_c_a_camerap
osition
.wb_load
→
src/wbl/pwrb/src/pwrb_c_a_camerap
tz
.wb_load
View file @
755a618a
...
...
@@ -33,7 +33,7 @@
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_a_camerap
osition.wb_load -- Defines the class CameraPosition
.
! pwrb_c_a_camerap
tz.wb_load -- Defines the class CameraPtz
.
!
SObject pwrb:Class
!/**
...
...
@@ -41,7 +41,7 @@ SObject pwrb:Class
! @Summary Data for camera position
! Data for camera position.
!*/
Object CameraP
osition
$ClassDef 655
Object CameraP
tz
$ClassDef 655
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
...
...
@@ -49,7 +49,7 @@ SObject pwrb:Class
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "CameraP
osition
"
Attr StructName = "CameraP
tz
"
EndBody
!/**
! Optional description.
...
...
src/wbl/pwrb/src/pwrb_c_cameraposition.wb_load
0 → 100644
View file @
755a618a
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_cameraposition.wb_load -- Defines the class CameraPosition.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Summary Data for camera position method in xtt.
! Data for camera position method in xtt.
!*/
Object CameraPosition $ClassDef 656
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
Attr PopEditor = 1
EndBody
Object RtBody $ObjBodyDef 1
Body SysBody
Attr StructName = "CameraPosition"
EndBody
!/**
! XttVideo object for the camera.
!*/
Object VideoObject $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$AttrRef"
EndBody
EndObject
!/**
! Pan value.
! Range 0 - 100.
!*/
Object Pan $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! Tilt value.
! Range 0 - 100.
!*/
Object Tilt $Attribute 3
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! Zoom value.
! Range 0 - 100.
!*/
Object Zoom $Attribute 4
Body SysBody
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
EndObject
EndObject
EndSObject
src/wbl/pwrb/src/pwrb_c_xttvideo.wb_load
View file @
755a618a
...
...
@@ -162,7 +162,7 @@ SObject pwrb:Class
!*/
Object PresetPosition $Attribute 14
Body SysBody
Attr TypeRef = "pwrb:Class-CameraP
osition
"
Attr TypeRef = "pwrb:Class-CameraP
tz
"
Attr Flags |= PWR_MASK_CLASS
Attr Flags |= PWR_MASK_ARRAY
Attr Elements = 10
...
...
src/wbl/pwrb/src/pwrb_td_sevdatabaseenum.wb_load
View file @
755a618a
...
...
@@ -66,6 +66,16 @@ SObject pwrb:Type
Attr Value = 1
EndBody
EndObject
!/**
! HDF5.
!*/
Object HDF5 $Value
Body SysBody
Attr PgmName = "HDF5"
Attr Text = "HDF5"
Attr Value = 2
EndBody
EndObject
EndObject
EndSObject
...
...
src/wbl/pwrb/src/pwrb_td_videooptionsmask.wb_load
View file @
755a618a
...
...
@@ -92,25 +92,35 @@ SObject pwrb:Type
EndBody
EndObject
!/**
! Display a c
ontrol panel with Play, Pause and Stop buttons
.
! Display a c
amera control panel
.
!*/
Object ControlPanel $Bit
Object C
ameraC
ontrolPanel $Bit
Body SysBody
Attr PgmName = "ControlPanel"
Attr Text = "ControlPanel"
Attr PgmName = "C
ameraC
ontrolPanel"
Attr Text = "C
ameraC
ontrolPanel"
Attr Value = 16
EndBody
EndObject
!/**
!
Add progress bar to control panel
.
!
Display a video control panel with Play, Pause and Stop buttons
.
!*/
Object
ProgressBar
$Bit
Object
VideoControlPanel
$Bit
Body SysBody
Attr PgmName = "
ProgressBar
"
Attr Text = "
ProgressBar
"
Attr PgmName = "
VideoControlPanel
"
Attr Text = "
VideoControlPanel
"
Attr Value = 32
EndBody
EndObject
!/**
! Add progress bar to control panel.
!*/
Object VideoProgressBar $Bit
Body SysBody
Attr PgmName = "VideoProgressBar"
Attr Text = "VideoProgressBar"
Attr Value = 64
EndBody
EndObject
EndObject
EndSObject
...
...
src/wbl/pwrs/src/pwrs_c_object.wb_load
View file @
755a618a
...
...
@@ -1034,6 +1034,13 @@ SObject pwrs:Class
Attr FilterName = "$Object-OpenFastFilter"
EndBody
EndObject
Object Camera $MenuButton
Body SysBody
Attr ButtonName = "Camera"
Attr MethodName = "$Object-Camera"
Attr FilterName = "$Object-CameraFilter"
EndBody
EndObject
Object HistEvent $MenuButton
Body SysBody
Attr ButtonName = "Event Log..."
...
...
xtt/lib/xtt/gtk/xtt_multiview_gtk.cpp
View file @
755a618a
...
...
@@ -854,6 +854,10 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx,
if
(
sevhist
[
i
])
sevhist
[
i
]
->
setup
();
}
for
(
int
i
=
0
;
i
<
MV_SIZE
;
i
++
)
{
if
(
strmctx
[
i
])
strmctx
[
i
]
->
setup
();
}
if
(
options
&
ge_mOptions_FullScreen
||
mv
.
Options
&
pwr_mMultiViewOptionsMask_FullScreen
)
gtk_window_fullscreen
(
GTK_WINDOW
(
toplevel
));
...
...
xtt/lib/xtt/gtk/xtt_stream_gtk.cpp
View file @
755a618a
This diff is collapsed.
Click to expand it.
xtt/lib/xtt/gtk/xtt_stream_gtk.h
View file @
755a618a
...
...
@@ -65,6 +65,7 @@ class XttStreamGtk : public XttStream {
int
scroll_cnt
;
int
popupmenu_x
;
int
popupmenu_y
;
int
ptz_box_displayed
;
GtkWidget
*
slider
;
/* Slider widget to keep track of current position */
GtkWidget
*
parent_wid
;
...
...
@@ -75,6 +76,7 @@ class XttStreamGtk : public XttStream {
GtkWidget
*
ptz_pan
;
GtkWidget
*
ptz_tilt
;
GtkWidget
*
ptz_zoom
;
GtkWidget
*
tools
;
void
*
overlay
;
...
...
@@ -87,6 +89,7 @@ class XttStreamGtk : public XttStream {
void
pop
();
void
set_size
(
int
width
,
int
height
);
void
setup
();
void
*
get_widget
()
{
return
main_box
;}
void
create_popup_menu
(
int
x
,
int
y
);
...
...
@@ -108,6 +111,7 @@ class XttStreamGtk : public XttStream {
static
void
eos_cb
(
GstBus
*
bus
,
GstMessage
*
msg
,
void
*
data
);
static
void
state_changed_cb
(
GstBus
*
bus
,
GstMessage
*
msg
,
void
*
data
);
static
void
application_cb
(
GstBus
*
bus
,
GstMessage
*
msg
,
void
*
data
);
static
void
resize_cb
(
GtkWidget
*
w
,
GtkAllocation
*
allocation
,
gpointer
data
);
static
gboolean
mousebutton_cb
(
GtkWidget
*
widget
,
GdkEvent
*
event
,
void
*
data
);
static
void
menu_position_func
(
GtkMenu
*
menu
,
gint
*
x
,
gint
*
y
,
gboolean
*
push_in
,
gpointer
data
);
...
...
xtt/lib/xtt/src/xtt_c_object.cpp
View file @
755a618a
...
...
@@ -474,6 +474,149 @@ static pwr_tStatus OpenTrendFilter( xmenu_sMenuCall *ip)
return
XNAV__INVISIBLE
;
}
//
// Camera
//
static
pwr_tStatus
Camera
(
xmenu_sMenuCall
*
ip
)
{
pwr_tAName
name
;
char
cmd
[
800
];
int
sts
;
pwr_tObjid
child
;
pwr_tClassId
classid
;
int
found
;
pwr_sAttrRef
defcamera
;
pwr_sAttrRef
*
objar
;
if
(
!
ip
->
ItemList
||
cdh_ObjidIsNull
(
ip
->
ItemList
[
ip
->
ChosenItem
].
CurrentObject
.
Objid
))
objar
=
&
ip
->
Pointed
;
else
objar
=
&
ip
->
ItemList
[
ip
->
ChosenItem
].
CurrentObject
;
sts
=
gdh_GetAttrRefTid
(
objar
,
&
classid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
classid
==
pwr_cClass_CameraPosition
)
{
sts
=
gdh_AttrrefToName
(
&
ip
->
Pointed
,
name
,
sizeof
(
name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
sts
;
// Open video
sprintf
(
cmd
,
"open video /cameraposition=%s"
,
name
);
((
XNav
*
)
ip
->
EditorContext
)
->
command
(
cmd
);
return
1
;
}
// Look for attribute Camera
sts
=
gdh_AttrrefToName
(
objar
,
name
,
sizeof
(
name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
sts
;
strcat
(
name
,
".DefCamera"
);
sts
=
gdh_GetObjectInfo
(
name
,
(
void
*
)
&
defcamera
,
sizeof
(
defcamera
));
if
(
ODD
(
sts
)
&&
cdh_ObjidIsNotNull
(
defcamera
.
Objid
))
{
// Default camera found
sts
=
gdh_GetAttrRefTid
(
&
defcamera
,
&
classid
);
if
(
ODD
(
sts
)
&&
classid
==
pwr_cClass_CameraPosition
)
{
sts
=
gdh_AttrrefToName
(
&
defcamera
,
name
,
sizeof
(
name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
sts
;
// Open video
sprintf
(
cmd
,
"open video /cameraposition=%s"
,
name
);
((
XNav
*
)
ip
->
EditorContext
)
->
command
(
cmd
);
return
1
;
}
}
// Look for camera as child
if
(
!
ip
->
Pointed
.
Flags
.
b
.
Object
)
return
0
;
found
=
0
;
sts
=
gdh_GetChild
(
objar
->
Objid
,
&
child
);
while
(
ODD
(
sts
))
{
sts
=
gdh_GetObjectClass
(
child
,
&
classid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
classid
==
pwr_cClass_CameraPosition
)
{
found
=
1
;
break
;
}
sts
=
gdh_GetNextSibling
(
child
,
&
child
);
}
if
(
!
found
)
return
1
;
sts
=
gdh_ObjidToName
(
child
,
name
,
sizeof
(
name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
sts
;
// Open video
sprintf
(
cmd
,
"open video /cameraposition=%s"
,
name
);
((
XNav
*
)
ip
->
EditorContext
)
->
command
(
cmd
);
return
1
;
}
// Camera filter
static
pwr_tStatus
CameraFilter
(
xmenu_sMenuCall
*
ip
)
{
int
sts
;
pwr_tObjid
child
;
pwr_tClassId
classid
,
cid
;
pwr_sAttrRef
defcamera
;
pwr_tAName
name
;
pwr_sAttrRef
*
objar
;
if
(
!
ip
->
ItemList
||
cdh_ObjidIsNull
(
ip
->
ItemList
[
ip
->
ChosenItem
].
CurrentObject
.
Objid
))
objar
=
&
ip
->
Pointed
;
else
objar
=
&
ip
->
ItemList
[
ip
->
ChosenItem
].
CurrentObject
;
sts
=
gdh_GetAttrRefTid
(
objar
,
&
cid
);
if
(
EVEN
(
sts
))
return
sts
;
switch
(
cid
)
{
case
pwr_cClass_CameraPosition
:
return
XNAV__SUCCESS
;
}
// Check if attribute DefCamera exist
sts
=
gdh_AttrrefToName
(
objar
,
name
,
sizeof
(
name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
sts
;
strcat
(
name
,
".DefCamera"
);
sts
=
gdh_GetObjectInfo
(
name
,
(
void
*
)
&
defcamera
,
sizeof
(
defcamera
));
if
(
ODD
(
sts
)
&&
cdh_ObjidIsNotNull
(
defcamera
.
Objid
))
{
// Default Camera found
sts
=
gdh_GetAttrRefTid
(
&
defcamera
,
&
classid
);
if
(
ODD
(
sts
)
&&
classid
==
pwr_cClass_CameraPosition
)
return
XNAV__SUCCESS
;
}
// Check if object has a CameraPosition as child
if
(
cid
==
pwr_eClass_PlantHier
)
return
XNAV__INVISIBLE
;
if
(
!
objar
->
Flags
.
b
.
Object
)
return
XNAV__INVISIBLE
;
sts
=
gdh_GetChild
(
objar
->
Objid
,
&
child
);
while
(
ODD
(
sts
))
{
sts
=
gdh_GetObjectClass
(
child
,
&
classid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
classid
==
pwr_cClass_CameraPosition
)
return
XNAV__SUCCESS
;
sts
=
gdh_GetNextSibling
(
child
,
&
child
);
}
return
XNAV__INVISIBLE
;
}
//
// Open History
//
...
...
@@ -2102,6 +2245,8 @@ pwr_dExport pwr_BindXttMethods($Object) = {
pwr_BindXttMethod
(
OpenTraceFilter
),
pwr_BindXttMethod
(
OpenTrend
),
pwr_BindXttMethod
(
OpenTrendFilter
),
pwr_BindXttMethod
(
Camera
),
pwr_BindXttMethod
(
CameraFilter
),
pwr_BindXttMethod
(
OpenHistory
),
pwr_BindXttMethod
(
OpenHistoryFilter
),
pwr_BindXttMethod
(
OpenFast
),
...
...
xtt/lib/xtt/src/xtt_stream.cpp
View file @
755a618a
This diff is collapsed.
Click to expand it.
xtt/lib/xtt/src/xtt_stream.h
View file @
755a618a
...
...
@@ -56,6 +56,9 @@ class XttCameraControl {
virtual
void
tilt_relative
(
double
value
)
{}
virtual
void
tilt_absolute
(
double
value
)
{}
virtual
void
pan_tilt_zoom_absolute
(
double
pan
,
double
tilt
,
double
zoom
)
{}
virtual
void
center
(
int
x
,
int
y
,
int
width
,
int
height
,
int
stream_width
,
int
stream_height
)
{}
virtual
void
area_zoom
(
int
x
,
int
y
,
int
width
,
int
height
,
int
window_width
,
int
window_height
,
int
stream_width
,
int
stream_height
)
{}
virtual
int
get_position
(
double
*
pan
,
double
*
tilt
,
double
*
zoom
)
{
return
0
;}
};
...
...
@@ -70,6 +73,9 @@ class XttCameraControlVapix : public XttCameraControl {
void
tilt_relative
(
double
value
);
void
tilt_absolute
(
double
value
);
void
pan_tilt_zoom_absolute
(
double
pan
,
double
tilt
,
double
zoom
);
void
center
(
int
x
,
int
y
,
int
width
,
int
height
,
int
stream_width
,
int
stream_height
);
void
area_zoom
(
int
x
,
int
y
,
int
width
,
int
height
,
int
window_width
,
int
window_height
,
int
stream_width
,
int
stream_height
);
int
get_position
(
double
*
pan
,
double
*
tilt
,
double
*
zoom
);
};
...
...
@@ -83,32 +89,26 @@ class XttStream {
CoWowTimer
*
scroll_timerid
;
CoWow
*
wow
;
int
scan_time
;
int
x_offset
;
int
y_offset
;
int
width
;
int
height
;
int
stream_width
;
int
stream_height
;
double
stream_ratio
;
void
(
*
close_cb
)(
void
*
,
XttStream
*
);
XttCameraControl
*
camera_control
;
pwr_tAttrRef
aref
;
pwr_tEnum
control_protocol
;
pwr_tAttrRef
aref
;
XttStream
(
void
*
st_parent_ctx
,
const
char
*
name
,
const
char
*
st_uri
,
int
st_width
,
int
st_height
,
int
x
,
int
y
,
double
st_scan_time
,
unsigned
int
st_options
,
int
st_embedded
,
pwr_tAttrRef
*
st_arp
)
:
parent_ctx
(
st_parent_ctx
),
options
(
st_options
),
embedded
(
st_embedded
),
timerid
(
0
),
scroll_timerid
(
0
),
width
(
st_width
),
height
(
st_height
),
close_cb
(
0
)
{
strncpy
(
uri
,
st_uri
,
sizeof
(
uri
));
if
(
st_scan_time
<
0.02
)
scan_time
=
1000
;
else
scan_time
=
1000
*
st_scan_time
;
camera_control
=
new
XttCameraControlVapix
(
uri
);
if
(
st_arp
)
aref
=
*
st_arp
;
else
memset
(
&
aref
,
0
,
sizeof
(
aref
));
}
double
st_scan_time
,
unsigned
int
st_options
,
int
st_embedded
,
pwr_tAttrRef
*
st_arp
);
virtual
~
XttStream
()
{
delete
camera_control
;
}
void
position
(
double
pan
,
double
tilt
,
double
zoom
);
void
action_click
(
int
x
,
int
y
);
void
action_mb2click
(
int
x
,
int
y
);
void
action_mb3click
(
int
x
,
int
y
);
...
...
@@ -119,6 +119,7 @@ class XttStream {
virtual
void
pop
()
{}
virtual
void
set_size
(
int
width
,
int
height
)
{}
virtual
void
setup
()
{}
virtual
void
*
get_widget
()
{
return
0
;}
virtual
void
create_popup_menu
(
int
x
,
int
y
)
{}
};
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
755a618a
...
...
@@ -278,7 +278,9 @@ dcli_tCmdTable xnav_command_table[] = {
"/PINSTANCE"
,
"/BYPASS"
,
"/CLOSEBUTTON"
,
"/TARGET"
,
"/TRIGGER"
,
"/TYPE"
,
"/FTYPE"
,
"/FULLSCREEN"
,
"/MAXIMIZE"
,
"/FULLMAXIMIZE"
,
"/ICONIFY"
,
"/HIDE"
,
"/XPOSITION"
,
"/YPOSITION"
,
"/X0"
,
"/Y0"
,
"/X1"
,
"/Y1"
,
"/URL"
,
"/CONTINOUS"
,
""
}
"/XPOSITION"
,
"/YPOSITION"
,
"/X0"
,
"/Y0"
,
"/X1"
,
"/Y1"
,
"/URL"
,
"/CONTINOUS"
,
"/CAMERAPOSITION"
,
"/CAMERACONTROLPANEL"
,
"/VIDEOCONTROLPANEL"
,
"/VIDEOPROGRESSBAR"
,
""
}
},
{
"CLOSE"
,
...
...
@@ -3537,10 +3539,29 @@ static int xnav_open_func( void *client_data,
pwr_tStatus
sts
;
pwr_tURL
url_str
;
pwr_tAName
object_str
;
pwr_tAName
camerapos_str
;
int
camerapos_found
=
0
;
pwr_sClass_CameraPosition
pos
;
// Command is "OPEN VIDEO"
if
(
ODD
(
dcli_get_qualifier
(
"/OBJECT"
,
object_str
,
sizeof
(
object_str
))))
{
if
(
ODD
(
dcli_get_qualifier
(
"/CAMERAPOSITION"
,
camerapos_str
,
sizeof
(
camerapos_str
))))
{
// CameraPosition object supplied
sts
=
gdh_GetObjectInfo
(
camerapos_str
,
&
pos
,
sizeof
(
pos
));
if
(
EVEN
(
sts
))
{
xnav
->
message
(
'E'
,
"Object not found"
);
return
XNAV__HOLDCOMMAND
;
}
sts
=
gdh_AttrrefToName
(
&
pos
.
VideoObject
,
object_str
,
sizeof
(
object_str
),
cdh_mNName
);
if
(
EVEN
(
sts
))
{
xnav
->
message
(
'E'
,
"Configuration error, video object not found"
);
return
XNAV__HOLDCOMMAND
;
}
camerapos_found
=
1
;
}
if
(
camerapos_found
||
ODD
(
dcli_get_qualifier
(
"/OBJECT"
,
object_str
,
sizeof
(
object_str
))))
{
// XttVideo object supplied, fetch data from object
pwr_tOName
xttvideo_name
;
pwr_sClass_XttVideo
xttvideo
;
...
...
@@ -3590,6 +3611,8 @@ static int xnav_open_func( void *client_data,
xnav
->
appl
.
insert
(
applist_eType_Stream
,
(
void
*
)
strmctx
,
objid
,
name_str
,
url_str
);
}
if
(
camerapos_found
)
strmctx
->
position
(
pos
.
Pan
,
pos
.
Tilt
,
pos
.
Zoom
);
}
else
{
/* Get the name qualifier */
...
...
@@ -3609,10 +3632,12 @@ static int xnav_open_func( void *client_data,
options
|=
pwr_mVideoOptionsMask_FullMaximize
;
if
(
ODD
(
dcli_get_qualifier
(
"/ICONIFY"
,
0
,
0
)))
options
|=
pwr_mVideoOptionsMask_Iconify
;
if
(
ODD
(
dcli_get_qualifier
(
"/CONTROLPANEL"
,
0
,
0
)))
options
|=
pwr_mVideoOptionsMask_ControlPanel
;
if
(
ODD
(
dcli_get_qualifier
(
"/PROGRESSBAR"
,
0
,
0
)))
options
|=
pwr_mVideoOptionsMask_ProgressBar
;
if
(
ODD
(
dcli_get_qualifier
(
"/CAMERACONTROLPANEL"
,
0
,
0
)))
options
|=
pwr_mVideoOptionsMask_CameraControlPanel
;
if
(
ODD
(
dcli_get_qualifier
(
"/VIDEOCONTROLPANEL"
,
0
,
0
)))
options
|=
pwr_mVideoOptionsMask_VideoControlPanel
;
if
(
ODD
(
dcli_get_qualifier
(
"/VIDEOPROGRESSBAR"
,
0
,
0
)))
options
|=
pwr_mVideoOptionsMask_VideoProgressBar
;
if
(
ODD
(
dcli_get_qualifier
(
"/WIDTH"
,
tmp_str
,
sizeof
(
tmp_str
))))
{
nr
=
sscanf
(
tmp_str
,
"%d"
,
&
width
);
...
...
xtt/mmi/xtt/src/xtt_get_pos.png
View replaced file @
21b54ca4
View file @
755a618a
910 Bytes
|
W:
|
H:
908 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment