Infognition forum
August 19, 2019, 05:15:20 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Last Video Enhancer version: 2.2
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Capturing a Webcam button event  (Read 5417 times)
pixclautotech
Newbie
*

Karma: +0/-0
Posts: 3


View Profile
« on: October 06, 2013, 01:33:26 AM »

Using GraphEditPlus 1.4 I can connect two VMR9 objects to my USB2 camera (it uses usbvideo.sys) Capture and Still pins. Video streams into one window and about 3 seconds after I click the webcam button, a single frame appears in the second window.  What I want to do is capture this event and handle it in my code. I've looked at the generated C++ code message loop, and there is no event or message for the button click. That is, the button event is being handled in the depths of DirectShow libraries, and some default buffering/timeout/delays are occurring.

I have code that calls IVMRWindowlessControl9::GetCurrentImage from an app menu, and this works well. but I want to be able to capture the button click to do the same. Ideally, a solution would receive the event almost immediately, not after 3+ seconds.

Can anyone suggest a way to do this?
Logged
Dee Mon
Administrator
Hero Member
*****

Karma: +13/-0
Posts: 753



View Profile WWW
« Reply #1 on: October 07, 2013, 07:46:12 AM »

Pass the second stream through Sample Grabber filter and configure it to use your callback. Then when a frame arrives your callback will be called. See ISampleGrabber in MSDN.
Logged
pixclautotech
Newbie
*

Karma: +0/-0
Posts: 3


View Profile
« Reply #2 on: October 07, 2013, 11:23:47 PM »

Dee Mon, thanks for the reply. In the MSDN ISampleGrabber pages I see
*  "[Deprecated. This API may be removed from future releases of Windows.]"; and
* "... Qedit.h is not available in the Microsoft Windows SDK for Windows 7".

Qedit.dll is present in Win 7 and in Win 8, but SampleGrabber would seen not to be the solution, as IVMRWindowlessControl9::GetCurrentImage does the job and is fully supported. In any case, what I want is to get the camera button event.

There must be a way, as the event is passed through the driver and DirectShow receives it.

Any additional thoughts?
 
Logged
Dee Mon
Administrator
Hero Member
*****

Karma: +13/-0
Posts: 753



View Profile WWW
« Reply #3 on: October 08, 2013, 07:46:44 AM »

You can safely ignore those deprecation warnings, this API is not going anywhere.
Logged
mishe1Nok
Newbie
*

Karma: +0/-0
Posts: 3


View Profile WWW
« Reply #4 on: September 14, 2018, 12:28:51 PM »

Hi Sir Matt,

Thank you on this reply, But is it possible we can have the campaign recording complete theysame as DID recordings?
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!