media_internal.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * libvlc_internal.h : Definition of opaque structures for libvlc exported API
00003  * Also contains some internal utility functions
00004  *****************************************************************************
00005  * Copyright (C) 2005-2009 the VideoLAN team
00006  * $Id: c74c7d069d134c4801e4b1d3928c0f5cde8d8b87 $
00007  *
00008  * Authors: Clément Stenac <zorglub@videolan.org>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef _LIBVLC_MEDIA_INTERNAL_H
00026 #define _LIBVLC_MEDIA_INTERNAL_H 1
00027 
00028 #include <vlc/libvlc.h>
00029 #include <vlc/libvlc_media.h>
00030 
00031 #include <vlc_common.h>
00032 #include <vlc_input.h>
00033 
00034 struct libvlc_media_t
00035 {
00036     libvlc_event_manager_t * p_event_manager;
00037     input_item_t      *p_input_item;
00038     int                i_refcount;
00039     libvlc_instance_t *p_libvlc_instance;
00040     libvlc_state_t     state;
00041     VLC_FORWARD_DECLARE_OBJECT(libvlc_media_list_t*) p_subitems; /* A media descriptor can have Sub items. This is the only dependancy we really have on media_list */
00042     void *p_user_data;
00043 
00044     vlc_cond_t parsed_cond;
00045     vlc_mutex_t parsed_lock;
00046 
00047     bool is_parsed;
00048     bool has_asked_preparse;
00049 };
00050 
00051 /* Media Descriptor */
00052 libvlc_media_t * libvlc_media_new_from_input_item(
00053         libvlc_instance_t *, input_item_t * );
00054 
00055 void libvlc_media_set_state( libvlc_media_t *, libvlc_state_t );
00056 
00057 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines