Hi,
I'm thinking of using RVMedia for my application for video capture from USB and IP cameras. The thing is I need fast access to the actual frames being captured, since I have to transfer these to 3D textures to build into another graphical framework.
Can you tell me if there is a solution to capture frame data in real-time, perhaps via an event e.g. OnNewFrame ? If not, would you be able to add this into the TRVCamera class or wherever appropriate?
Thanks
Fast Access to Camera Frames
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I've hit a problem integrating the OnGetImage handler into my application. It appears that the 'Img: TRVMBitmap' parameter is freed immediately after the event callback is called. Can you confirm this please?
The reason this causes a problem for me is that I want to wake up another processing thread from within the OnGetImage handler, then just pass across a pointer to the data buffer '@Img.Data[0]'. But when the processing thread wakes up to read the image data and copy it elsewhere, accessing the memory location gives an immediate AV error. If I call the same processing code from within the OnGetImage handler then there's no problem.
Is it possible that you could extend the lifetime of the TRVMBitmap instance, or maybe recycle it for successive frames, or use a small 'pool' of TRVMBitmap instances and cycle round them? Performance when processing large frame images is a big deal for my app and ideally I want to avoid unnecessary copying of frame image data.
Thanks.
The reason this causes a problem for me is that I want to wake up another processing thread from within the OnGetImage handler, then just pass across a pointer to the data buffer '@Img.Data[0]'. But when the processing thread wakes up to read the image data and copy it elsewhere, accessing the memory location gives an immediate AV error. If I call the same processing code from within the OnGetImage handler then there's no problem.
Is it possible that you could extend the lifetime of the TRVMBitmap instance, or maybe recycle it for successive frames, or use a small 'pool' of TRVMBitmap instances and cycle round them? Performance when processing large frame images is a big deal for my app and ideally I want to avoid unnecessary copying of frame image data.
Thanks.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: