From: Pierre d'Herbemont Date: Mon, 25 May 2009 08:47:38 +0000 (-0700) Subject: libvlc: Split libvlc_internal in different independant headers. X-Git-Tag: 1.1.0-ff~5786 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5b5a735b1af785b10d7b0e79dab4f24ed8ae9b40;p=vlc libvlc: Split libvlc_internal in different independant headers. --- diff --git a/src/Makefile.am b/src/Makefile.am index d9a8266d11..290ff2c4c3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -437,6 +437,10 @@ SOURCES_libvlc = \ SOURCES_libvlc_control = \ control/libvlc_internal.h \ + control/media_internal.h \ + control/media_list_internal.h \ + control/media_list_view_internal.h \ + control/media_player_internal.h \ control/core.c \ control/log.c \ control/playlist.c \ diff --git a/src/control/audio.c b/src/control/audio.c index ff794a42d4..ce4f96db54 100644 --- a/src/control/audio.c +++ b/src/control/audio.c @@ -22,12 +22,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" #include +#include +#include +#include #include #include +#include "libvlc_internal.h" +#include "media_player_internal.h" /* * Remember to release the returned aout_instance_t since it is locked at diff --git a/src/control/flat_media_list_view.c b/src/control/flat_media_list_view.c index f367e7b8de..e5f51401d6 100644 --- a/src/control/flat_media_list_view.c +++ b/src/control/flat_media_list_view.c @@ -21,10 +21,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" -#include #include -#include "vlc_arrays.h" + +#include +#include +#include +#include + +#include "media_list_view_internal.h" + //#define DEBUG_FLAT_VIEW diff --git a/src/control/hierarchical_media_list_view.c b/src/control/hierarchical_media_list_view.c index 4d345280ff..ee89ba8e55 100644 --- a/src/control/hierarchical_media_list_view.c +++ b/src/control/hierarchical_media_list_view.c @@ -21,10 +21,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" #include -#include -#include "vlc_arrays.h" +#include +#include +#include + +#include "media_list_internal.h" +#include "media_list_view_internal.h" //#define DEBUG_HIERARCHICAL_VIEW diff --git a/src/control/hierarchical_node_media_list_view.c b/src/control/hierarchical_node_media_list_view.c index 6ad50af547..fed48995bc 100644 --- a/src/control/hierarchical_node_media_list_view.c +++ b/src/control/hierarchical_node_media_list_view.c @@ -22,10 +22,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" #include -#include -#include "vlc_arrays.h" +#include +#include +#include + +#include "media_internal.h" // Abuse, could ans should be removed +#include "media_list_internal.h" // Abuse, could ans should be removed +#include "media_list_view_internal.h" /* FIXME: This version is probably a bit overheaded, and we may want to store * the items in a vlc_array_t to speed everything up */ diff --git a/src/control/libvlc_internal.h b/src/control/libvlc_internal.h index 311a859cd7..392bcce89b 100644 --- a/src/control/libvlc_internal.h +++ b/src/control/libvlc_internal.h @@ -29,12 +29,12 @@ # include "config.h" #endif -#include #include +#include +#include +#include #include -#include -#include /*************************************************************************** * Internal creation and destruction functions @@ -51,8 +51,6 @@ VLC_EXPORT (void, libvlc_InternalWait, ( libvlc_int_t * ) ); * Opaque structures for libvlc API ***************************************************************************/ -typedef int * libvlc_media_list_path_t; /* (Media List Player Internal) */ - typedef enum libvlc_lock_state_t { libvlc_Locked, @@ -71,116 +69,6 @@ struct libvlc_instance_t struct libvlc_callback_entry_list_t *p_callback_list; }; -struct libvlc_media_t -{ - libvlc_event_manager_t * p_event_manager; - int b_preparsed; - input_item_t *p_input_item; - int i_refcount; - libvlc_instance_t *p_libvlc_instance; - libvlc_state_t state; - struct libvlc_media_list_t *p_subitems; /* A media descriptor can have - * Sub item */ - void *p_user_data; /* Allows for VLC.framework to hook into media descriptor without creating a new VLCMedia object. */ -}; - -struct libvlc_media_list_t -{ - libvlc_event_manager_t * p_event_manager; - 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. */ - vlc_array_t items; - - /* Other way to see that media list */ - /* Used in flat_media_list.c */ - libvlc_media_list_t * p_flat_mlist; - - /* This indicates if this media list is read-only - * from a user point of view */ - bool b_read_only; -}; - -typedef libvlc_media_list_view_t * (*libvlc_media_list_view_constructor_func_t)( libvlc_media_list_t * p_mlist, libvlc_exception_t * p_e ) ; -typedef void (*libvlc_media_list_view_release_func_t)( libvlc_media_list_view_t * p_mlv ) ; - -typedef int (*libvlc_media_list_view_count_func_t)( libvlc_media_list_view_t * p_mlv, - libvlc_exception_t * ) ; - -typedef libvlc_media_t * - (*libvlc_media_list_view_item_at_index_func_t)( - libvlc_media_list_view_t * p_mlv, - int index, - libvlc_exception_t * ) ; - -typedef libvlc_media_list_view_t * - (*libvlc_media_list_view_children_at_index_func_t)( - libvlc_media_list_view_t * p_mlv, - int index, - libvlc_exception_t * ) ; - -/* A way to see a media list */ -struct libvlc_media_list_view_t -{ - libvlc_event_manager_t * p_event_manager; - libvlc_instance_t * p_libvlc_instance; - int i_refcount; - vlc_mutex_t object_lock; - - libvlc_media_list_t * p_mlist; - - struct libvlc_media_list_view_private_t * p_this_view_data; - - /* Accessors */ - libvlc_media_list_view_count_func_t pf_count; - libvlc_media_list_view_item_at_index_func_t pf_item_at_index; - libvlc_media_list_view_children_at_index_func_t pf_children_at_index; - - libvlc_media_list_view_constructor_func_t pf_constructor; - libvlc_media_list_view_release_func_t pf_release; - - /* Notification callback */ - void (*pf_ml_item_added)(const libvlc_event_t *, libvlc_media_list_view_t *); - void (*pf_ml_item_removed)(const libvlc_event_t *, libvlc_media_list_view_t *); -}; - -struct libvlc_media_player_t -{ - int i_refcount; - vlc_mutex_t object_lock; - input_thread_t * p_input_thread; - struct libvlc_instance_t * p_libvlc_instance; /* Parent instance */ - libvlc_media_t * p_md; /* current media descriptor */ - libvlc_event_manager_t * p_event_manager; - struct - { - void *hwnd; - void *nsobject; - uint32_t xid; - uint32_t agl; - } drawable; -}; - -struct libvlc_media_library_t -{ - libvlc_event_manager_t * p_event_manager; - libvlc_instance_t * p_libvlc_instance; - int i_refcount; - libvlc_media_list_t * p_mlist; -}; - -struct libvlc_media_discoverer_t -{ - libvlc_event_manager_t * p_event_manager; - libvlc_instance_t * p_libvlc_instance; - services_discovery_t * p_sd; - libvlc_media_list_t * p_mlist; - bool running; - vlc_dictionary_t catname_to_submedialist; -}; /* * Event Handling @@ -248,65 +136,6 @@ typedef struct libvlc_event_manager_t /*************************************************************************** * Other internal functions ***************************************************************************/ -input_thread_t *libvlc_get_input_thread( - libvlc_media_player_t *, - libvlc_exception_t * ); - -/* Media Descriptor */ -libvlc_media_t * libvlc_media_new_from_input_item( - libvlc_instance_t *, input_item_t *, - libvlc_exception_t * ); - -void libvlc_media_set_state( - libvlc_media_t *, libvlc_state_t, - libvlc_exception_t * ); - -/* Media List */ -void _libvlc_media_list_add_media( - libvlc_media_list_t * p_mlist, - libvlc_media_t * p_md, - libvlc_exception_t * p_e ); - -void _libvlc_media_list_insert_media( - libvlc_media_list_t * p_mlist, - libvlc_media_t * p_md, int index, - libvlc_exception_t * p_e ); - -void _libvlc_media_list_remove_index( - libvlc_media_list_t * p_mlist, int index, - libvlc_exception_t * p_e ); - -/* Media List View */ -libvlc_media_list_view_t * libvlc_media_list_view_new( - libvlc_media_list_t * p_mlist, - libvlc_media_list_view_count_func_t pf_count, - libvlc_media_list_view_item_at_index_func_t pf_item_at_index, - libvlc_media_list_view_children_at_index_func_t pf_children_at_index, - libvlc_media_list_view_constructor_func_t pf_constructor, - libvlc_media_list_view_release_func_t pf_release, - void * this_view_data, - libvlc_exception_t * p_e ); - -void libvlc_media_list_view_set_ml_notification_callback( - libvlc_media_list_view_t * p_mlv, - void (*item_added)(const libvlc_event_t *, libvlc_media_list_view_t *), - void (*item_removed)(const libvlc_event_t *, libvlc_media_list_view_t *) ); - -void libvlc_media_list_view_will_delete_item( - libvlc_media_list_view_t * p_mlv, - libvlc_media_t * p_item, int index ); - -void libvlc_media_list_view_item_deleted( - libvlc_media_list_view_t * p_mlv, - libvlc_media_t * p_item, int index ); - -void libvlc_media_list_view_will_add_item ( - libvlc_media_list_view_t * p_mlv, - libvlc_media_t * p_item, int index ); - -void libvlc_media_list_view_item_added( - libvlc_media_list_view_t * p_mlv, - libvlc_media_t * p_item, int index ); /* Events */ libvlc_event_manager_t * libvlc_event_manager_new( @@ -325,12 +154,6 @@ void libvlc_event_send( libvlc_event_manager_t * p_em, libvlc_event_t * p_event ); -/* Media player - audio, video */ -libvlc_track_description_t * libvlc_get_track_description( - libvlc_media_player_t *p_mi, - const char *psz_variable, - libvlc_exception_t *p_e ); - /* Exception shorcuts */ diff --git a/src/control/media.c b/src/control/media.c index 400c138bf1..be921277a1 100644 --- a/src/control/media.c +++ b/src/control/media.c @@ -21,14 +21,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" -#include "libvlc.h" #include +#include +#include // For the subitems, here for convenience +#include + +#include #include #include +#include /* For the preparser */ -/* For the preparser */ -#include +#include "libvlc.h" + +#include "libvlc_internal.h" +#include "media_internal.h" static const vlc_meta_type_t libvlc_to_vlc_meta[] = { diff --git a/src/control/media_discoverer.c b/src/control/media_discoverer.c index 4615d5f51f..94b4b0aef6 100644 --- a/src/control/media_discoverer.c +++ b/src/control/media_discoverer.c @@ -21,10 +21,29 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" -#include #include -#include "vlc_services_discovery.h" + +#include +#include +#include +#include +#include + +#include + +#include "libvlc_internal.h" +#include "media_internal.h" // libvlc_media_new_from_input_item() +#include "media_list_internal.h" // _libvlc_media_list_add_media() + +struct libvlc_media_discoverer_t +{ + libvlc_event_manager_t * p_event_manager; + libvlc_instance_t * p_libvlc_instance; + services_discovery_t * p_sd; + libvlc_media_list_t * p_mlist; + bool running; + vlc_dictionary_t catname_to_submedialist; +}; /* * Private functions diff --git a/src/control/media_internal.h b/src/control/media_internal.h new file mode 100644 index 0000000000..48a6fa8fad --- /dev/null +++ b/src/control/media_internal.h @@ -0,0 +1,55 @@ +/***************************************************************************** + * libvlc_internal.h : Definition of opaque structures for libvlc exported API + * Also contains some internal utility functions + ***************************************************************************** + * Copyright (C) 2005-2009 the VideoLAN team + * $Id$ + * + * Authors: Clément Stenac + * + * 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. + *****************************************************************************/ + +#ifndef _LIBVLC_MEDIA_INTERNAL_H +#define _LIBVLC_MEDIA_INTERNAL_H 1 + +#include +#include + +#include +#include + +struct libvlc_media_t +{ + libvlc_event_manager_t * p_event_manager; + int b_preparsed; + input_item_t *p_input_item; + int i_refcount; + libvlc_instance_t *p_libvlc_instance; + libvlc_state_t state; + 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 */ + void *p_user_data; +}; + +/* Media Descriptor */ +libvlc_media_t * libvlc_media_new_from_input_item( + libvlc_instance_t *, input_item_t *, + libvlc_exception_t * ); + +void libvlc_media_set_state( + libvlc_media_t *, libvlc_state_t, + libvlc_exception_t * ); + +#endif diff --git a/src/control/media_library.c b/src/control/media_library.c index a85c1b92e3..7be475f0d4 100644 --- a/src/control/media_library.c +++ b/src/control/media_library.c @@ -21,10 +21,25 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" + #include -#include "libvlc.h" -#include "vlc_arrays.h" +#include +#include +#include +#include + +#include + +#include "libvlc_internal.h" + +struct libvlc_media_library_t +{ + libvlc_event_manager_t * p_event_manager; + libvlc_instance_t * p_libvlc_instance; + int i_refcount; + libvlc_media_list_t * p_mlist; +}; + /* * Private functions diff --git a/src/control/media_list.c b/src/control/media_list.c index e8ae52bb04..5fa32527b7 100644 --- a/src/control/media_list.c +++ b/src/control/media_list.c @@ -21,10 +21,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" -#include #include -#include "vlc_arrays.h" + +#include +#include +#include +#include + +#include +#include + +#include "libvlc_internal.h" +#include "media_internal.h" // libvlc_media_new_from_input_item() +#include "media_list_internal.h" typedef enum EventPlaceInTime { EventWillHappen, diff --git a/src/control/media_list_internal.h b/src/control/media_list_internal.h new file mode 100644 index 0000000000..a9ee2c7ba5 --- /dev/null +++ b/src/control/media_list_internal.h @@ -0,0 +1,73 @@ +/***************************************************************************** + * libvlc_internal.h : Definition of opaque structures for libvlc exported API + * Also contains some internal utility functions + ***************************************************************************** + * Copyright (C) 2005-2009 the VideoLAN team + * $Id$ + * + * Authors: Clément Stenac + * + * 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. + *****************************************************************************/ + +#ifndef _LIBVLC_MEDIA_LIST_INTERNAL_H +#define _LIBVLC_MEDIA_LIST_INTERNAL_H 1 + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include + +#include + +struct libvlc_media_list_t +{ + libvlc_event_manager_t * p_event_manager; + 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. */ + vlc_array_t items; + + /* Other way to see that media list */ + /* Used in flat_media_list.c */ + libvlc_media_list_t * p_flat_mlist; + + /* This indicates if this media list is read-only + * from a user point of view */ + bool b_read_only; +}; + +/* Media List */ +void _libvlc_media_list_add_media( + libvlc_media_list_t * p_mlist, + libvlc_media_t * p_md, + libvlc_exception_t * p_e ); + +void _libvlc_media_list_insert_media( + libvlc_media_list_t * p_mlist, + libvlc_media_t * p_md, int index, + libvlc_exception_t * p_e ); + +void _libvlc_media_list_remove_index( + libvlc_media_list_t * p_mlist, int index, + libvlc_exception_t * p_e ); + +#endif diff --git a/src/control/media_list_path.h b/src/control/media_list_path.h index 00216dad43..a73dbe0beb 100644 --- a/src/control/media_list_path.h +++ b/src/control/media_list_path.h @@ -25,6 +25,8 @@ #ifndef _LIBVLC_MEDIA_LIST_PATH_H #define _LIBVLC_MEDIA_LIST_PATH_H 1 +typedef int * libvlc_media_list_path_t; /* (Media List Player Internal) */ + /************************************************************************** * path_empty (Media List Player Internal) **************************************************************************/ diff --git a/src/control/media_list_player.c b/src/control/media_list_player.c index 19c029eb9a..1ed1af0b32 100644 --- a/src/control/media_list_player.c +++ b/src/control/media_list_player.c @@ -20,8 +20,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" + #include +#include +#include +#include +#include +#include + +#include "libvlc_internal.h" + +#include "media_internal.h" // Abuse, could and should be removed #include "media_list_path.h" diff --git a/src/control/media_list_view.c b/src/control/media_list_view.c index 5ed71d0f9d..62818f8274 100644 --- a/src/control/media_list_view.c +++ b/src/control/media_list_view.c @@ -22,10 +22,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" #include -#include -#include "vlc_arrays.h" +#include +#include +#include +#include + +#include "libvlc_internal.h" // Abuse, could and should be removed + +#include "media_internal.h" // Abuse, could and should be removed +#include "media_list_internal.h" // Abuse, could and should be removed +#include "media_list_view_internal.h" //#define DEBUG_FLAT_LIST diff --git a/src/control/media_list_view_internal.h b/src/control/media_list_view_internal.h new file mode 100644 index 0000000000..b45347889a --- /dev/null +++ b/src/control/media_list_view_internal.h @@ -0,0 +1,113 @@ +/***************************************************************************** + * libvlc_internal.h : Definition of opaque structures for libvlc exported API + * Also contains some internal utility functions + ***************************************************************************** + * Copyright (C) 2005-2009 the VideoLAN team + * $Id$ + * + * Authors: Clément Stenac + * + * 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. + *****************************************************************************/ + +#ifndef LIBVLC_MEDIA_LIST_VIEW_INTERNAL_H +#define LIBVLC_MEDIA_LIST_VIEW_INTERNAL_H 1 + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include + +#include + +typedef libvlc_media_list_view_t * (*libvlc_media_list_view_constructor_func_t)( libvlc_media_list_t * p_mlist, libvlc_exception_t * p_e ) ; +typedef void (*libvlc_media_list_view_release_func_t)( libvlc_media_list_view_t * p_mlv ) ; + +typedef int (*libvlc_media_list_view_count_func_t)( libvlc_media_list_view_t * p_mlv, + libvlc_exception_t * ) ; + +typedef libvlc_media_t * + (*libvlc_media_list_view_item_at_index_func_t)( + libvlc_media_list_view_t * p_mlv, + int index, + libvlc_exception_t * ) ; + +typedef libvlc_media_list_view_t * + (*libvlc_media_list_view_children_at_index_func_t)( + libvlc_media_list_view_t * p_mlv, + int index, + libvlc_exception_t * ) ; + +/* A way to see a media list */ +struct libvlc_media_list_view_t +{ + libvlc_event_manager_t * p_event_manager; + libvlc_instance_t * p_libvlc_instance; + int i_refcount; + vlc_mutex_t object_lock; + + libvlc_media_list_t * p_mlist; + + struct libvlc_media_list_view_private_t * p_this_view_data; + + /* Accessors */ + libvlc_media_list_view_count_func_t pf_count; + libvlc_media_list_view_item_at_index_func_t pf_item_at_index; + libvlc_media_list_view_children_at_index_func_t pf_children_at_index; + + libvlc_media_list_view_constructor_func_t pf_constructor; + libvlc_media_list_view_release_func_t pf_release; + + /* Notification callback */ + void (*pf_ml_item_added)(const libvlc_event_t *, libvlc_media_list_view_t *); + void (*pf_ml_item_removed)(const libvlc_event_t *, libvlc_media_list_view_t *); +}; + +/* Media List View */ +libvlc_media_list_view_t * libvlc_media_list_view_new( + libvlc_media_list_t * p_mlist, + libvlc_media_list_view_count_func_t pf_count, + libvlc_media_list_view_item_at_index_func_t pf_item_at_index, + libvlc_media_list_view_children_at_index_func_t pf_children_at_index, + libvlc_media_list_view_constructor_func_t pf_constructor, + libvlc_media_list_view_release_func_t pf_release, + void * this_view_data, + libvlc_exception_t * p_e ); + +void libvlc_media_list_view_set_ml_notification_callback( + libvlc_media_list_view_t * p_mlv, + void (*item_added)(const libvlc_event_t *, libvlc_media_list_view_t *), + void (*item_removed)(const libvlc_event_t *, libvlc_media_list_view_t *) ); + +void libvlc_media_list_view_will_delete_item( + libvlc_media_list_view_t * p_mlv, + libvlc_media_t * p_item, int index ); + +void libvlc_media_list_view_item_deleted( + libvlc_media_list_view_t * p_mlv, + libvlc_media_t * p_item, int index ); + +void libvlc_media_list_view_will_add_item ( + libvlc_media_list_view_t * p_mlv, + libvlc_media_t * p_item, int index ); + +void libvlc_media_list_view_item_added( + libvlc_media_list_view_t * p_mlv, + libvlc_media_t * p_item, int index ); + +#endif diff --git a/src/control/media_player.c b/src/control/media_player.c index 82fab1e357..da585f3180 100644 --- a/src/control/media_player.c +++ b/src/control/media_player.c @@ -21,14 +21,21 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" +#include #include +#include +#include + #include #include #include + #include "libvlc.h" -#include + +#include "libvlc_internal.h" +#include "media_internal.h" // libvlc_media_set_state() +#include "media_player_internal.h" static int input_seekable_changed( vlc_object_t * p_this, char const * psz_cmd, diff --git a/src/control/media_player_internal.h b/src/control/media_player_internal.h new file mode 100644 index 0000000000..3eeda533aa --- /dev/null +++ b/src/control/media_player_internal.h @@ -0,0 +1,62 @@ +/***************************************************************************** + * libvlc_internal.h : Definition of opaque structures for libvlc exported API + * Also contains some internal utility functions + ***************************************************************************** + * Copyright (C) 2005-2009 the VideoLAN team + * $Id$ + * + * Authors: Clément Stenac + * + * 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. + *****************************************************************************/ + +#ifndef _LIBVLC_MEDIA_PLAYER_INTERNAL_H +#define _LIBVLC_MEDIA_PLAYER_INTERNAL_H 1 + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include + +struct libvlc_media_player_t +{ + int i_refcount; + vlc_mutex_t object_lock; + input_thread_t * p_input_thread; + struct libvlc_instance_t * p_libvlc_instance; /* Parent instance */ + libvlc_media_t * p_md; /* current media descriptor */ + libvlc_event_manager_t * p_event_manager; + struct + { + void *hwnd; + void *nsobject; + uint32_t xid; + uint32_t agl; + } drawable; +}; + +/* Media player - audio, video */ +input_thread_t *libvlc_get_input_thread(libvlc_media_player_t *, libvlc_exception_t * ); + + +libvlc_track_description_t * libvlc_get_track_description( + libvlc_media_player_t *p_mi, + const char *psz_variable, + libvlc_exception_t *p_e ); + +#endif diff --git a/src/control/mediacontrol_audio_video.c b/src/control/mediacontrol_audio_video.c index 401adcfaf5..cb28ccfacb 100644 --- a/src/control/mediacontrol_audio_video.c +++ b/src/control/mediacontrol_audio_video.c @@ -26,11 +26,13 @@ #endif #include "mediacontrol_internal.h" #include "libvlc_internal.h" +#include "media_player_internal.h" #include #include #include +#include #include #include diff --git a/src/control/video.c b/src/control/video.c index 380decdb30..3b79f555f9 100644 --- a/src/control/video.c +++ b/src/control/video.c @@ -25,12 +25,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" - #include +#include +#include + +#include #include #include +#include "media_player_internal.h" + /* * Remember to release the returned vout_thread_t. */ diff --git a/src/control/vlm.c b/src/control/vlm.c index 5c1b15f572..30c598c208 100644 --- a/src/control/vlm.c +++ b/src/control/vlm.c @@ -21,13 +21,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include "libvlc_internal.h" - #include +#include #include #include #include +#include "libvlc_internal.h" + #if 0 /* local function to be used in libvlc_vlm_show_media only */ static char* recurse_answer( char* psz_prefix, vlm_message_t *p_answer ) {