NAP
Public Member Functions | Protected Member Functions | List of all members
VideoService Class Reference

#include <videoservice.h>

Public Member Functions

 VideoService (ServiceConfiguration *configuration)
 
- Public Member Functions inherited from Service
UNPREFIXED_MODULE_NAME_INPUTCASE Service (ServiceConfiguration *configuration)
 
virtual void shutdown () override
 
 Service (ServiceConfiguration *configuration)
 
virtual ~Service ()
 
CoregetCore ()
 
const CoregetCore () const
 
std::string getTypeName () const
 
const ModulegetModule () const
 
 Service (Service &)=delete
 
Serviceoperator= (const Service &)=delete
 
 Service (Service &&)=delete
 
Serviceoperator= (Service &&)=delete
 

Protected Member Functions

virtual void getDependentServices (std::vector< rtti::TypeInfo > &dependencies) override
 
virtual bool init (nap::utility::ErrorState &errorState) override
 
virtual void update (double deltaTime) override
 
virtual void registerObjectCreators (rtti::Factory &factory) override
 
- Protected Member Functions inherited from Service
virtual void created ()
 
virtual void preUpdate (double deltaTime)
 
virtual void postUpdate (double deltaTime)
 
virtual void preShutdown ()
 
virtual void shutdown ()
 
virtual void preResourcesLoaded ()
 
virtual void postResourcesLoaded ()
 
template<typename SERVICE_CONFIG >
SERVICE_CONFIG * getConfiguration ()
 
template<typename SERVICE_CONFIG >
const SERVICE_CONFIG * getConfiguration () const
 
std::string getIniFilePath () const
 
std::string getIniFilePath (const std::string &appendix) const
 

Description

Initializes the FFMPEG library (libavformat etc.) and registers all the codecs. This service also updates all system wide available video players

Inheritance diagram for VideoService:
[legend]
Collaboration diagram for VideoService:
[legend]

Constructor & Destructor Documentation

◆ VideoService()

VideoService ( ServiceConfiguration configuration)

Member Function Documentation

◆ getDependentServices()

virtual void getDependentServices ( std::vector< rtti::TypeInfo > &  dependencies)
overrideprotectedvirtual

Use this call to register service dependencies A service that depends on another service is initialized after all it's associated dependencies This will ensure correct order of initialization, update calls and shutdown of all services

Parameters
dependenciesrtti information of the services this service depends on

Reimplemented from Service.

◆ init()

virtual bool init ( nap::utility::ErrorState errorState)
overrideprotectedvirtual

Initializes the video service

Parameters
errorStatecontains the error message on failure
Returns
if the video service was initialized correctly

Reimplemented from Service.

◆ registerObjectCreators()

virtual void registerObjectCreators ( rtti::Factory factory)
overrideprotectedvirtual

Object creators associated with video module

Reimplemented from Service.

◆ update()

virtual void update ( double  deltaTime)
overrideprotectedvirtual

Updates all registered video resources

Reimplemented from Service.