omkar176 / xuggle

Automatically exported from code.google.com/p/xuggle
0 stars 0 forks source link

Problem with playing video and Swing #265

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
hello, I am trying to play video from file in my aplication; I've tried some 
code from tutorial and it works good. Problem occur when I create new JFrame 
and add jButton with event MouseClicked. The simplest code does not work, there 
is only sound byt there is no video. Here is the code i use:

private void jButtonPlayVideoMouseClicked(MouseEvent evt) 
{
IMediaReader mediaReader = ToolFactory.makeReader("video.avi");

            IMediaViewer mediaViewer = ToolFactory.makeViewer(true);
            mediaReader.addListener(mediaViewer);

            while(mediaReader.readPacket() == null);
}
What I have to do t play video corectly?

Original issue reported on code.google.com by ewelina....@gmail.com on 24 May 2011 at 10:32

GoogleCodeExporter commented 8 years ago
I am trying similar things using Swing JPanel/JFRAME to wrap meidaReader and 
failed to get it to work. Any update?

Original comment by xiaotian...@gmail.com on 18 Oct 2011 at 7:35

GoogleCodeExporter commented 8 years ago
This is a request for developer support, not a bug filing in particular and 
should be on the public lists.  No paid for or committed support is provided 
for Xuggler.

Original comment by art.cla...@gmail.com on 18 Oct 2011 at 7:38

GoogleCodeExporter commented 8 years ago
Thanks for a quick response. Can you provide me with some hints on how to wrap 
Xuggle in Swing such that I can customize it and make it useful? Some sample 
codes would be great.

Original comment by xiaotian...@gmail.com on 18 Oct 2011 at 7:44

GoogleCodeExporter commented 8 years ago
I got my application running fine against .mov, .mp3 and .flv. However, when I 
ran it against .avi file, it poped up following error:

JVMDUMP006I Processing dump event "systhrow", detail 
"java/lang/OutOfMemoryError" - please wait.
JVMDUMP032I JVM requested Snap dump using 
'C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\Snap.20111025.134539.1
2108.0001.trc' in response to an event
JVMDUMP010I Snap dump written to 
C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\Snap.20111025.134539.12
108.0001.trc
JVMDUMP032I JVM requested Heap dump using 
'C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\heapdump.20111025.1345
39.12108.0002.phd' in response to an event
JVMDUMP010I Heap dump written to 
C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\heapdump.20111025.13453
9.12108.0002.phd
JVMDUMP032I JVM requested Java dump using 
'C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\javacore.20111025.1345
39.12108.0003.txt' in response to an event
JVMDUMP010I Java dump written to 
C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\javacore.20111025.13453
9.12108.0003.txt
JVMDUMP013I Processed dump event "systhrow", detail 
"java/lang/OutOfMemoryError".
Exception in thread "main" java.lang.OutOfMemoryError: Failed to create a 
thread: retVal -1073741830, errno 12
at java.lang.Thread.startImpl(Native Method)
at java.lang.Thread.start(Thread.java:887)
at 
com.test.xuggle.fileconvert.DecodeAndPlayVideo$VideoAudio.setAudio(DecodeAndPlay
Video.java:473)
at 
com.test.xuggle.fileconvert.DecodeAndPlayVideo.playJavaSound(DecodeAndPlayVideo.
java:453)
at 
com.test.xuggle.fileconvert.DecodeAndPlayVideo.<init>(DecodeAndPlayVideo.java:23
3)
at com.test.xuggle.fileconvert.VideoPlayer.main(VideoPlayer.java:7)

Any suggestions? 

Original comment by xiaotian...@gmail.com on 25 Oct 2011 at 6:54