Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, March 29, 2013 3:34:36 PM(UTC)
ijourneaux1

Groups: Registered
Posts: 9


I currently use to access individual frames in a video

Clipboard.Clear
Set pic = LTMMPlay.GetStillPicture(1000)
Clipboard.SetData pic
lCount = 0
Do While ld.Paste(PASTE_ISREADY) = 0 And (lCount 0 Then
ld.Paste 0
ld.ForceRepaint
End If

I would like to eliminate the use of the clipboard but I haven't figured out a method that works.
Ian
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, March 31, 2013 3:40:41 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Ian,
It appears you're using one of our OCX/COM objects such as the LEAD Main OCX. If that's the case, you can get the still picture from our player control and pass it to our Main OCX control by using the following code:
+----------------+
Dim pic As Long
pic = ltmmPlayCtrl1.GetStillDIB(1000)
LEAD1.SetDIB (pic)
+----------------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Wednesday, April 3, 2013 6:09:36 AM(UTC)
ijourneaux1

Groups: Registered
Posts: 9


I tried implementing this and it works for a bit but I quickly run out of memory. Perhaps I need to clear a memory buffer?
 
#4 Posted : Thursday, April 4, 2013 5:59:47 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

Yes you need to free the memory of the DIB image. Try to use the following code:
+------------+
Private Declare Function GlobalFree Lib "kernel32.dll" (ByVal hMem As Long) As Long
Private Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As Long

Private Sub Command1_Click()
  Dim pic As Long
  pic = ltmmPlayCtrl1.GetStillDIB(500)
  LEAD1.Bitmap = 0
  LEAD1.SetDIB (pic)
  GlobalUnlock(pic)
  GlobalFree (pic)
End Sub
+------------+

If the problem persists, please send this issue to support@leadtools.com and include the following information in your email:
1. What is the versions of LEADTOOLS Imaging SDK (14.5, 17.0, etc.)?
2. What is the versions of LEADTOOLS Multimedia SDK that you use?
3. Send me your LEADTOOLS serial numbers (do Not post them here).
4. A link to this forum post.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Thursday, April 4, 2013 7:18:46 AM(UTC)
ijourneaux1

Groups: Registered
Posts: 9


Thanks very much for the help. That seems to solve the memory issue and allows me to avoid using the clipboard.

Ian
 
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.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.135 seconds.