Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:26:54+00:00 2026-05-28T15:26:54+00:00

I’ve been working for a couple of days on grabbing frames from a phonon

  • 0

I’ve been working for a couple of days on grabbing frames from a phonon media object. My aim is to capture frames at some interval specified by the user. I firstly tried to implement a slot for the tick signal associated with Phonon::MediaObject. However because the tick signal is emitted at the first opportunity there can sometimes be a little variety in the time difference… not so much that it’s not a workable solution but still I investigated further and tried a combination of seek and grabWidget but it appears that seek takes some time to complete and does not have any way to notify the application when the video is running fine again, this causes code like

obj->seek(i*m_grabInterval);
QPixmap image = QPixmap::grabWidget(m_ui.videoPlayer);

to save out a black image 90% of the time, but correctly grab the frame the remaining times.

My question is is there anything I can do about either of these two ideas that will make them work better for me, or am I barking heavily up the wrong tree and there is a much more obvious I have missed completely?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:26:54+00:00Added an answer on May 28, 2026 at 3:26 pm

    You are barking up the wrong tree, this should work, create a QImage using the snapshot() func from the Phonon::VideoWidget

    edit

    I have investigated this matter further. The snapshot function is not even implemented. Here is the implementation in phonon src videowidget.cpp:

    QImage VideoWidget::snapshot() const {
        P_D(const VideoWidget);
        ConstIface<IFACES4> iface(d);
        if(iface) return iface->snapshot();
        return QImage(); // TODO not implemented in VideoInterface
    }
    

    The IFACES4 refers to VideoWidgetInterface44 which is defined for phonon 4.4 as follows (from videowidgetinterface.h):

    class VideoWidgetInterface
    {
    
        public:
            virtual ~VideoWidgetInterface() {}
            virtual Phonon::VideoWidget::AspectRatio aspectRatio() const = 0;
            virtual void setAspectRatio(Phonon::VideoWidget::AspectRatio) = 0;
            virtual qreal brightness() const = 0;
            virtual void setBrightness(qreal) = 0;
            virtual Phonon::VideoWidget::ScaleMode scaleMode() const = 0;
            virtual void setScaleMode(Phonon::VideoWidget::ScaleMode) = 0;
            virtual qreal contrast() const = 0;
            virtual void setContrast(qreal) = 0;
            virtual qreal hue() const = 0;
            virtual void setHue(qreal) = 0;
            virtual qreal saturation() const = 0;
            virtual void setSaturation(qreal) = 0;
            virtual QWidget *widget() = 0;
            virtual int overlayCapabilities() const = 0;
            virtual bool createOverlay(QWidget *widget, int type) = 0;
           };
    
         class VideoWidgetInterface44 : public VideoWidgetInterface
        {
          public:
             virtual QImage snapshot() const = 0;
        };
    }
    
    #ifdef PHONON_BACKEND_VERSION_4_4
       namespace Phonon { typedef VideoWidgetInterface44 VideoWidgetInterfaceLatest; }
    #else
       namespace Phonon { typedef VideoWidgetInterface VideoWidgetInterfaceLatest; }
    #endif
    

    I have also looked at implementations of gstreamer and vlc backends. They do not support the snapshot functionality from phonon 4.4 yet. So for the time beeing I will be looking into other ways to create snapshots.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
i got an object with contents of html markup in it, for example: string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.