Results 1 to 6 of 6
Like Tree1Likes
  • 1 Post By gimbal2

Thread: Graphical output of wxWidgets application in servlet

  1. #1
    MacServ is offline Member
    Join Date
    Mar 2015
    Posts
    3
    Rep Power
    0

    Default Graphical output of wxWidgets application in servlet

    Hi,

    I'm running a Java servlet on a Tomcat 6 server. I would like to display video content (based on single frame files) and draw overlay content (coloured boxes, lines, strings etc.) on each video frame. Opening the single video frames from the server's HDD, drawing said contents onto each frame and displaying it in its own GUI is probably the largest amount of work, especially considering that it needs to be displayed fast enough to get a (close-to) real-time video streaming effect. This would not really be my preferred way to implement this. But just in case - which Java classes might be worth looking at to get this done this way.

    I do already have, on the other hand, a tool that runs on the linux console (of the server the Tomcat is running on). This tool does exactly what I want for the servlet. And on top of it, I wouldn't have to redeploy the servlet every time something changes in the code I need to display the overlay content (which is maintained by different people). I'd simply replace the binary of the tool. This tool uses wxWidgets to open up a graphical UI displaying the video content. This also works using X windows and a terminal window from a remote login.

    Is there a way to redirect the graphical content of the wxWidgets window to a panel of the Java servlet? Unfortunately I have no idea how to do that. Help is very much appreciated.

    Cheers,
    Mac

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Graphical output of wxWidgets application in servlet

    I wouldn't even know how to make one application mirror the UI of another application, let alone that you somehow magically make it happen inside a very restricted browser sandbox.

    I also don't see what servlets have to do with this; the video is to render in the client, to be specific the browser. The servlet's execution on the server will be long done before that process will start to happen.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    MacServ is offline Member
    Join Date
    Mar 2015
    Posts
    3
    Rep Power
    0

    Default Re: Graphical output of wxWidgets application in servlet

    Ok. You probably realized by now that I'm not an expert on servlet programming. I took over this work package from someone else who left our company. And so far I've been mainly working on details deep inside the servlet, adding things here and there and extending the way the servlet is doing its stuff, but not at all on the servlet itself and how it's set up.

    So I understand specifically rendering a video would have to be done as soon as the browser initially opens the page? Which of course can not be done with a large number of videos due to the amount of data and time this would take, right?! So this means ALL images displayed by the servlet (there are a couple of JPGs displayed) are getting loaded into the browser the moment I access the servlet? There's no loading of any images during run-time?

    Thanks very much for the input. It's not a big deal if this cannot be done. I was just pursuing a few ideas on how to improve the servlet and maybe add helpful features. If it's not possible in a reasonable way due to the restrictions of the servlet's nature, I'm ok with that.

    Mac

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Graphical output of wxWidgets application in servlet

    You may not be an expert, but even outside the field of IT you must have noticed that historically when a site played a video, that was always done with the Flash plugin?

    So this means ALL images displayed by the servlet (there are a couple of JPGs displayed) are getting loaded into the browser the moment I access the servlet? There's no loading of any images during run-time?
    As an exercise, try installing a plugin for your browser which logs HTTP requests made. See just what happens when you open a page of a website.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    MacServ is offline Member
    Join Date
    Mar 2015
    Posts
    3
    Rep Power
    0

    Default Re: Graphical output of wxWidgets application in servlet

    Quote Originally Posted by gimbal2 View Post
    You may not be an expert, but even outside the field of IT you must have noticed that historically when a site played a video, that was always done with the Flash plugin?
    Sure, but like I said before - the goal was more about displaying a number of single frames, making them appear like a video (or close to it), as fast as this could be done. Must be an approach "outside the field of IT".

  6. #6
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Graphical output of wxWidgets application in servlet

    Which would historically still be handled with something like Flash, or maybe a Java applet. Nowadays you might get something working with Javascript, but all of that won't solve your problem of actually obtaining those single frames.
    Imam 08 likes this.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 9
    Last Post: 01-23-2014, 07:17 PM
  2. Replies: 13
    Last Post: 07-25-2013, 05:30 PM
  3. j2me application servlet
    By loading karthik in forum CLDC and MIDP
    Replies: 0
    Last Post: 02-22-2013, 07:18 AM
  4. Replies: 5
    Last Post: 04-09-2010, 11:36 AM
  5. Invoking Servlet from SWT application
    By wolve634 in forum SWT / JFace
    Replies: 1
    Last Post: 03-30-2009, 11:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •