Results 1 to 2 of 2

Thread: Phonon (or any else) video capture

  1. #1
    Join Date
    Nov 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Phonon (or any else) video capture

    Hi!

    I need video capture from web-camera (desktop application), under Windows 7 and Linux Mint. How to enumerate devices and run frames loop - I can't find it, and for begin I tryed execute this trivial code:

    Qt Code:
    1. #include <QtGui/QApplication>
    2. #include <phonon/VideoPlayer>
    3. #include <QLabel>
    4. #include <QUrl>
    5.  
    6. int main(int argc, char *argv[])
    7. {
    8. QApplication a(argc,argv);
    9. a.setApplicationName("test");
    10. QLabel l;
    11. Phonon::VideoPlayer* player = new Phonon::VideoPlayer(Phonon::VideoCategory,&l);
    12. player->play(QUrl::fromLocalFile("d:\\test.avi"));
    13. l.show();
    14.  
    15. return a.exec();
    16. }
    To copy to clipboard, switch view to plain text mode 

    Under Windows 7 this code doesn't work. Just blank window, no video.
    Under Linux Mint this code doesn't compile (after adding QT += phonon in pro-file).

    What I am doing wrong? Qt version: 4.8.2

    Thank you in advance for your help.

  2. #2
    Join Date
    Nov 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Phonon (or any else) video capture

    New details!

    After install lpulse-mainloop-glib package in Linux - project can compile! But I see only black window, not video. If open video use Totem Movie Player - correctly showing.

    Problem still not solved In Windows..

    What a reason can be?

Similar Threads

  1. Webcam Video Capture
    By bajoelkid12 in forum Qt Programming
    Replies: 28
    Last Post: 25th December 2011, 03:28
  2. How to capture Video with OpenCV
    By CCDamon in forum Qt Programming
    Replies: 5
    Last Post: 17th June 2011, 14:18
  3. v4l2 video capture input in Phonon
    By abbot in forum Qt Programming
    Replies: 6
    Last Post: 16th February 2011, 10:31
  4. Replies: 3
    Last Post: 5th July 2009, 17:22
  5. Video freezes during mpeg video playback using Phonon
    By davejames in forum Qt Programming
    Replies: 2
    Last Post: 12th January 2009, 08:45

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.