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 * )
* 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 );
}
EsOutDelCommand * CommandsFactory::createEsOutDelCommand( FakeESOutID *id )
EsOutDelCommand * CommandsFactory::createEsOutDelCommand( FakeESOutID *id ) const
{
return new (std::nothrow) EsOutDelCommand( id );
}
EsOutAddCommand * CommandsFactory::createEsOutAddCommand( FakeESOutID *id )
EsOutAddCommand * CommandsFactory::createEsOutAddCommand( FakeESOutID *id ) const
{
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 );
}
EsOutDestroyCommand * CommandsFactory::createEsOutDestroyCommand()
EsOutDestroyCommand * CommandsFactory::createEsOutDestroyCommand() const
{
return new (std::nothrow) EsOutDestroyCommand();
}
EsOutControlResetPCRCommand * CommandsFactory::creatEsOutControlResetPCRCommand()
EsOutControlResetPCRCommand * CommandsFactory::creatEsOutControlResetPCRCommand() const
{
return new (std::nothrow) EsOutControlResetPCRCommand();
}
......@@ -233,7 +233,7 @@ void CommandsQueue::Schedule( AbstractCommand *command )
vlc_mutex_unlock(&lock);
}
CommandsFactory * CommandsQueue::factory()
const CommandsFactory * CommandsQueue::factory() const
{
return commandsFactory;
}
......
......@@ -124,12 +124,12 @@ namespace adaptive
{
public:
virtual ~CommandsFactory() {}
virtual EsOutSendCommand * createEsOutSendCommand( FakeESOutID *, block_t * );
virtual EsOutDelCommand * createEsOutDelCommand( FakeESOutID * );
virtual EsOutAddCommand * createEsOutAddCommand( FakeESOutID * );
virtual EsOutControlPCRCommand * createEsOutControlPCRCommand( int, mtime_t );
virtual EsOutControlResetPCRCommand * creatEsOutControlResetPCRCommand();
virtual EsOutDestroyCommand * createEsOutDestroyCommand();
virtual EsOutSendCommand * createEsOutSendCommand( FakeESOutID *, block_t * ) const;
virtual EsOutDelCommand * createEsOutDelCommand( FakeESOutID * ) const;
virtual EsOutAddCommand * createEsOutAddCommand( FakeESOutID * ) const;
virtual EsOutControlPCRCommand * createEsOutControlPCRCommand( int, mtime_t ) const;
virtual EsOutControlResetPCRCommand * creatEsOutControlResetPCRCommand() const;
virtual EsOutDestroyCommand * createEsOutDestroyCommand() const;
};
/* Queuing for doing all the stuff in order */
......@@ -138,7 +138,7 @@ namespace adaptive
public:
CommandsQueue( CommandsFactory * );
~CommandsQueue();
CommandsFactory * factory();
const CommandsFactory * factory() const;
void Schedule( AbstractCommand * );
mtime_t Process( es_out_t *out, mtime_t );
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