try to index media immediately on import

Since indexing is supplemental, it can be made a background task that can occur
at more or less any time. So we run it as soon as possible.
This commit is contained in:
itsmattkc
2020-01-17 03:58:29 +11:00
parent 63b3c60017
commit 653709dc84
28 changed files with 410 additions and 735 deletions
+1 -14
View File
@@ -92,18 +92,7 @@ private:
*/
int GetFrame(AVPacket* pkt, AVFrame* frame);
/**
* @brief Create an index for this media
*
* Indexes are used to improve speed and reliability of imported media. Calling Retrieve() will automatically check
* for an index and create one if it doesn't exist.
*
* Indexing is slow so it's recommended to do it in a background thread. Index() must be called while the Decoder is
* open, and does not automatically call Open() and Close() the Decoder. The caller must call thse manually.
*
* FIXME: This should perhaps become a common function for the base Decoder class
*/
void Index();
virtual void Index() override;
/**
* @brief Returns the filename for the index
@@ -117,8 +106,6 @@ private:
*/
QString GetConformedFilename(const AudioRenderingParams &params);
void ValidateIndex();
/**
* @brief Used internally to load a frame index into frame_index_
*