Commit b74c4c50 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: adaptative: add pcr reset command

parent 42880f79
......@@ -19,6 +19,7 @@
*****************************************************************************/
#include "CommandsQueue.hpp"
#include "FakeESOutID.hpp"
#include "FakeESOut.hpp"
#include <vlc_es_out.h>
#include <vlc_block.h>
#include <algorithm>
......@@ -30,7 +31,8 @@ enum
ES_OUT_PRIVATE_COMMAND_ADD = ES_OUT_PRIVATE_START,
ES_OUT_PRIVATE_COMMAND_DEL,
ES_OUT_PRIVATE_COMMAND_DESTROY,
ES_OUT_PRIVATE_COMMAND_SEND
ES_OUT_PRIVATE_COMMAND_SEND,
ES_OUT_PRIVATE_COMMAND_DISCONTINUITY
};
AbstractCommand::AbstractCommand( int type_ )
......@@ -150,6 +152,16 @@ void EsOutDestroyCommand::Execute( es_out_t *out )
es_out_Delete( out );
}
EsOutControlResetPCRCommand::EsOutControlResetPCRCommand() :
AbstractCommand( ES_OUT_PRIVATE_COMMAND_DISCONTINUITY )
{
}
void EsOutControlResetPCRCommand::Execute( es_out_t * )
{
}
/*
* Commands Default Factory
*/
......@@ -179,6 +191,11 @@ EsOutDestroyCommand * CommandsFactory::createEsOutDestroyCommand()
return new (std::nothrow) EsOutDestroyCommand();
}
EsOutControlResetPCRCommand * CommandsFactory::creatEsOutControlResetPCRCommand()
{
return new (std::nothrow) EsOutControlResetPCRCommand();
}
/*
* Commands Queue management
*/
......
......@@ -32,6 +32,7 @@
namespace adaptative
{
class FakeESOut;
class FakeESOutID;
class AbstractCommand
......@@ -113,6 +114,16 @@ namespace adaptative
EsOutDestroyCommand();
};
class EsOutControlResetPCRCommand : public AbstractCommand
{
friend class CommandsFactory;
public:
virtual void Execute( es_out_t *out );
protected:
EsOutControlResetPCRCommand();
};
/* Factory so we can alter behaviour and filter on execution */
class CommandsFactory
{
......@@ -122,6 +133,7 @@ namespace adaptative
virtual EsOutDelCommand * createEsOutDelCommand( FakeESOutID * );
virtual EsOutAddCommand * createEsOutAddCommand( FakeESOutID *, const es_format_t * );
virtual EsOutControlPCRCommand * createEsOutControlPCRCommand( int, mtime_t );
virtual EsOutControlResetPCRCommand * creatEsOutControlResetPCRCommand();
virtual EsOutDestroyCommand * createEsOutDestroyCommand();
};
......
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