JMF-setBackground()???
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   d_m
Posted On:   Wednesday, February 27, 2002 08:12 PM

Hi, I am trying to use JMF in my project. When I start playing movie - player.start(), - it shows pink colored background for milliseconds. It happens also when I stop playing, deallocate and close my player. Here is the part of my code: public synchronized void controllerUpdate(ControllerEvent event) { if (event instanceof RealizeCompleteEvent) { if ((visualComponent = player.getVisualComponent())!=null) { visualComponent.setBackground(Color.black);//Here??? visualComponent.setLocation(100,200); Papa.showPanel.add(visualComponent); validate(); } } } I have tried - visualComponent.setBackground(Color.black), but w   More>>

Hi,


I am trying to use JMF in my project. When I start playing movie - player.start(), - it shows pink colored background for milliseconds. It happens also when I stop playing, deallocate and close my player.

Here is the part of my code:

public synchronized void controllerUpdate(ControllerEvent event) {


if (event instanceof RealizeCompleteEvent) {


if ((visualComponent = player.getVisualComponent())!=null) {


visualComponent.setBackground(Color.black);//Here???


visualComponent.setLocation(100,200);


Papa.showPanel.add(visualComponent);


validate();


}
}
}


I have tried - visualComponent.setBackground(Color.black), but when it plays my av-file it covers the whole picture with black color (or red, it doesn't matter).


Any suggestions?


Thanks for help.

DM.    <<Less

Re: JMF-setBackground()???

Posted By:   Reza_Nazarian  
Posted On:   Friday, March 1, 2002 04:10 AM

Hi. The pink background occurs when the player receives an empty signal (mostly when using a framegrabber etc.), it has nothing to do with the visual component. Maybe it's a bug in JMF and it happens too when you stop the data stream whem stopping etc. the avi-file. Did you created the player by creating a realized player? Good Luck, Reza.
About | Sitemap | Contact