media_list_internal.h 2.45 KB
Newer Older
1
/*****************************************************************************
Pere Orga's avatar
Pere Orga committed
2
 * media_list_internal.h : Definition of opaque structures for libvlc exported API
3 4
 * Also contains some internal utility functions
 *****************************************************************************
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
5
 * Copyright (C) 2005-2009 VLC authors and VideoLAN
6 7 8 9
 * $Id$
 *
 * Authors: Clément Stenac <zorglub@videolan.org>
 *
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
10 11 12
 * 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
13 14 15 16
 * (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
Jean-Baptiste Kempf committed
17 18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
19
 *
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
20 21 22
 * 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.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
 *****************************************************************************/

#ifndef _LIBVLC_MEDIA_LIST_INTERNAL_H
#define _LIBVLC_MEDIA_LIST_INTERNAL_H 1

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <vlc/vlc.h>
#include <vlc/libvlc_media.h>

#include <vlc_common.h>

struct libvlc_media_list_t
{
39
    libvlc_event_manager_t      event_manager;
40 41 42 43 44 45
    libvlc_instance_t *         p_libvlc_instance;
    int                         i_refcount;
    vlc_mutex_t                 object_lock;
    vlc_mutex_t                 refcount_lock;
    libvlc_media_t * p_md; /* The media from which the
                                       * mlist comes, if any. */
46
    libvlc_media_t * p_internal_md; /* media set from media.c */
47 48 49 50 51 52 53 54
    vlc_array_t                items;

    /* This indicates if this media list is read-only
     * from a user point of view */
    bool                  b_read_only;
};

/* Media List */
55
void libvlc_media_list_internal_add_media(
56
        libvlc_media_list_t * p_mlist,
57
        libvlc_media_t * p_md );
58

59
void libvlc_media_list_internal_insert_media(
60
        libvlc_media_list_t * p_mlist,
61
        libvlc_media_t * p_md, int index );
62

63
int libvlc_media_list_internal_remove_index(
64
        libvlc_media_list_t * p_mlist, int index );
65

66 67
void libvlc_media_list_internal_end_reached(
        libvlc_media_list_t * p_mlist );
68
#endif