Hi! I have a console app. From the console I ask the user if he/she wants to test if the videos provided in a folder can be decoded. If user types "yes", I open a window without closing the console. The window has drop-down menu that lets user pick up from the various videos found in the given folder. I want when user picks up a video from the menu of the window, in the console the app to print: "Can you see the video playing?" and then i use "std::getline()" to wait for an answer. So far it is ok, but what will happen for the case, user selects another video from the window's menu. When selecting another video now the app makes the old one to stop playing and the new one to start playing immediately.... but what about the waiting "getline()"... how to kill it if user uses the window controls to close the preview window or to switch to another video? I will use a boolean to know if there is a getline waitning, but don't know how to kill it.
Maybe I should create a pop-up menu on top of the window playing the video to make the user pick up between: "can see it" and "can not see it".
What would be the easiest way to do it? How would you do it? I need the simplest way possible.
(i catch all possible errors(all i know about) at every point, but sometimes without any error reported, the video is black and not showing My Little Pony)
↧