Music Hub ..
A session-wide music playback service
Loading...
Searching...
No Matches
lomiri::MediaHubService::Engine Class Referenceabstract

#include <engine.h>

Inheritance diagram for lomiri::MediaHubService::Engine:
Collaboration diagram for lomiri::MediaHubService::Engine:

Classes

class  MetaDataExtractor

Public Types

enum class  State {
  no_media ,
  ready ,
  busy ,
  playing ,
  paused ,
  stopped
}

Signals

void stateChanged ()
void isVideoSourceChanged ()
void isAudioSourceChanged ()
void positionChanged ()
void durationChanged ()
void orientationChanged ()
void trackMetadataChanged ()
void aboutToFinish ()
void seekedTo (uint64_t offset)
void clientDisconnected ()
void endOfStream ()
void playbackStatusChanged ()
void videoDimensionChanged ()
void errorOccurred (Player::Error error)
void bufferingChanged (int)

Public Member Functions

 Engine (QObject *parent=nullptr)
virtual ~Engine ()
const QSharedPointer< MetaDataExtractor > & metadataExtractor () const
virtual bool open_resource_for_uri (const QUrl &uri, bool do_pipeline_reset)=0
virtual bool open_resource_for_uri (const QUrl &uri, const Player::HeadersType &)=0
virtual void create_video_sink (uint32_t texture_id)=0
virtual bool play ()=0
virtual bool stop ()=0
virtual bool pause ()=0
virtual bool seek_to (const std::chrono::microseconds &ts)=0
State state () const
bool isVideoSource () const
bool isAudioSource () const
virtual uint64_t position () const =0
virtual uint64_t duration () const =0
void setAudioStreamRole (Player::AudioStreamRole role)
Player::AudioStreamRole audioStreamRole () const
void setLifetime (Player::Lifetime lifetime)
Player::Lifetime lifetime () const
Player::Orientation orientation () const
QPair< QUrl, Track::MetaDatatrackMetadata () const
Player::PlaybackStatus playbackStatus () const
QSize videoDimension () const
void setVolume (double volume)
double volume () const
virtual void reset ()=0

Protected Member Functions

void setMetadataExtractor (const QSharedPointer< MetaDataExtractor > &extractor)
void setState (State state)
void setIsVideoSource (bool value)
void setIsAudioSource (bool value)
void setOrientation (Player::Orientation o)
void setTrackMetadata (const QPair< QUrl, Track::MetaData > &metadata)
void setVideoDimension (const QSize &size)
void setPlaybackStatus (Player::PlaybackStatus status)
virtual void doSetAudioStreamRole (Player::AudioStreamRole role)=0
virtual void doSetLifetime (Player::Lifetime lifetime)=0
virtual void doSetVolume (double volume)=0

Detailed Description

Definition at line 44 of file engine.h.

Member Enumeration Documentation

◆ State

Enumerator
no_media 
ready 
busy 
playing 
paused 
stopped 

Definition at line 50 of file engine.h.

Constructor & Destructor Documentation

◆ Engine()

◆ ~Engine()

Engine::~Engine ( )
virtualdefault

Reimplemented in gstreamer::Engine.

Member Function Documentation

◆ aboutToFinish

void lomiri::MediaHubService::Engine::aboutToFinish ( )
signal

◆ audioStreamRole()

Player::AudioStreamRole Engine::audioStreamRole ( ) const

Definition at line 157 of file engine.cpp.

References Engine().

Referenced by gstreamer::Engine::Engine().

Here is the call graph for this function:

◆ bufferingChanged

void lomiri::MediaHubService::Engine::bufferingChanged ( int )
signal

References state().

Referenced by gstreamer::EnginePrivate::EnginePrivate().

Here is the call graph for this function:

◆ clientDisconnected

void lomiri::MediaHubService::Engine::clientDisconnected ( )
signal

◆ create_video_sink()

virtual void lomiri::MediaHubService::Engine::create_video_sink ( uint32_t texture_id)
pure virtual

Implemented in gstreamer::Engine.

◆ doSetAudioStreamRole()

virtual void lomiri::MediaHubService::Engine::doSetAudioStreamRole ( Player::AudioStreamRole role)
protectedpure virtual

Implemented in gstreamer::Engine.

Referenced by setAudioStreamRole().

◆ doSetLifetime()

virtual void lomiri::MediaHubService::Engine::doSetLifetime ( Player::Lifetime lifetime)
protectedpure virtual

Implemented in gstreamer::Engine.

References lifetime().

Referenced by setLifetime().

Here is the call graph for this function:

◆ doSetVolume()

virtual void lomiri::MediaHubService::Engine::doSetVolume ( double volume)
protectedpure virtual

Implemented in gstreamer::Engine.

References Engine(), and volume().

Referenced by setVolume().

Here is the call graph for this function:

◆ duration()

virtual uint64_t lomiri::MediaHubService::Engine::duration ( ) const
pure virtual

Implemented in gstreamer::Engine.

References lifetime(), and volume().

Here is the call graph for this function:

◆ durationChanged

void lomiri::MediaHubService::Engine::durationChanged ( )
signal

◆ endOfStream

void lomiri::MediaHubService::Engine::endOfStream ( )
signal

◆ errorOccurred

void lomiri::MediaHubService::Engine::errorOccurred ( Player::Error error)
signal

◆ isAudioSource()

bool Engine::isAudioSource ( ) const

Definition at line 129 of file engine.cpp.

References Engine().

Here is the call graph for this function:

◆ isAudioSourceChanged

void lomiri::MediaHubService::Engine::isAudioSourceChanged ( )
signal

Referenced by setIsAudioSource().

◆ isVideoSource()

bool Engine::isVideoSource ( ) const

Definition at line 115 of file engine.cpp.

References Engine().

Here is the call graph for this function:

◆ isVideoSourceChanged

void lomiri::MediaHubService::Engine::isVideoSourceChanged ( )
signal

◆ lifetime()

Player::Lifetime Engine::lifetime ( ) const

Definition at line 171 of file engine.cpp.

References Engine().

Referenced by gstreamer::Engine::doSetLifetime(), doSetLifetime(), duration(), gstreamer::Engine::Engine(), gstreamer::Engine::metaDataExtractor(), and setLifetime().

Here is the call graph for this function:

◆ metadataExtractor()

const QSharedPointer< Engine::MetaDataExtractor > & Engine::metadataExtractor ( ) const

Definition at line 87 of file engine.cpp.

References Engine().

Here is the call graph for this function:

◆ open_resource_for_uri() [1/2]

virtual bool lomiri::MediaHubService::Engine::open_resource_for_uri ( const QUrl & uri,
bool do_pipeline_reset )
pure virtual

Implemented in gstreamer::Engine.

◆ open_resource_for_uri() [2/2]

virtual bool lomiri::MediaHubService::Engine::open_resource_for_uri ( const QUrl & uri,
const Player::HeadersType &  )
pure virtual

Implemented in gstreamer::Engine.

◆ orientation()

Player::Orientation Engine::orientation ( ) const

Definition at line 143 of file engine.cpp.

References Engine().

Here is the call graph for this function:

◆ orientationChanged

void lomiri::MediaHubService::Engine::orientationChanged ( )
signal

Referenced by setOrientation().

◆ pause()

virtual bool lomiri::MediaHubService::Engine::pause ( )
pure virtual

Implemented in gstreamer::Engine.

◆ play()

virtual bool lomiri::MediaHubService::Engine::play ( )
pure virtual

Implemented in gstreamer::Engine.

◆ playbackStatus()

Player::PlaybackStatus Engine::playbackStatus ( ) const

Definition at line 198 of file engine.cpp.

References Engine().

Here is the call graph for this function:

◆ playbackStatusChanged

void lomiri::MediaHubService::Engine::playbackStatusChanged ( )
signal

Referenced by setPlaybackStatus().

◆ position()

virtual uint64_t lomiri::MediaHubService::Engine::position ( ) const
pure virtual

Implemented in gstreamer::Engine.

◆ positionChanged

void lomiri::MediaHubService::Engine::positionChanged ( )
signal

◆ reset()

virtual void lomiri::MediaHubService::Engine::reset ( )
pure virtual

Implemented in gstreamer::Engine.

◆ seek_to()

virtual bool lomiri::MediaHubService::Engine::seek_to ( const std::chrono::microseconds & ts)
pure virtual

Implemented in gstreamer::Engine.

◆ seekedTo

void lomiri::MediaHubService::Engine::seekedTo ( uint64_t offset)
signal

◆ setAudioStreamRole()

void Engine::setAudioStreamRole ( Player::AudioStreamRole role)

Definition at line 149 of file engine.cpp.

References doSetAudioStreamRole(), and Engine().

Here is the call graph for this function:

◆ setIsAudioSource()

void Engine::setIsAudioSource ( bool value)
protected

Definition at line 121 of file engine.cpp.

References Engine(), and isAudioSourceChanged().

Here is the call graph for this function:

◆ setIsVideoSource()

void Engine::setIsVideoSource ( bool value)
protected

Definition at line 107 of file engine.cpp.

References Engine(), and isVideoSourceChanged().

Here is the call graph for this function:

◆ setLifetime()

void Engine::setLifetime ( Player::Lifetime lifetime)

Definition at line 163 of file engine.cpp.

References doSetLifetime(), Engine(), and lifetime().

Here is the call graph for this function:

◆ setMetadataExtractor()

void Engine::setMetadataExtractor ( const QSharedPointer< MetaDataExtractor > & extractor)
protected

Definition at line 81 of file engine.cpp.

References Engine().

Referenced by gstreamer::Engine::Engine().

Here is the call graph for this function:

◆ setOrientation()

void Engine::setOrientation ( Player::Orientation o)
protected

Definition at line 135 of file engine.cpp.

References Engine(), and orientationChanged().

Referenced by gstreamer::EnginePrivate::EnginePrivate().

Here is the call graph for this function:

◆ setPlaybackStatus()

void Engine::setPlaybackStatus ( Player::PlaybackStatus status)
protected

Definition at line 190 of file engine.cpp.

References Engine(), and playbackStatusChanged().

Referenced by gstreamer::Engine::stop().

Here is the call graph for this function:

◆ setState()

void Engine::setState ( State state)
protected

◆ setTrackMetadata()

void Engine::setTrackMetadata ( const QPair< QUrl, Track::MetaData > & metadata)
protected

Definition at line 177 of file engine.cpp.

References Engine(), and trackMetadataChanged().

Here is the call graph for this function:

◆ setVideoDimension()

void Engine::setVideoDimension ( const QSize & size)
protected

Definition at line 204 of file engine.cpp.

References Engine(), and videoDimensionChanged().

Referenced by gstreamer::EnginePrivate::EnginePrivate().

Here is the call graph for this function:

◆ setVolume()

void Engine::setVolume ( double volume)

Definition at line 218 of file engine.cpp.

References doSetVolume(), Engine(), and volume().

Here is the call graph for this function:

◆ state()

Engine::State Engine::state ( ) const

Definition at line 101 of file engine.cpp.

References Engine().

Referenced by bufferingChanged(), setState(), and gstreamer::Engine::stop().

Here is the call graph for this function:

◆ stateChanged

void lomiri::MediaHubService::Engine::stateChanged ( )
signal

◆ stop()

virtual bool lomiri::MediaHubService::Engine::stop ( )
pure virtual

Implemented in gstreamer::Engine.

◆ trackMetadata()

QPair< QUrl, Track::MetaData > Engine::trackMetadata ( ) const

Definition at line 184 of file engine.cpp.

References Engine().

Here is the call graph for this function:

◆ trackMetadataChanged

void lomiri::MediaHubService::Engine::trackMetadataChanged ( )
signal

Referenced by setTrackMetadata().

◆ videoDimension()

QSize Engine::videoDimension ( ) const

Definition at line 212 of file engine.cpp.

References Engine().

Here is the call graph for this function:

◆ videoDimensionChanged

void lomiri::MediaHubService::Engine::videoDimensionChanged ( )
signal

Referenced by setVideoDimension().

◆ volume()

double Engine::volume ( ) const

Definition at line 225 of file engine.cpp.

References Engine().

Referenced by gstreamer::Engine::doSetVolume(), doSetVolume(), duration(), gstreamer::Engine::metaDataExtractor(), and setVolume().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • /build/media-hub-4.7~20260316060616.27~fbd9644+ubports26.04.1/src/service/engine.h
  • /build/media-hub-4.7~20260316060616.27~fbd9644+ubports26.04.1/src/service/engine.cpp