Ask Your Question

ColinBerte0114's profile - activity

2017-06-15 00:38:34 -0600 received badge  Editor (source)
2017-06-14 23:41:39 -0600 asked a question object of class VideoCapture cannot be constructed

It is put in a sub thread not main thread. I am not sure if capture was constructed, capture.isOpened() return true, but get totally 1 frame.

image description

Thanks a lot if you can provide any help! Thank you so much. ^_^

2017-06-14 20:51:38 -0600 asked a question object of class VideoCapture can only be constructed in main thread

I try to construct a object of class VideoCapture with opening a video file, It just fail and exit normal, but it goes well only in main function. The following is my gdb information in subthead.

(gdb) b 35
Breakpoint 2 at 0x402d6f: file AllBrainCloud/main.h, line 35. (gdb) c Continuing. [New Thread 0x7fffe7541700 (LWP 19889)] //thread1 I created [Switching to Thread 0x7fffe7541700 (LWP 19889)] Breakpoint 2, TestVideoCapture::Analyze (this=0x7fffffffe400) at AllBrainCloud/main.h:35 35 printf("run success\n"); (gdb) n run success [Thread 0x7fffe7d42700 (LWP 19888) exited] 36 char pFilePath = "7kg8kf1110440274a1ec76c_t.mp4"; (gdb) n [Thread 0x7ffff7fad780 (LWP 19884) exited] *//thread VideoCapture created [Inferior 1 (process 19884) exited normally] (gdb) s The program is not being run.

Thanks a lot if you can offer any help! Thank you so much!