|
From: Mert T. <mer...@va...> - 2005-02-28 21:04:03
|
Dear Developers, I need to grab frames from a DV camera, do some real time image processing and display them in a GUI. I beleive that libraw1394 captures the data and I should use libdv to decode that compressed DV data to RGB pixel format. I have been using libraw1394 library to get the data from a Sony DV camera. This basically captures the DV compressed data. Each time a frame comes, it goes into a handler function to process the frame data. However, I couldn't find a way to convert that data to RGB pixel format so that I can show the frames in a GUI. The handler function gets a pointer to the beginning of the frame data as an argument and a length argument, which is the length of the data in bytes(not including isochronous header) but the data is a DV compressed data I presume, which needs to be decoded. There is a function called 'dv_parse_header' which accepts a buffer pointer argument and it is the first function to be called after setting up your decoder; however, there is no length argument for that function. I tried this function in my code but it returned -1 as an error. I looked at the source code of kino; however I couldn't find where it sets up the decoder and do parsing. I am sure that there must be a lot of people doing this process. It would be awesome if you can provide me a sample code or an explanation to do this. Thank you very much for your help and time. |