Git Product home page Git Product logo

qtavplayer's People

Contributors

cgilles avatar elderorb avatar kimvnhung avatar leavelet avatar mitricho avatar mxnt10 avatar niko-kriznik avatar novacer avatar ogretransporter avatar tyrasnistru avatar valbok avatar xdcsystems avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qtavplayer's Issues

QtAVPlayer as the library

At the moment QtAVPlayer is 'Qt module', but there are some cases where it is more convenient to use it as the library so would be helpful if it could provide related pro / pri file.

Feature request: a way to determine seek is done

Taking into account asynchronous nature of seek currently it is not possible to understand when exactly it is finished (and understanding when it is finished is critical for resolving actual post-seek position).

I see the following options to solve this:

  1. Introduce 'SeekingState' into State - this way calling code would be able to listed for state changed signal and listen for 'SeekingState' => 'PausedState' or 'SeekingState' => 'PlayingState'. The drawback is in need to preserve previous state to 'auto-pause' or 'auto-play' after seek completion.

  2. Introduce signal for 'wait' changes. Main issue with this approach is proper naming for this pretty low-level signal

  3. Make 'seek' to accept callback - feels pretty unnatural / non-Qt way.

Any other ideas? I'm leaning towards the first option but want to hear thoughts before proceeding with implementation.

Recent QtAVPlayer doesn't works incorrectly on windows / Qt 5.15.2

Finally I've got some time to play with most recent changes (and started with 5.15.2 for simplicity).

Here is what I've got on windows using qml_video example:

  1. Crash on a code responsible for audio playback.

image

Maybe because of 'QAudioOutput: open error, invalid format.' but it used to work in the past I think...

  1. After commenting out audio-related lines...

If executed from debugger:

image

If executed without debugger - window is black (in rare occasions I do see first frame from 'big buck bunny') - and then it crashes in a second.

Empty buffer fails

QAVPlayer p;

QFileInfo fileInfo(path());
QFile file(path());
file.open(QFile::ReadOnly);

// works
/*
{
    QAVVideoFrame frame;
    QObject::connect(&p, &QAVPlayer::videoFrame, &p, [&frame](const QAVVideoFrame &f) {
        qDebug() << "got frame";
    });

    p.setSource(QUrl(fileInfo.fileName()), &file);
    p.stepForward();

    QTest::qWait(1000);
}
*/

QBuffer buffer;
buffer.open(QIODevice::ReadWrite);

QAVVideoFrame frame;
QObject::connect(&p, &QAVPlayer::videoFrame, &p, [&frame](const QAVVideoFrame &f) {
    qDebug() << "got frame";
});

p.setSource(QUrl(fileInfo.fileName()), &buffer);

while(!file.atEnd()) {
    auto bytes = file.read(4096);
    buffer.write(bytes);

    p.stepForward();
}

QTest::qWait(10000);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.