This article uses VFW to solve the encoding and decoding process in the video process. The encoding format used is XviD.
I am also the first time processing videos. at the beginning, I checked a lot of information on the Internet, including downloading a lot of C # Video Processing code, such as Gowk and lanmsg3.0 (also using the Gowk kernel). I found that the code for video codec is incorrect. some save this part of the code. it seems that the author failed to debug the code.
The video processing code or articles on the Internet are Delphi or C ++, and they are all introductory articles, none of which provide core solutions.
When processing codec, We need to specify the same encoding type, which can be obtained using the icopen function. the HIC must be used when data is processed. at the same time, for bitmapinfo objects in the decoding process, the processing rules are bitmapinfo B1 During encoding and bitmapinfo B2 After encoding. When decoding is required, the decoding sequence is the opposite, that is, B2 is used as the input, and B1 is the output. I have not found these basic ideas online. finally, you can understand it by reading a piece of foreigner's c ++ code. it took me a week before.
Therefore, for the ICM class in Gowk, we do not need the two classes derived from it. We need to integrate the function of the codec subclass into a class so that we can share the HIC, and bitmapinfo object.
The real function is nothing more than icdecompress, icseqcompressframe, which can be found in msdn. If you want to process videos, I think it can be implemented as long as you understand the ideas.