Also, it looks like I cannot use the libopencv in ffmpeg even if I enable it, because they have limited function support for openCV.
Another problem is that some basic openCV functions/types, like Mat, in my library cannot be recognized when I am executing FFmpeg. Looks like the openCV lib is not included in my library? I tried to play with the CMakeList.txt of my library with openCV setting but still cannot solve this problem. Any suggestions? Thanks. ________________________________ 发件人: Libav-user <[email protected]> 代表 R n <[email protected]> 发送时间: 2016年9月14日 3:30 收件人: [email protected] 主题: [Libav-user] Errors when creating a C++ object (with a C API) in FFmpeg filter Dear all, First, thanks for this mail list which helped me solve the compilation problem. I wrote a C++ class using openCV as well as a C wrapper/API. I am now using it in FFmpeg filter. In the filter, I create a pointer to an object which is generated by calling the C API (The API actually returns "new myCPPclass()"). It can compile but the execution of the program "stop" around the place where the pointer is created. "Stop" here means that there is no printed info anymore (I print out the execution steps) but the response of the computer to my typing is wired. Looks like the memory has some problems. In FFmpeg, people use av_malloc... , but it is not encouraged to first malloc the memory to the C++ object using malloc and then cast its type to a C++ class. Did I miss anything? Thanks a lot. My code looks like the following: 1. C++ class: class myCPPclass { myCPPclass(abc); memberVar; memberMethod(); } 2. C API: typedef myCPPclass myCPPclass; extern "C" myCPPclass* myCPPclass_new(abc) { return new myCPPclass(abc); } 3. FFmpeg filter (in C): myCPPclass* ptr = myCPPclass_new(abc);
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
