AVDemuxer mediastatus after unload call?

Gilles Caulier caulier.gilles at gmail.com
Sun Sep 18 08:59:37 BST 2022


Hi Steven,

Good question. I will also place another brick in the wall : this is
different between ffmpeg 4 and ffmpeg 5, as the API has changed a lot
?

What's the ffmpeg API documentation said exactly (if any) ?

How are the sample/test codes implemented in the ffmpeg project about
this topic ?

Best
Gilles

Le dim. 18 sept. 2022 à 01:19, Steven Robbins <steve at sumost.ca> a écrit :
>
> Looking for a sanity check on my understanding.  I've written a test case (see
> below) that passes.  What puzzles me is that the call to mediaStatus() returns
> "LoadedMedia" after a call to unload().  Is that correct?
>
>
>     void status()
>     {
>         AVDemuxer demux;
>         QCOMPARE(demux.mediaStatus(), MediaStatus::NoMedia);
>         QCOMPARE(demux.atEnd(), false);
>         QCOMPARE(demux.fileName(), QLatin1String(""));
>         QCOMPARE(demux.isLoaded(), false);
>
>         QVERIFY(demux.setMedia(testFile1()));
>         QCOMPARE(demux.mediaStatus(), MediaStatus::NoMedia);
>         QCOMPARE(demux.atEnd(), false);
>         QCOMPARE(demux.fileName(), testFile1());
>         QCOMPARE(demux.isLoaded(), false);
>
>         QVERIFY(demux.load());
>         QCOMPARE(demux.mediaStatus(), MediaStatus::LoadedMedia);
>         QCOMPARE(demux.atEnd(), false);
>         QCOMPARE(demux.fileName(), testFile1());
>         QCOMPARE(demux.isLoaded(), true);
>
>         QVERIFY(demux.unload());
>         QCOMPARE(demux.mediaStatus(), MediaStatus::LoadedMedia);  // ??? why
> status shows loaded?
>         QCOMPARE(demux.atEnd(), false);
>         QCOMPARE(demux.fileName(), testFile1());
>         QCOMPARE(demux.isLoaded(), false);
>     }
>


More information about the Digikam-devel mailing list