Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
16c94d64
Commit
16c94d64
authored
Jun 15, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #2053
parent
6e1ea0af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
cap_dshow.cpp
modules/highgui/src/cap_dshow.cpp
+13
-13
No files found.
modules/highgui/src/cap_dshow.cpp
View file @
16c94d64
...
@@ -445,12 +445,12 @@ class videoDevice{
...
@@ -445,12 +445,12 @@ class videoDevice{
int
nFramesForReconnect
;
int
nFramesForReconnect
;
unsigned
long
nFramesRunning
;
unsigned
long
nFramesRunning
;
int
connection
;
int
connection
;
int
storeConn
;
int
storeConn
;
int
myID
;
int
myID
;
long
requestedFrameTime
;
//ie fps
long
requestedFrameTime
;
//ie fps
char
nDeviceName
[
255
];
char
nDeviceName
[
255
];
WCHAR
wDeviceName
[
255
];
WCHAR
wDeviceName
[
255
];
unsigned
char
*
pixels
;
unsigned
char
*
pixels
;
char
*
pBuffer
;
char
*
pBuffer
;
...
@@ -643,7 +643,7 @@ public:
...
@@ -643,7 +643,7 @@ public:
bufferSetup
=
false
;
bufferSetup
=
false
;
newFrame
=
false
;
newFrame
=
false
;
latestBufferLength
=
0
;
latestBufferLength
=
0
;
hEvent
=
CreateEvent
(
NULL
,
true
,
false
,
NULL
);
hEvent
=
CreateEvent
(
NULL
,
true
,
false
,
NULL
);
}
}
...
@@ -655,7 +655,7 @@ public:
...
@@ -655,7 +655,7 @@ public:
DeleteCriticalSection
(
&
critSection
);
DeleteCriticalSection
(
&
critSection
);
CloseHandle
(
hEvent
);
CloseHandle
(
hEvent
);
if
(
bufferSetup
){
if
(
bufferSetup
){
delete
pixels
;
delete
[]
pixels
;
}
}
}
}
...
@@ -665,11 +665,11 @@ public:
...
@@ -665,11 +665,11 @@ public:
if
(
bufferSetup
){
if
(
bufferSetup
){
return
false
;
return
false
;
}
else
{
}
else
{
numBytes
=
numBytesIn
;
numBytes
=
numBytesIn
;
pixels
=
new
unsigned
char
[
numBytes
];
pixels
=
new
unsigned
char
[
numBytes
];
bufferSetup
=
true
;
bufferSetup
=
true
;
newFrame
=
false
;
newFrame
=
false
;
latestBufferLength
=
0
;
latestBufferLength
=
0
;
}
}
return
true
;
return
true
;
}
}
...
@@ -796,12 +796,12 @@ void videoDevice::setSize(int w, int h){
...
@@ -796,12 +796,12 @@ void videoDevice::setSize(int w, int h){
}
}
else
else
{
{
width
=
w
;
width
=
w
;
height
=
h
;
height
=
h
;
videoSize
=
w
*
h
*
3
;
videoSize
=
w
*
h
*
3
;
sizeSet
=
true
;
sizeSet
=
true
;
pixels
=
new
unsigned
char
[
videoSize
];
pixels
=
new
unsigned
char
[
videoSize
];
pBuffer
=
new
char
[
videoSize
];
pBuffer
=
new
char
[
videoSize
];
memset
(
pixels
,
0
,
videoSize
);
memset
(
pixels
,
0
,
videoSize
);
sgCallback
->
setupBuffer
(
videoSize
);
sgCallback
->
setupBuffer
(
videoSize
);
...
...
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