Commit 7e676a02 authored by Laurent Aimar's avatar Laurent Aimar

Added initial skeleton for es_out timeshift support.

It is not yet functionnal.
parent cdf95dd2
...@@ -309,6 +309,7 @@ SOURCES_libvlc_common = \ ...@@ -309,6 +309,7 @@ SOURCES_libvlc_common = \
input/decoder_synchro.c \ input/decoder_synchro.c \
input/demux.c \ input/demux.c \
input/es_out.c \ input/es_out.c \
input/es_out_timeshift.c \
input/input.c \ input/input.c \
input/meta.c \ input/meta.c \
input/access.h \ input/access.h \
...@@ -316,6 +317,7 @@ SOURCES_libvlc_common = \ ...@@ -316,6 +317,7 @@ SOURCES_libvlc_common = \
input/decoder.h \ input/decoder.h \
input/demux.h \ input/demux.h \
input/es_out.h \ input/es_out.h \
input/es_out_timeshift.h \
input/stream.h \ input/stream.h \
input/input_internal.h \ input/input_internal.h \
input/vlm_internal.h \ input/vlm_internal.h \
......
...@@ -2210,7 +2210,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args ) ...@@ -2210,7 +2210,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
case ES_OUT_SET_FMT: case ES_OUT_SET_ES_FMT:
{ {
/* This ain't pretty but is need by some demuxers (eg. Ogg ) /* This ain't pretty but is need by some demuxers (eg. Ogg )
* to update the p_extra data */ * to update the p_extra data */
......
This diff is collapsed.
/*****************************************************************************
* es_out_timeshift.h: Es Out timeshift.
*****************************************************************************
* Copyright (C) 2008 Laurent Aimar
* $Id$
*
* Authors: Laurent Aimar < fenrir _AT_ via _DOT_ ecp _DOT_ fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
# error This header file can only be included from LibVLC.
#endif
#ifndef _INPUT_ES_OUT_TIMESHIFT_H
#define _INPUT_ES_OUT_TIMESHIFT_H 1
#include <vlc_common.h>
es_out_t *input_EsOutTimeshiftNew( input_thread_t *, es_out_t * );
#endif
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "input_internal.h" #include "input_internal.h"
#include "es_out.h" #include "es_out.h"
#include "es_out_timeshift.h"
#include "access.h" #include "access.h"
#include "demux.h" #include "demux.h"
#include "stream.h" #include "stream.h"
...@@ -200,7 +201,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, ...@@ -200,7 +201,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->p->b_recording = false; p_input->p->b_recording = false;
TAB_INIT( p_input->p->i_bookmark, p_input->p->bookmark ); TAB_INIT( p_input->p->i_bookmark, p_input->p->bookmark );
TAB_INIT( p_input->p->i_attachment, p_input->p->attachment ); TAB_INIT( p_input->p->i_attachment, p_input->p->attachment );
p_input->p->p_es_out_display = p_input->p->p_es_out_display = NULL;
p_input->p->p_es_out = NULL; p_input->p->p_es_out = NULL;
p_input->p->p_sout = NULL; p_input->p->p_sout = NULL;
p_input->p->b_out_pace_control = false; p_input->p->b_out_pace_control = false;
...@@ -1183,8 +1184,8 @@ static int Init( input_thread_t * p_input ) ...@@ -1183,8 +1184,8 @@ static int Init( input_thread_t * p_input )
#endif #endif
/* Create es out */ /* Create es out */
p_input->p->p_es_out =
p_input->p->p_es_out_display = input_EsOutNew( p_input, p_input->p->i_rate ); p_input->p->p_es_out_display = input_EsOutNew( p_input, p_input->p->i_rate );
p_input->p->p_es_out = input_EsOutTimeshiftNew( p_input, p_input->p->p_es_out_display );
es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, false ); es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, false );
es_out_Control( p_input->p->p_es_out, ES_OUT_SET_MODE, ES_OUT_MODE_NONE ); es_out_Control( p_input->p->p_es_out, ES_OUT_SET_MODE, ES_OUT_MODE_NONE );
...@@ -1264,12 +1265,10 @@ static int Init( input_thread_t * p_input ) ...@@ -1264,12 +1265,10 @@ static int Init( input_thread_t * p_input )
error: error:
input_ChangeState( p_input, ERROR_S ); input_ChangeState( p_input, ERROR_S );
if( p_input->p->p_es_out_display )
{
//TODO
}
if( p_input->p->p_es_out ) if( p_input->p->p_es_out )
es_out_Delete( p_input->p->p_es_out ); es_out_Delete( p_input->p->p_es_out );
if( p_input->p->p_es_out_display )
es_out_Delete( p_input->p->p_es_out_display );
#ifdef ENABLE_SOUT #ifdef ENABLE_SOUT
if( p_input->p->p_sout ) if( p_input->p->p_sout )
{ {
...@@ -1357,12 +1356,10 @@ static void End( input_thread_t * p_input ) ...@@ -1357,12 +1356,10 @@ static void End( input_thread_t * p_input )
free( p_input->p->slave ); free( p_input->p->slave );
/* Unload all modules */ /* Unload all modules */
if( p_input->p->p_es_out_display )
{
//TODO
}
if( p_input->p->p_es_out ) if( p_input->p->p_es_out )
es_out_Delete( p_input->p->p_es_out ); es_out_Delete( p_input->p->p_es_out );
if( p_input->p->p_es_out_display )
es_out_Delete( p_input->p->p_es_out_display );
if( !p_input->b_preparsing ) if( !p_input->b_preparsing )
{ {
......
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