Hello guys,
I wanted to have some help on how to implement video files using visual studio 2010.
What I want to do is:
- To open the file to play the video.
- While the video is playing, I can use command prompt to type in a certain letter in order for it to play/pause, stop or terminate the routine.
I tried implementing the pause command myself and the code accepts the letter but it doesn't do anything afterwards and it just asks the user again whether they would like to input a command.
This is what I tried to do:
If there are better ways to implement video controls let me know.Code:system("start C:\\Music_Videos\\Girls_Generation-hoot_SHORT.wmv"); while (zgb_rx_check() == 0) { // countinually check for data indicating routine has stopped while (count == 0 || count == 1) { //Check_if_finished(); cout << "\n\n Would you like to input a command? \n"; // asks for a command (pause command) scanf("%c", &letter); gets(letter); count = findletter(letter); if (count = 0) { } else if (count = 1) { system("pause C:\\Music_Videos\\Girls_Generation-hoot_SHORT.wmv"); } } } int findletter(char letter[]) { int value; if (letter[0] == 'P' || letter[0] == 'p') { value = 1; } else if (letter[0] != 'P' || letter[0] != 'p') { value = 0; } return value; }
I hope you have the time to help me further with this issue.
Thanks.