Discussion Board

Results 1 to 6 of 6

Hybrid View

  1. #1
    Registered User lildeimos's Avatar
    Join Date
    Jun 2011
    Posts
    8
    Hi,

    I write a custom video player code (QDeclarativeItem subclass) and I got problems with video playback. I use this:
    Code:
    player = new QMediaPlayer(this);
    videoSurface = new QGraphicsVideoItem(this);
    player->setVideoOutput(videoSurface);
    videoSurface->show();
    The videos are played correctly, but if I set in main.cpp this:
    Code:
    app.data()->setGraphicsSystem("raster");
    video is black. This code works flawless in N950, but it doesn't in on C7 with Symbian Belle.
    I also tried subclassing QAbstractVideoSurface instead of QGraphicsVideoItem, but "start()" isn't called.

    Thanks in advance for any suggestions

  2. #2
    Nokia Developer Expert Devnull's Avatar
    Join Date
    Sep 2011
    Posts
    381
    Videoplayback on Symbian C7 is a complex issue. For example, audio only (black screen) may happen due to overlay cause software rendering. When CPU hits 100% ; the master clock is audio and the frames are dropped as they are decoded late. Unless CPU cycles are not freed up, nothing can be done by the post processor. They need at least 10% of CPU slice. They go into a continuous cycle where every frame arrives too late and will be discarded by post-processor. Is something using raster/sw rendering ? On N8 top level QWidgets with Qt::WA_TranslucentBackground fallback to software rendering because hw accelerated transparent EGL surfaces are not supported.

  3. #3
    Registered User lildeimos's Avatar
    Join Date
    Jun 2011
    Posts
    8
    thanks Devnull

    I will try a different approach since I need a custom video element.

  4. #4
    Regular Contributor vladestCh's Avatar
    Join Date
    Mar 2012
    Posts
    144
    hi lildeimos

    for best performance you have to use opengl graphics system and avoid qwidgets in this case

  5. #5
    Registered User lildeimos's Avatar
    Join Date
    Jun 2011
    Posts
    8
    Hi vladestCh

    thank you, but I have the same problem using "opengl" as graphycs system.
    I read here that the QML Video element uses QMediaPlayer with QVideoWidget as surface ( I still need to see the Qt code ). I also thougth to avoid the use QWidget on Anna+, but seems to be the only option.

  6. #6
    Regular Contributor vladestCh's Avatar
    Join Date
    Mar 2012
    Posts
    144
    hi

    then may be it makes sense to create your own declarative item, based on QGraphicsVideoItem

Similar Threads

  1. QCamera + QGraphicsVideoItem + S^1 = empty screen
    By vladest in forum [Archived] Qt Mobility Project
    Replies: 4
    Last Post: 2011-06-30, 07:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved