Results 1 to 4 of 4

Thread: How to use avi file in Qt?

  1. #1
    Join Date
    Dec 2006
    Posts
    211
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    27

    Question How to use avi file in Qt?

    Hi All,

    I m using Qt 4.1.5 on my MAC.

    Is it possible to use avi file in Qt if yes then how i can use it ?
    I have an application doing some long process and I have a progressBar but actually I also want to show somw avi within my application.


    If any body knows then plz help me.

    Thanks.

  2. #2
    Join Date
    Jan 2007
    Posts
    177
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 10 Times in 9 Posts

    Default Re: How to use avi file in Qt?

    in windows you have to use the winapi to show avi file. search on the codeproject or msdn for code examples. on linux look how mplayer does it.

  3. #3
    Join Date
    Jul 2007
    Location
    Bangalore, India
    Posts
    13
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    4
    Thanked 1 Time in 1 Post

    Question How to use avi file in Qt?

    Hello guys

    I am new to QT,

    I am currently working on Qt with linux,

    I am having lots of doubts in Qt... hope u ppl will solve it,


    then I want to load a avi file in Qt,... how to do it..

    thanks in advance

  4. #4
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: How to use avi file in Qt?

    Use QX11EmbedContainer with mplayer passing -slave and setting the window id in the mplayer arguments. It 's pretty straightforward to achieve this.

    The following is from the qxmp video player sources illustrating a possible way to achieve that:
    Qt Code:
    1. QX11EmbedContainer *container=new QX11EmbedContainer(ui.frame);
    2. container->resize(w,h);
    3. mp=new QProcess(container);
    4. connect(mp, SIGNAL(readyReadStandardOutput()),this, SLOT(readPlayOutput()));
    5. connect(mp, SIGNAL(finished(int)),this, SLOT(endPlayProcess(int)));
    6. connect(mp, SIGNAL(started()),this, SLOT(startTimer()));
    7. command=otherOptions+mplayerOptions+" -wid "+QString::number(container->winId())+" -slave "+playfile;
    8. mp->start("mplayer "+command);
    To copy to clipboard, switch view to plain text mode 
    I love deadlines. I like the whooshing sound they make as they fly by.
    --
    Douglas Adams

Similar Threads

  1. Draging a non-existing file to the Windows Desktop
    By klaus1111 in forum Qt Programming
    Replies: 13
    Last Post: 20th September 2007, 12:47
  2. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 16:21
  3. Exclusive file creation (Samba shares)
    By marcel in forum General Programming
    Replies: 1
    Last Post: 13th April 2007, 13:26
  4. Sending Binary File with QFTP
    By nbkhwjm in forum Newbie
    Replies: 2
    Last Post: 7th March 2007, 19:10
  5. SQLite-DB in a qrc file
    By Lykurg in forum Qt Programming
    Replies: 5
    Last Post: 31st July 2006, 20:24

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
  •  
Qt is a trademark of The Qt Company.