Results 1 to 10 of 10

Thread: Two sibling widgets, one in foreground transparent, one is in background VLC

  1. #1
    Join Date
    Sep 2010
    Posts
    10
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Two sibling widgets, one in foreground transparent, one is in background VLC

    Hello,

    I am trying to create a libvlc implementation in linux environment. I have two QFrames in my application, one for vlc to put its vout on background, and the other one is for html renderer engine which using QImage render its data on screen.

    My aim is to put vlc frame in background and html render frame in foreground to see the playing movie through the transparent html page.Whole application is transparent (e.g. no background color, Qt::WA_TranslucentBackground set composition is on etc.) libvlc only aware of videoFrame->WId() and nothing more

    I am able to see my desktop through the application while rendering full transparent html page, but when playback starts, it raises to the top and covers the area of html rendering frame. I've tried many solutions, writing custom layout, raising -lowering widgets etc, but no good so far.


    How can I prevent video frame to cover html rendering frame? I only want to see playback through the transparent html.. How can I organize widgets positions in a application and make sure some widget never raise over another widget? Is it possible?

    Using linux/ qt 4.6



    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Two sibling widgets, one in foreground transparent, one is in background VLC

    I don't think the problem is the stacking order of widgets. I think the video is simply rendered on the window surface bypassing Qt's backingstore completely. It'd be best if you could render the frames to an image and then render the image to the widget using Qt's API (which will make it go through the backingstore). Then you can render someting over the image.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2010
    Posts
    10
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Two sibling widgets, one in foreground transparent, one is in background VLC

    Hmm I guess you are right, but in the case of libvlc it doesn't really accepting a QImage or some other widget, all libvlc requiring is winId of a qwidget..


    So I'd better searching for another multimedia lib, maybe gstreamer?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Two sibling widgets, one in foreground transparent, one is in background VLC

    Why not simply use QtMultimedia module?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2010
    Posts
    10
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default

    as far as I know QtMultimedia is part of QtMobility? and again is it ready for every day playing tasks?

    And last time I checked it wasn't compiling on my ubuntu 9 linux box

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Two sibling widgets, one in foreground transparent, one is in background VLC

    Quote Originally Posted by mburakalkan View Post
    as far as I know QtMultimedia is part of QtMobility?
    No, it's a regular Qt module.

    and again is it ready for every day playing tasks?
    In your case it should be sufficient. For more highlevel things Phonon is still more appropriate.

    And last time I checked it wasn't compiling on my ubuntu 9 linux box
    Compiles ok on my Linux box.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Sep 2010
    Posts
    10
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Two sibling widgets, one in foreground transparent, one is in background VLC

    Thanks for pointing out, I didn't know about QtMultimedia,
    I have another question by using QtMultimedia and other modules what does it take to decode a udp stream on the local network
    I mean when I use vlc module in my application I simply give vlc my url like udp://@__someipadd:1234 and vlc starts to decode stream
    If I use QtMultimedia I guess I will have to handle network stram in my application bu using network module, since QtMultimedia seems very low level?

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Two sibling widgets, one in foreground transparent, one is in background VLC

    Quote Originally Posted by mburakalkan View Post
    If I use QtMultimedia I guess I will have to handle network stram in my application bu using network module, since QtMultimedia seems very low level?
    Unfortunately I don't know that, that could be true, yes. I've never actually used QtMultimedia myself. It could even be that QtMultimedia is not capable of decoding frames itself (at least I can't find any classes for this). If it's not fit for your task then maybe you'll have more luck with Phonon.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Sep 2010
    Posts
    10
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Two sibling widgets, one in foreground transparent, one is in background VLC

    Quote Originally Posted by wysota View Post
    Unfortunately I don't know that, that could be true, yes. I've never actually used QtMultimedia myself.
    Ok Thanks, I will be searching potential mediaplaying-ready implementations - phonon, qtmobility, qtmultimedia and if successful update here. Thank you

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Two sibling widgets, one in foreground transparent, one is in background VLC

    If all you are after is video and not audio then some time ago I managed to use libavformat/libavcodec for decoding video. If you combine it with QtMultimedia, you should get a nice video playback. I didn't invest enough time to get sound working but maybe all you need is to interconnect the audio stream with QAudioOutput.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 2
    Last Post: 31st May 2010, 11:57
  2. QLCDNumber with transparent background?
    By PolyVox in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2008, 05:34
  3. transparent background
    By fruzzo in forum Qt Programming
    Replies: 13
    Last Post: 18th March 2008, 14:42
  4. Transparent background on QLabel on transparent QWidget
    By codeslicer in forum Qt Programming
    Replies: 1
    Last Post: 13th February 2008, 02:10
  5. Why the background is not transparent?
    By SkripT in forum Qt Programming
    Replies: 4
    Last Post: 9th May 2006, 01:17

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.