/*****************************************************************************
* vlc_input_item.h: Core input item
*****************************************************************************
- * Copyright (C) 1999-2009 the VideoLAN team
+ * Copyright (C) 1999-2009 VLC authors and VideoLAN
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* 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
+ * 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
* (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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser 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.
+ * 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.
*****************************************************************************/
#ifndef VLC_INPUT_ITEM_H
struct input_item_t
{
- VLC_GC_MEMBERS
int i_id; /**< Identifier of the item */
char *psz_name; /**< text describing this item */
INPUT_META(EncodedBy)
INPUT_META(ArtworkURL)
INPUT_META(TrackID)
+INPUT_META(TrackTotal)
#define input_item_SetTrackNum input_item_SetTrackNumber
#define input_item_GetTrackNum input_item_GetTrackNumber
*/
VLC_API input_item_t * input_item_Copy(input_item_t * ) VLC_USED;
+/** Holds an input item, i.e. creates a new reference. */
+VLC_API input_item_t *input_item_Hold(input_item_t *);
+
+/** Releases an input item, i.e. decrements its reference counter. */
+VLC_API void input_item_Release(input_item_t *);
+
+/* Historical hack... */
+#define vlc_gc_incref(i) input_item_Hold(i)
+#define vlc_gc_decref(i) input_item_Release(i)
/******************
* Input stats