This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Ok, I've been racking my brain on this for a while now. I'm pretty much a JMF beginner so there may be something very basic I'm missing. Anyway, here is the problem. I have an application that takes in video streams and displays them in a sort of video chatroom, and everything is going fine except that I can't seem to work through the custom control interfaces. More specifically I want to be able to resize the video component at the press of a button and control the frame rate (with a slider or something). I'm attempting to use the FormatControl and FrameRateCOntrol objects but am not having any luck actually changing anything. Here is the code for one of my classes, there are basically three buttons that, when clicked, should change the resolution ot the video:
In all Controls (which you can get by player.getControls() ), are 2 instances of FormatControl. Try to use another, searching list of controls with using operator instanceof (instanceof FormatControl)
Additionally,you should use:
if(((VideoFormat) form).getSize().equals( size))
if(((VideoFormat) form).getSize() == size)
you have to stop player during setting format