Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (554)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Cortado in LWJGL  (Read 2754 times)
0 Members and 1 Guest are viewing this topic.
Offline Cero
« Posted 2011-09-28 13:38:12 »

Yeah not having LWJGL as an applet but rather adding some applet to it.

I have this ongoing quest of getting video playback to work properly; now Cortado is an applet that plays theora.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
public class VideoPlayerCortado extends JFrame
 {
    private Cortado cortado;

    public VideoPlayerCortado()
    {
        cortado = new Cortado();
        cortado.setBounds(0, 0, this.getWidth(), this.getHeight());        
       
        cortado.setVisible(true);
        cortado.init();
        cortado.restart();

        this.getContentPane().add((Panel)cortado);

        setIgnoreRepaint(true);
       
        cortado.doPlay();
    }
   ..
}


Deleted everything thats not important: This is how I add an applet to a JFrame.
Can I add an applet to a LWJGL Display, and if so, how ?

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 77
Projects: 15


★★★★★


« Reply #1 - Posted 2011-09-28 13:59:25 »

What you're essentially asking is if you can embed an AWT/Swing component inside LWJGL's Display (i.e. an OpenGL Context) to which I'd say its probably not possible. What you probably want to look at is how Cortado is drawing the video (to a texture/image of some sort?). Then you need to basically get this data and put it into an OpenGL texture, which can be drawn as you like in OpenGL/LWJGL.
Offline Cero
« Reply #2 - Posted 2011-09-28 14:28:09 »

I guess there was this thread: http://www.java-gaming.org/topics/cortado-works/21933/view.html

But the video playback in all of jME3 is now deprecated, so it seems like a failure and not sure if Cas got it working
dont remember video in ROTT, only played the demo though

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #3 - Posted 2011-09-28 18:50:42 »

I did get it working ... a bit. It was strangely unreliable - most ogg streams simply didn't work. I was waiting for someone to make the theora decoder more robust before I looked at it again.
As for decoding - it's simple, just decode directly into a texture instead of a bufferedimage.

Cas Smiley

Offline Cero
« Reply #4 - Posted 2011-09-28 21:51:51 »

As for decoding - it's simple, just decode directly into a texture instead of a bufferedimage.

Yeah I can't even find it - the source is not too simple.
Do you still have that code from back then ?

Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #5 - Posted 2011-09-28 22:23:01 »

No, I think I gave up on it and started looking at Xuggle, then sort of gave up on that for now too.

Cas Smiley

Offline Cero
« Reply #6 - Posted 2012-02-21 01:32:17 »

actually Cortado is still being developed.
you get it nowhere but the git repository: http://git.xiph.org/?p=cortado.git;a=summary
but here you can see that last update was last month

and there is a examples/VideoDump.java

which, I'm sure, holds everything one would need to make a opengl texture out of the stream

Offline Cero
« Reply #7 - Posted 2012-02-21 01:53:26 »

VideoDump.java: http://git.xiph.org/?p=cortado.git;a=blob;f=src/com/fluendo/examples/DumpVideo.java;h=47f01dce253cddb60f7fa0287d519038bad4a9ae;hb=HEAD

If someone tries to get the latest git source running, a couple of things dont work right off
- one audio class has problems, but since I will be using OpenAl and a seperate file for audio, it doesnt matter anyway (no audio makes cortado work pretty nicely), I just deleted the class, works fine
- Configure and SourceInfo classes are missing, but you dont need them, its only for some info output

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (18 views)
2014-08-28 18:26:30

CopyableCougar4 (26 views)
2014-08-22 19:31:30

atombrot (39 views)
2014-08-19 09:29:53

Tekkerue (36 views)
2014-08-16 06:45:27

Tekkerue (33 views)
2014-08-16 06:22:17

Tekkerue (22 views)
2014-08-16 06:20:21

Tekkerue (33 views)
2014-08-16 06:12:11

Rayexar (70 views)
2014-08-11 02:49:23

BurntPizza (47 views)
2014-08-09 21:09:32

BurntPizza (38 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!