Commit e1c50ab4 authored by Laurent Aimar's avatar Laurent Aimar

Moved input decoder declaration to input/input_decoder.h

parent cd66114b
...@@ -307,6 +307,7 @@ SOURCES_libvlc_common = \ ...@@ -307,6 +307,7 @@ SOURCES_libvlc_common = \
input/input.c \ input/input.c \
input/meta.c \ input/meta.c \
input/input_clock.h \ input/input_clock.h \
input/input_decoder.h \
input/input_internal.h \ input/input_internal.h \
input/vlm_internal.h \ input/vlm_internal.h \
input/stream.c \ input/stream.c \
......
...@@ -44,11 +44,12 @@ ...@@ -44,11 +44,12 @@
#include "audio_output/aout_internal.h" #include "audio_output/aout_internal.h"
#include "stream_output/stream_output.h" #include "stream_output/stream_output.h"
#include "input_internal.h" #include "input_internal.h"
#include "input_decoder.h"
static decoder_t * CreateDecoder( input_thread_t *, es_format_t *, int, sout_instance_t *p_sout ); static decoder_t *CreateDecoder( input_thread_t *, es_format_t *, int, sout_instance_t *p_sout );
static void DeleteDecoder( decoder_t * ); static void DeleteDecoder( decoder_t * );
static void* DecoderThread( vlc_object_t * ); static void *DecoderThread( vlc_object_t * );
static int DecoderDecode( decoder_t * p_dec, block_t *p_block ); static int DecoderDecode( decoder_t * p_dec, block_t *p_block );
/* Buffers allocation callbacks for the decoders */ /* Buffers allocation callbacks for the decoders */
...@@ -1204,7 +1205,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block ) ...@@ -1204,7 +1205,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE ); p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE );
if( p_vout && p_owner->p_spu_vout == p_vout ) if( p_vout && p_owner->p_spu_vout == p_vout )
{ {
/* Prerool does not work very well with subtitle */ /* Preroll does not work very well with subtitle */
if( p_spu->i_start < p_owner->i_preroll_end && if( p_spu->i_start < p_owner->i_preroll_end &&
( p_spu->i_stop <= 0 || p_spu->i_stop < p_owner->i_preroll_end ) ) ( p_spu->i_stop <= 0 || p_spu->i_stop < p_owner->i_preroll_end ) )
{ {
...@@ -1293,7 +1294,7 @@ static void DeleteDecoder( decoder_t * p_dec ) ...@@ -1293,7 +1294,7 @@ static void DeleteDecoder( decoder_t * p_dec )
vout_thread_t *p_vout; vout_thread_t *p_vout;
p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE ); p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE );
if( p_vout ) if( p_vout && p_owner->p_spu_vout == p_vout )
{ {
spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR, spu_Control( p_vout->p_spu, SPU_CHANNEL_CLEAR,
p_owner->i_spu_channel ); p_owner->i_spu_channel );
...@@ -1568,10 +1569,12 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec ) ...@@ -1568,10 +1569,12 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec )
while( i_attempts-- ) while( i_attempts-- )
{ {
if( p_dec->b_die || p_dec->b_error ) break; if( p_dec->b_die || p_dec->b_error )
break;
p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE ); p_vout = vlc_object_find( p_dec, VLC_OBJECT_VOUT, FIND_ANYWHERE );
if( p_vout ) break; if( p_vout )
break;
msleep( VOUT_DISPLAY_DELAY ); msleep( VOUT_DISPLAY_DELAY );
} }
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <vlc_aout.h> #include <vlc_aout.h>
#include "input_internal.h" #include "input_internal.h"
#include "input_decoder.h"
#include "../stream_output/stream_output.h" #include "../stream_output/stream_output.h"
......
/*****************************************************************************
* input_decoder.h: Input decoder functions
*****************************************************************************
* Copyright (C) 1998-2008 the VideoLAN team
* Copyright (C) 2008 Laurent Aimar
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.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_DECODER_H
#define _INPUT_DECODER_H 1
#include <vlc_common.h>
#include <vlc_codec.h>
#define BLOCK_FLAG_CORE_FLUSH (1 <<BLOCK_FLAG_CORE_PRIVATE_SHIFT)
/**
* This functions warn the decoder about a discontinuity and allow flushing
* if requested.
*/
void input_DecoderDiscontinuity( decoder_t * p_dec, bool b_flush );
/**
* This function returns true if the decoder fifo is empty and false otherwise.
*/
bool input_DecoderEmpty( decoder_t * p_dec );
/**
* This function activates the request closed caption channel.
*/
int input_DecoderSetCcState( decoder_t *, bool b_decode, int i_channel );
/**
* This function returns an error if the requested channel does not exist and
* set pb_decode to the channel status(active or not) otherwise.
*/
int input_DecoderGetCcState( decoder_t *, bool *pb_decode, int i_channel );
/**
* This function set each pb_present entry to true if the corresponding channel
* exists or false otherwise.
*/
void input_DecoderIsCcPresent( decoder_t *, bool pb_present[4] );
#endif
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