Skip to content

Commit

Permalink
[player] Allow to set log level to use for FFmpeg backend
Browse files Browse the repository at this point in the history
  • Loading branch information
legerch committed Dec 4, 2024
1 parent 654c564 commit 24e166a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/QtAVPlayer/qavplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,19 @@ void QAVPlayer::setInputOptions(const QMap<QString, QString> &opts)
Q_EMIT inputOptionsChanged(opts);
}


/*!
* \brief Use to set log level of FFmpeg backend
* \param[in] level
* Level log to use. Please see:
* https://ffmpeg.org/doxygen/trunk/group__lavu__log__constants.html
* for value details
*/
void QAVPlayer::setLogsLevelBackend(int level)
{
av_log_set_level(level);
}

QAVStream::Progress QAVPlayer::progress(const QAVStream &s) const
{
return d_func()->demuxer.progress(s);
Expand Down
3 changes: 3 additions & 0 deletions src/QtAVPlayer/qavplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ public Q_SLOTS:
void audioFrame(const QAVAudioFrame &frame);
void subtitleFrame(const QAVSubtitleFrame &frame);

public:
static void setLogsLevelBackend(int level);

protected:
std::unique_ptr<QAVPlayerPrivate> d_ptr;

Expand Down

0 comments on commit 24e166a

Please sign in to comment.