Page 9 of 15 FirstFirst 123456789101112131415 LastLast
Results 81 to 90 of 150

Thread: Llama's and Intuition's Techie Thread

  1. #81
    Variable Bitrate intuitionsys's Avatar
    Join Date
    Jul 2005
    Location
    Northern Virginia
    Posts
    293

    Xine

    I was planning on embedding xine a-la xine-lib in SW2 but I may be flip-flopping again in favour of xine as a seperate process like v1.3 does just coded better (or so I'm hoping ). Since v1.3 used an RF remote, window Z order wasn't an issue since mouse clicks would never bring any window forward. But with a touchscreen that isn't going to be the case any longer.

    Does anybody have any quick and dirty code or even a command line command that can reset (any) window's properties to "stay on top" (thus solving any window obliteration problems)? "kstart --ontop --windowclass 'xine' xine" in KDE runs xine but doesn't change the window's properties.

    Of course the assumption would need to be made that the underlying window manager supports that property. Otherwise the only way to use xine as a seperate process is to dress the GUI around it, leaving a hole for the video window, which isn't a huge deal but the other way would be alot simpler.
    Silverwolf 2 is dead.
    Silverwolf 3...?

  2. #82
    FLAC TheLlama's Avatar
    Join Date
    Jul 2004
    Location
    All over the world
    Posts
    970
    Quote Originally Posted by intuitionsys
    I was planning on embedding xine a-la xine-lib in SW2 but I may be flip-flopping again in favour of xine as a seperate process like v1.3 does just coded better (or so I'm hoping ). Since v1.3 used an RF remote, window Z order wasn't an issue since mouse clicks would never bring any window forward. But with a touchscreen that isn't going to be the case any longer.

    Does anybody have any quick and dirty code or even a command line command that can reset (any) window's properties to "stay on top" (thus solving any window obliteration problems)? "kstart --ontop --windowclass 'xine' xine" in KDE runs xine but doesn't change the window's properties.

    Of course the assumption would need to be made that the underlying window manager supports that property. Otherwise the only way to use xine as a seperate process is to dress the GUI around it, leaving a hole for the video window, which isn't a huge deal but the other way would be alot simpler.
    I do not know off hand. There has to be some way. Otherwise, you can use the shape extension to dress around the window (as you stated before). This question may be worth asking in the programming forum on linuxquestions.org

  3. #83
    Variable Bitrate intuitionsys's Avatar
    Join Date
    Jul 2005
    Location
    Northern Virginia
    Posts
    293
    After some further research, embedding Xine (using xine-lib) may not be as big a PITA as I thought so I think I'll flip-flop again and go that route. I haven't had time to do any coding for it yet other than some preliminary tests but it looks like that's probably the best way to go.
    Silverwolf 2 is dead.
    Silverwolf 3...?

  4. #84
    FLAC TheLlama's Avatar
    Join Date
    Jul 2004
    Location
    All over the world
    Posts
    970
    Quote Originally Posted by intuitionsys View Post
    After some further research, embedding Xine (using xine-lib) may not be as big a PITA as I thought so I think I'll flip-flop again and go that route. I haven't had time to do any coding for it yet other than some preliminary tests but it looks like that's probably the best way to go.
    Definately the most efficient.

  5. #85
    Variable Bitrate intuitionsys's Avatar
    Join Date
    Jul 2005
    Location
    Northern Virginia
    Posts
    293
    I have some early code working now so problem solved. The Xine API is very old school but it's solid - at least so far
    Silverwolf 2 is dead.
    Silverwolf 3...?

  6. #86
    FLAC TheLlama's Avatar
    Join Date
    Jul 2004
    Location
    All over the world
    Posts
    970
    Quote Originally Posted by intuitionsys View Post
    I have some early code working now so problem solved. The Xine API is very old school but it's solid - at least so far
    I finally have time to work on my player again. This is gonna be some fun ****.

  7. #87
    Newbie BennY-'s Avatar
    Join Date
    Jan 2006
    Location
    Germany, Cologne
    Posts
    41
    I'm using XMMS with the Pipe Plugin to control xmms throug the pipe, so i have plugin support for pulsing of my griffin powermate und more nice features.

    controlling xmms over the pipe works fine and the code is really tiny.


    Greets
    benny

  8. #88
    Variable Bitrate intuitionsys's Avatar
    Join Date
    Jul 2005
    Location
    Northern Virginia
    Posts
    293
    I finally finally have time to continue work on SW2! Like totally woohoo dude I'm in the process of cleaning up the video engine. The easy part is just playing something like a DVD with xine but navigation and the like starts to get a wee bit complicated. I'm using a widget wrapper very similar to kaffeine except without the KDE stuff and it uses Qt4.
    Silverwolf 2 is dead.
    Silverwolf 3...?

  9. #89
    FLAC TheLlama's Avatar
    Join Date
    Jul 2004
    Location
    All over the world
    Posts
    970
    Nice. I've run into a problem while working on my X11 port of my toolkit. I haven't been able to solve it for almost a month and that is why my development is stalled. Maybe a few bright minds can figure it out.

    My toolkit is powered by a main event loop, like most GUI applications. There is a class, X11Application, that supports a generic run() function for applications. The function looks, basically, like:
    Code:
     while (running()) {
      handle_xevents(); // Contains a XCheckIfEvent loop to queue up all events
      while (ltk_system()->send_next_event()) {} // Dispatches all the queued events
      root_widget_redraw(); // Repaint the widget hierachy as needed
      screen->send_screen(); // Send changes to the Window
    }
    Faily simple. The problem is that I want it to support a multimedia timer. My LTKSystem class supports registering timers and handling elapsed time. That is:
    Code:
     ltk_system()->handle_timer(elapsedTime);
    will check to see if any timers need to be fired, and if so it will call the timer's callback function. The function then returns the amount of time we need to wait until the next timer.

    What I need is an efficient way to combine these mechinisms. I can do something like this:
    Code:
     while (running()) {
      delay = ltk_system()->handle_timer(delay);
      handle_xevents(); // Contains a XCheckIfEvent loop to queue up all events
      while (ltk_system()->send_next_event) {} // Dispatches all the queued events
      root_widget_redraw(); // Repaint the widget hierachy as needed
      screen->send_screen(); // Send changes to the Window
      some_sleep_function(delay);
    }
    But this has the problem of not accepting user input until a timer is fired. So, if there happens to be only a 1sec timer running, then the UI will only be updated once a second.

    Another option is removing the sleep(). This would work, but the loop is sooo busy that the program will take up 100% CPU while it loops largely for no reason.

    Another option is to make the loop run with a certain granularity. Here is the problem, even on my computer (Athlon 64 3500+) I cannot find a good balance between performance and responsiveness.

    There must be some way to handle this problem. I tried a few multi-threaded solutions but they all failed since XLib is not threadsafe. Perhaps there is another way to arrange it so that Threading will not be an issue.

    ANY Ideas?? Thanks

    (PS, I am selling a bunch of small 5VDC 3A powersupplies with 100-240VAC input. They are perfect for powering circuits and electronics projects. I'll post them on the FS thread later today.)

  10. #90
    Variable Bitrate intuitionsys's Avatar
    Join Date
    Jul 2005
    Location
    Northern Virginia
    Posts
    293
    I'm thinking...
    Silverwolf 2 is dead.
    Silverwolf 3...?

Bookmarks

Posting Permissions

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