Toss for one months, finally transferred out ..... First Spit Groove Hoi Hong SDK, but also thank ...
Have a project at hand, need real-time capture Hai Kang camera, I was implemented under the Android, Hai Kang official online no Android SDK, here Friendship reminds, everyone on the official website to Hai Kang a phone on the fixed ... I have at hand, but since Hai Kang does not put on the webpage, wants to let oneself obtain, then I also will not disorderly upload, respect Hai Kang bar ... Anyway a 400, about 2 hours from the mail to the ...
After receiving the SDK, there is a demo, I directly run the demo is no problem, you can preview the camera in real-time under Android, but I need to capture the real-time screen down to the OpenCV library, for the post-image analysis, provided by the SDK has crawled BMP, JPEG function, But indeed, as netizens said there is a delay, you have to use the Method II (the following attached to the relevant web site, we can see for themselves, I also refer to it): http://blog.csdn.net/wanghuiqi2008/article/details/ 31404571, the idea is to set the DECODECB decoding callback function in Realplaycallback, and then in the DECODECB decoding callback function for the capture processing, such as the image data saved to the binary file, and then you can play ... Here decode get the image is YV12 data, my demand is to convert it to RGB, anyway is good to run .... A description of the DECODECB function you can look at:
According to the above instructions, it is very simple ..... But, but, but ... The pit father's thing came, I have been tossing for one months, always thought own program error, repeatedly checks the second parameter of the DECODECB callback "byte[] data" This image array has hundreds of thousands of elements, but each element is 0 ... In other words, there is no data in the callback ....
And at the same time, Hoi Hong SDK description and too "simple to", Baidu, Google also can not find the relevant statement, finally I only to the Hoi Hong SDK Email Consulting (that is, directly reply to the SDK to send me the mailbox). reported to try the psychology (because there are several Hai Kang Development group, all said the phone does not answer, mail not back), incredibly quickly reply, after many communication, he sent me two times the SDK update file (to replace so file). After all the hardships, finally have data, and then I either save into YUV file, transcoding into RGB are OK ...
So at first I said, "Spit Groove Hoi Hong, M's provide an SDK actually do not test it?" But sdk_support this mailbox or reply very fast, so I am also very grateful to ...
Finally, there may be friends want to ask me to the SDK development package, I still do not preach, I do not know Hoi Hong why not directly on the website to provide Android SDK, we have trouble, go to a phone, just will let you quote a unit name, very simple.
Android Real-time video decoding