[vlc-commits] demux: adaptive: constify factory methods
Francois Cartegnie
git at videolan.org
Sat Jul 9 18:42:43 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jun 29 14:54:29 2016 +0200| [e1fe5801a3049958173b57d0b85a7b479029fac0] | committer: Francois Cartegnie
demux: adaptive: constify factory methods
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1fe5801a3049958173b57d0b85a7b479029fac0
---
modules/demux/adaptive/plumbing/CommandsQueue.cpp | 14 +++++++-------
modules/demux/adaptive/plumbing/CommandsQueue.hpp | 14 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.cpp b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
index 894e710..e8d32b7 100644
--- a/modules/demux/adaptive/plumbing/CommandsQueue.cpp
+++ b/modules/demux/adaptive/plumbing/CommandsQueue.cpp
@@ -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;
}
diff --git a/modules/demux/adaptive/plumbing/CommandsQueue.hpp b/modules/demux/adaptive/plumbing/CommandsQueue.hpp
index 315411b..e5bed22 100644
--- a/modules/demux/adaptive/plumbing/CommandsQueue.hpp
+++ b/modules/demux/adaptive/plumbing/CommandsQueue.hpp
@@ -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 );
More information about the vlc-commits
mailing list