-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVideoView.qml
114 lines (67 loc) · 2.38 KB
/
VideoView.qml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import QtQuick 2.0
import QtMultimedia 5.5
import qmlvideofilter 1.0
Rectangle {
id: window
property alias frameFilter: filter
property alias roicanvas: roicanvas
property var chartControl: null
property var controlSpace: null
property var cameraSetting: null
property var cameraId
color: "transparent"
Component.onCompleted: {
chartControl.deleteSeries.connect( function( index ){
//console.log("VideoView receive delete signal from chartInfo, index is " + index )
roicanvas.removeRectangle( index )
filter.removeData( index )
})
controlSpace.resetROI.connect( function(){
roicanvas.clearData()
filter.clearData()
})
}
ROICanvas{
id: roicanvas
onRectsListSizeChanged: {
filter.updateFlag = 1
}
}
FrameFilter{
id:filter
property int updateFlag : 0 // 1 means has new thing to update, 0 means nothing to update
onUpdateFlagChanged: {
console.log("uddate flag change")
if( updateFlag == 1 ){
console.log("update list in frame filter")
//filter.updateAreaList( roicanvas.arealist.areaList )
//console.log("in update flag change, areaList size = " + roicanvas.arealist.areaList.count() )
//console.log( roicanvas.arealist.areaList )
rectList = roicanvas.rects
filter.listRectList()
updateFlag = 0
}
}
/*onFinished() is in main.qml*/
}
// Camera{
// id: camera
// //captureMode: Camera.CaptureVideo
// viewfinder.resolution: Qt.size( 640, 480 );
// property int resolutionWidth: viewfinder.resolution.width
// onResolutionWidthChanged: {
// /*Don't know why camera resolution will change and where it will change, thus modify it violently*/
// //console.log("camera1 resolution chagned to " + resolutionWidth )
// viewfinder.resolution = Qt.size( 640, 480 )
// }
// onDeviceIdChanged: {
// viewfinder.resolution = Qt.size( 640, 480 )
// console.log("deviceID change to " + deviceId )
// }
// }
// VideoOutput{
// anchors.fill: parent
// source: camera
// filters: [ filter ]
// }
}