LEADTOOLS Support
Multimedia
Multimedia SDK Questions
Delay occurs when making a call to StartCapture function
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, July 27, 2005 8:13:56 AM(UTC)
Groups: Registered
Posts: 2
Hi there
I am having a development issue with capturing video using Leadtools Capture control v13 and Creative WebCam Live! Ultra.
The issue is when I set the TargetFile property followed by a call to the StartCapture function to capture video, the control seems to be taking a long time (around 6-10 secs) to kick in and start capturing. I previously used Creative WebCam NX Pro and WebCam NX Ultra for a long time and this had never happened.
Could this be an issue with the camera? And how can I resolve this?
I appreciate any feedback.
Regards
Mohammad
#2
Posted
:
Thursday, July 28, 2005 4:16:44 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
The initialization
takes some time. Try using ReadyCapture before StartCapture. This is an
optional function that performs any time consuming initialization,
allowing immediate execution with StartCapture.
Good Luck,
Feras.
#3
Posted
:
Friday, July 29, 2005 3:57:46 AM(UTC)
Groups: Registered
Posts: 2
Feras
Thanks to your reply. I have already tried ReadyCapture before calling StartCapture but it didn't help and the delay still occurs. I don't know if I'm doing something wrong in the code or not. This is my initialisation part (In VB):
With ltmmCapture
.ScaleTop = 0
.ScaleLeft = 0
.ScaleWidth = 0
.ScaleHeight = 0
.AutoSize = False
.ScaleMode = ltmmPixels
.VideoWindowSizeMode = ltmmStretch
.PreviewSource = ltmmCapture_Preview_Video
.VideoDevices.Selection = 0
.AudioDevices.Selection = 0
.VideoCompressors.Selection = -1
.AudioCompressors.Selection = -1
.VideoCaptureSizes.Selection = ltmmCapture.VideoCaptureSizes.Find(320, 240)
If (.UseFrameRate) Then
.FrameRate = 30
End If
.ResetTarget
.TargetType = ltmmCapture_Target_File
.TargetFormat = ltmmCapture_TargetFormat_Avi
.Preview = True
And this is when I start capturing when the user clicks the Capture button:
ltmmCapture.TargetFile = "D:\temp\TestVideo.avi"
ltmmCapture.ReadyCapture (ltmmCapture_Mode_AutoFramesAndAudio)
ltmmCapture.StartCapture (ltmmCapture_Mode_AutoFramesAndAudio)
I tried this code with and without the call to ReadyCapture and it did not make any difference.
I appreciate any help you can offer.
Regards
Mohammad
#4
Posted
:
Tuesday, August 2, 2005 5:42:37 AM(UTC)
Groups: Registered
Posts: 9
There is no advantage in calling ReadyCapture right before StartCapture. There will be a delay in preparing the capture device after you selected the device and the output filename. To minimize this, applications are typically doing something like this:
* select the device and the output filename
* call ReadyCapture (this will take some time, depending on the device)
* bring up a message box, asking the user when you start the capture
* call StartCapture (now the capture will start immediately, because ReadyCapture prepared the capture graph)
You cannot eliminate the initialization time for the capture device. But you can make it less annoying with the above technique.
#5
Posted
:
Tuesday, August 2, 2005 6:53:03 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
The delay might be from the ReadyCapture method since it is supposed to do most of the
initialization and since you are calling both methods in the same procedure. Please try
moving the call to ReadyCapture to where the the other initialization code is to determine
which method exactly causes the delay.
Bashar Abdulqaiyume
LEAD Technologies, Inc.
LEADTOOLS Support
Multimedia
Multimedia SDK Questions
Delay occurs when making a call to StartCapture function
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.