-/*****************************************************************************
- * Demux: do what the command says
- *****************************************************************************/
-static int Demux( demux_t *p_demux )
-{
- demux_sys_t *p_sys = p_demux->p_sys;
- bool b_eof = false;
-
- switch( p_sys->i_command )
- {
- case COMMAND_QUIT:
- b_eof = true;
- libvlc_Quit( p_demux->p_libvlc );
- break;
-
- case COMMAND_PAUSE:
- if( mdate() >= p_sys->expiration )
- b_eof = true;
- else
- msleep( 10000 );
- break;
-
- case COMMAND_NOP:
- default:
- b_eof = true;
- break;
- }
-
- return b_eof ? 0 : 1;
-}
-