mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
![Andrew Kaster](/assets/img/avatar_default.png)
Now that all the classes for Ladybird are in the Ladybird namespace, we don't need them named as Ladybird::FooBarLadybird. For the Qt-specific classes, we can tack on a Qt at the end for clarity, but FontPlugin and ImageCodecPlugin no longer have anything to do with Qt.
43 lines
947 B
C++
43 lines
947 B
C++
/*
|
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Error.h>
|
|
#include <AK/NonnullOwnPtr.h>
|
|
#include <AK/NonnullRefPtr.h>
|
|
#include <LibAudio/Forward.h>
|
|
#include <LibWeb/Platform/AudioCodecPlugin.h>
|
|
#include <QObject>
|
|
|
|
namespace Ladybird {
|
|
|
|
class AudioThread;
|
|
|
|
class AudioCodecPluginQt final
|
|
: public QObject
|
|
, public Web::Platform::AudioCodecPlugin {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static ErrorOr<NonnullOwnPtr<AudioCodecPluginQt>> create(NonnullRefPtr<Audio::Loader>);
|
|
virtual ~AudioCodecPluginQt() override;
|
|
|
|
virtual void resume_playback() override;
|
|
virtual void pause_playback() override;
|
|
virtual void set_volume(double) override;
|
|
virtual void seek(double) override;
|
|
|
|
virtual Duration duration() override;
|
|
|
|
private:
|
|
explicit AudioCodecPluginQt(NonnullOwnPtr<AudioThread>);
|
|
|
|
NonnullOwnPtr<AudioThread> m_audio_thread;
|
|
};
|
|
|
|
}
|