Show the pre-processed clip on the screen
| 43 | |
| 44 | // Show the pre-processed clip on the screen |
| 45 | void displayClip(openshot::Clip &r9){ |
| 46 | |
| 47 | // Opencv display window |
| 48 | cv::namedWindow("Display Image", cv::WINDOW_NORMAL ); |
| 49 | |
| 50 | // Get video lenght |
| 51 | int videoLenght = r9.Reader()->info.video_length; |
| 52 | |
| 53 | // Loop through the clip and show it with the effects, if any |
| 54 | for (long int frame = 0; frame < videoLenght; frame++) |
| 55 | { |
| 56 | int frame_number = frame; |
| 57 | // Get the frame |
| 58 | std::shared_ptr<openshot::Frame> f = r9.GetFrame(frame_number); |
| 59 | // Grab OpenCV::Mat image |
| 60 | cv::Mat cvimage = f->GetImageCV(); |
| 61 | |
| 62 | // Display the frame |
| 63 | cv::imshow("Display Image", cvimage); |
| 64 | |
| 65 | // Press ESC on keyboard to exit |
| 66 | char c=(char)cv::waitKey(25); |
| 67 | if(c==27) |
| 68 | break; |
| 69 | } |
| 70 | // Destroy all remaining windows |
| 71 | cv::destroyAllWindows(); |
| 72 | } |
| 73 | |
| 74 | int main(int argc, char* argv[]) { |
| 75 |
no test coverage detected