Commit e1fe5801 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptive: constify factory methods

parent a1f808fb
...@@ -160,32 +160,32 @@ void EsOutControlResetPCRCommand::Execute( es_out_t * ) ...@@ -160,32 +160,32 @@ void EsOutControlResetPCRCommand::Execute( es_out_t * )
* Commands Default Factory * Commands Default Factory
*/ */
EsOutSendCommand * CommandsFactory::createEsOutSendCommand( FakeESOutID *id, block_t *p_block ) EsOutSendCommand * CommandsFactory::createEsOutSendCommand( FakeESOutID *id, block_t *p_block ) const
{ {
return new (std::nothrow) EsOutSendCommand( id, p_block ); return new (std::nothrow) EsOutSendCommand( id, p_block );
} }
EsOutDelCommand * CommandsFactory::createEsOutDelCommand( FakeESOutID *id ) EsOutDelCommand * CommandsFactory::createEsOutDelCommand( FakeESOutID *id ) const
{ {
return new (std::nothrow) EsOutDelCommand( id ); return new (std::nothrow) EsOutDelCommand( id );
} }
EsOutAddCommand * CommandsFactory::createEsOutAddCommand( FakeESOutID *id ) EsOutAddCommand * CommandsFactory::createEsOutAddCommand( FakeESOutID *id ) const
{ {
return new (std::nothrow) EsOutAddCommand( id ); return new (std::nothrow) EsOutAddCommand( id );
} }
EsOutControlPCRCommand * CommandsFactory::createEsOutControlPCRCommand( int group, mtime_t pcr ) EsOutControlPCRCommand * CommandsFactory::createEsOutControlPCRCommand( int group, mtime_t pcr ) const
{ {
return new (std::nothrow) EsOutControlPCRCommand( group, pcr ); return new (std::nothrow) EsOutControlPCRCommand( group, pcr );
} }
EsOutDestroyCommand * CommandsFactory::createEsOutDestroyCommand() EsOutDestroyCommand * CommandsFactory::createEsOutDestroyCommand() const
{ {
return new (std::nothrow) EsOutDestroyCommand(); return new (std::nothrow) EsOutDestroyCommand();
} }
EsOutControlResetPCRCommand * CommandsFactory::creatEsOutControlResetPCRCommand() EsOutControlResetPCRCommand * CommandsFactory::creatEsOutControlResetPCRCommand() const
{ {
return new (std::nothrow) EsOutControlResetPCRCommand(); return new (std::nothrow) EsOutControlResetPCRCommand();
} }
...@@ -233,7 +233,7 @@ void CommandsQueue::Schedule( AbstractCommand *command ) ...@@ -233,7 +233,7 @@ void CommandsQueue::Schedule( AbstractCommand *command )
vlc_mutex_unlock(&lock); vlc_mutex_unlock(&lock);
} }
CommandsFactory * CommandsQueue::factory() const CommandsFactory * CommandsQueue::factory() const
{ {
return commandsFactory; return commandsFactory;
} }
......
...@@ -124,12 +124,12 @@ namespace adaptive ...@@ -124,12 +124,12 @@ namespace adaptive
{ {
public: public:
virtual ~CommandsFactory() {} virtual ~CommandsFactory() {}
virtual EsOutSendCommand * createEsOutSendCommand( FakeESOutID *, block_t * ); virtual EsOutSendCommand * createEsOutSendCommand( FakeESOutID *, block_t * ) const;
virtual EsOutDelCommand * createEsOutDelCommand( FakeESOutID * ); virtual EsOutDelCommand * createEsOutDelCommand( FakeESOutID * ) const;
virtual EsOutAddCommand * createEsOutAddCommand( FakeESOutID * ); virtual EsOutAddCommand * createEsOutAddCommand( FakeESOutID * ) const;
virtual EsOutControlPCRCommand * createEsOutControlPCRCommand( int, mtime_t ); virtual EsOutControlPCRCommand * createEsOutControlPCRCommand( int, mtime_t ) const;
virtual EsOutControlResetPCRCommand * creatEsOutControlResetPCRCommand(); virtual EsOutControlResetPCRCommand * creatEsOutControlResetPCRCommand() const;
virtual EsOutDestroyCommand * createEsOutDestroyCommand(); virtual EsOutDestroyCommand * createEsOutDestroyCommand() const;
}; };
/* Queuing for doing all the stuff in order */ /* Queuing for doing all the stuff in order */
...@@ -138,7 +138,7 @@ namespace adaptive ...@@ -138,7 +138,7 @@ namespace adaptive
public: public:
CommandsQueue( CommandsFactory * ); CommandsQueue( CommandsFactory * );
~CommandsQueue(); ~CommandsQueue();
CommandsFactory * factory(); const CommandsFactory * factory() const;
void Schedule( AbstractCommand * ); void Schedule( AbstractCommand * );
mtime_t Process( es_out_t *out, mtime_t ); mtime_t Process( es_out_t *out, mtime_t );
void Abort( bool b_reset ); void Abort( bool b_reset );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment