Rialto
0.1
Rialto media pipeline API
|
Go to the documentation of this file.
20 #ifndef FIREBOLT_RIALTO_I_WEB_AUDIO_PLAYER_H_
21 #define FIREBOLT_RIALTO_I_WEB_AUDIO_PLAYER_H_
39 namespace firebolt::rialto
41 class IWebAudioPlayer;
57 static std::shared_ptr<IWebAudioPlayerFactory>
createFactory();
76 virtual std::unique_ptr<IWebAudioPlayer>
createWebAudioPlayer(std::weak_ptr<IWebAudioPlayerClient> client,
77 const std::string &audioMimeType,
78 const uint32_t priority,
79 std::weak_ptr<const WebAudioConfig> config)
const = 0;
107 virtual bool play() = 0;
116 virtual bool pause() = 0;
126 virtual bool setEos() = 0;
141 virtual bool getBufferAvailable(uint32_t &availableFrames, std::shared_ptr<WebAudioShmInfo> &webAudioShmInfo) = 0;
165 virtual bool writeBuffer(
const uint32_t numberOfFrames,
void *data) = 0;
181 virtual bool getDeviceInfo(uint32_t &preferredFrames, uint32_t &maximumFrames,
bool &supportDeferredPlay) = 0;
193 virtual bool setVolume(
double volume) = 0;
204 virtual bool getVolume(
double &volume) = 0;
211 virtual std::weak_ptr<IWebAudioPlayerClient>
getClient() = 0;
216 #endif // FIREBOLT_RIALTO_I_WEB_AUDIO_PLAYER_H_
virtual bool getDeviceInfo(uint32_t &preferredFrames, uint32_t &maximumFrames, bool &supportDeferredPlay)=0
Get device information.
virtual bool pause()=0
Pause the web audio.
virtual bool setVolume(double volume)=0
Set level and transition of audio attenuation.
virtual bool writeBuffer(const uint32_t numberOfFrames, void *data)=0
Write audio frames.
virtual bool getVolume(double &volume)=0
Get current audio level.
virtual bool play()=0
Play the web audio.
virtual bool getBufferDelay(uint32_t &delayFrames)=0
Get the delay frames.
static std::shared_ptr< IWebAudioPlayerFactory > createFactory()
Create a IWebAudioPlayerFactory instance.
IWebAudioPlayer factory class, returns a concrete implementation of IWebAudioPlayer.
Definition: IWebAudioPlayer.h:46
virtual bool setEos()=0
Notify EOS.
virtual std::weak_ptr< IWebAudioPlayerClient > getClient()=0
Returns the web audio player client.
virtual std::unique_ptr< IWebAudioPlayer > createWebAudioPlayer(std::weak_ptr< IWebAudioPlayerClient > client, const std::string &audioMimeType, const uint32_t priority, std::weak_ptr< const WebAudioConfig > config) const =0
IWebAudioPlayer factory method, returns a concrete implementation of IWebAudioPlayer for playback of ...
The definition of the IWebAudioPlayer interface.
Definition: IWebAudioPlayer.h:89
virtual bool getBufferAvailable(uint32_t &availableFrames, std::shared_ptr< WebAudioShmInfo > &webAudioShmInfo)=0
Get the available frames.