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
b197ec94
Commit
b197ec94
authored
Nov 20, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Nov 20, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1761 from bhuroc:qtkit-video-file-2.4
parents
e69d2c1b
c88fa27b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
cap_qtkit.mm
modules/highgui/src/cap_qtkit.mm
+9
-1
No files found.
modules/highgui/src/cap_qtkit.mm
View file @
b197ec94
...
@@ -179,6 +179,7 @@ private:
...
@@ -179,6 +179,7 @@ private:
int changedPos;
int changedPos;
int started;
int started;
QTTime endOfMovie;
};
};
...
@@ -673,6 +674,8 @@ CvCaptureFile::CvCaptureFile(const char* filename) {
...
@@ -673,6 +674,8 @@ CvCaptureFile::CvCaptureFile(const char* filename) {
return;
return;
}
}
[mCaptureSession gotoEnd];
endOfMovie = [mCaptureSession currentTime];
[mCaptureSession gotoBeginning];
[mCaptureSession gotoBeginning];
...
@@ -709,6 +712,11 @@ int CvCaptureFile::didStart() {
...
@@ -709,6 +712,11 @@ int CvCaptureFile::didStart() {
bool CvCaptureFile::grabFrame() {
bool CvCaptureFile::grabFrame() {
NSAutoreleasePool* localpool = [[NSAutoreleasePool alloc] init];
NSAutoreleasePool* localpool = [[NSAutoreleasePool alloc] init];
double t1 = getProperty(CV_CAP_PROP_POS_MSEC);
double t1 = getProperty(CV_CAP_PROP_POS_MSEC);
QTTime curTime;
curTime = [mCaptureSession currentTime];
bool isEnd=(QTTimeCompare(curTime,endOfMovie) == NSOrderedSame);
[mCaptureSession stepForward];
[mCaptureSession stepForward];
double t2 = getProperty(CV_CAP_PROP_POS_MSEC);
double t2 = getProperty(CV_CAP_PROP_POS_MSEC);
if (t2>t1 && !changedPos) {
if (t2>t1 && !changedPos) {
...
@@ -718,7 +726,7 @@ bool CvCaptureFile::grabFrame() {
...
@@ -718,7 +726,7 @@ bool CvCaptureFile::grabFrame() {
}
}
changedPos = 0;
changedPos = 0;
[localpool drain];
[localpool drain];
return
1
;
return
!isEnd
;
}
}
...
...
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