2 #include <Process/TimeValue.hpp>
4 #include <Media/AudioArray.hpp>
6 #include <ossia/detail/flicks.hpp>
7 #include <ossia/detail/optional.hpp>
11 #include <score_plugin_media_export.h>
25 int32_t convertedRate{};
28 int64_t convertedLength{};
29 int64_t max_arr_length{};
30 std::optional<double> tempo;
33 TimeVal duration()
const noexcept;
43 static std::optional<AudioInfo> do_probe(
const QString& path);
44 void decode(
const QString& path,
int track, audio_handle hdl);
46 static std::optional<std::pair<AudioInfo, audio_array>>
47 decode_synchronous(
const QString& path,
int rate);
49 static QHash<QString, AudioInfo>& database();
51 int32_t fileSampleRate{};
52 int32_t convertedSampleRate{};
55 std::size_t decoded{};
58 void newData() W_SIGNAL(newData);
59 void finishedDecoding(audio_handle hdl) W_SIGNAL(finishedDecoding, hdl);
61 void startDecode(QString str, audio_handle hdl) W_SIGNAL(startDecode, str, hdl);
64 void on_startDecode(QString, audio_handle hdl);
65 W_SLOT(on_startDecode);
68 static double read_length(
const QString& path);
70 QThread* m_baseThread{};
71 QThread m_decodeThread;
73 template <
typename Decoder>
74 void decodeFrame(Decoder dec, audio_array& data, AVFrame& frame);
76 template <
typename Decoder>
77 void decodeRemaining(Decoder dec, audio_array& data, AVFrame& frame);
78 std::vector<SwrContext*> resampler;
Definition: TimeValue.hpp:21