input_interface.h 3.32 KB
Newer Older
1
/*****************************************************************************
Pierre Ynard's avatar
Pierre Ynard committed
2
 * input_interface.h: Input functions usable outside input code.
3
 *****************************************************************************
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
4
 * Copyright (C) 1998-2008 VLC authors and VideoLAN
5 6 7 8
 * $Id$
 *
 * Authors: Laurent Aimar < fenrir _AT_ videolan _DOT_ org >
 *
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
9 10 11
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
12 13 14 15
 * (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
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
16 17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
18
 *
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
19 20 21
 * You should have received a copy of the GNU Lesser 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.
22 23
 *****************************************************************************/

24 25
#ifndef LIBVLC_INPUT_INTERFACE_H
#define LIBVLC_INPUT_INTERFACE_H 1
26 27 28 29 30 31 32

#include <vlc_input.h>
#include <libvlc.h>

/**********************************************************************
 * Item metadata
 **********************************************************************/
33
void input_item_SignalPreparseEnded( input_item_t *p_i, int new_status );
34 35 36
void input_item_SetPreparsed( input_item_t *p_i, bool b_preparsed );
void input_item_SetArtNotFound( input_item_t *p_i, bool b_not_found );
void input_item_SetArtFetched( input_item_t *p_i, bool b_art_fetched );
37 38
void input_item_SetEpg( input_item_t *p_item, const vlc_epg_t *p_epg, bool );
void input_item_ChangeEPGSource( input_item_t *p_item, int i_source_id );
39
void input_item_SetEpgEvent( input_item_t *p_item, const vlc_epg_event_t *p_epg_evt );
Laurent Aimar's avatar
Laurent Aimar committed
40
void input_item_SetEpgOffline( input_item_t * );
41

42 43 44 45 46 47 48 49 50 51 52 53 54
/**
 * Creates an item preparser.
 *
 * Creates an input thread to preparse an item. The input needs to be started
 * with input_Start() afterwards.
 *
 * @param obj parent object
 * @param item input item to preparse
 * @return an input thread or NULL on error
 */
input_thread_t *input_CreatePreparser(vlc_object_t *obj, input_item_t *item)
VLC_USED;

55 56 57 58
/* misc/stats.c
 * FIXME it should NOT be defined here or not coded in misc/stats.c */
input_stats_t *stats_NewInputStats( input_thread_t *p_input );

59
/**
60
 * This function deletes the current sout in the resources.
61
 */
62
void input_resource_TerminateSout( input_resource_t *p_resource );
63

64
/**
65
 * This function return true if there is at least one vout in the resources.
66
 *
67
 * It can only be called on detached resources.
68
 */
69
bool input_resource_HasVout( input_resource_t *p_resource );
70

71 72
/* input.c */

73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
/* */
typedef enum
{
    INPUT_STATISTIC_DECODED_VIDEO,
    INPUT_STATISTIC_DECODED_AUDIO,
    INPUT_STATISTIC_DECODED_SUBTITLE,

    /* Use them only if you do not goes through a access_out module */
    INPUT_STATISTIC_SENT_PACKET,
    INPUT_STATISTIC_SENT_BYTE,

} input_statistic_t;
/**
 * It will update internal input statistics from external sources.
 * XXX For now, the only one allowed to do it is stream_out and input core.
 */
void input_UpdateStatistic( input_thread_t *, input_statistic_t, int i_delta );

91
#endif