Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
23132d75
Commit
23132d75
authored
May 25, 2009
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: Split libvlc_internal in different independant headers.
parent
9e6f5af4
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
440 additions
and
225 deletions
+440
-225
src/Makefile.am
src/Makefile.am
+4
-0
src/control/audio.c
src/control/audio.c
+5
-1
src/control/flat_media_list_view.c
src/control/flat_media_list_view.c
+8
-3
src/control/hierarchical_media_list_view.c
src/control/hierarchical_media_list_view.c
+6
-3
src/control/hierarchical_node_media_list_view.c
src/control/hierarchical_node_media_list_view.c
+7
-3
src/control/libvlc_internal.h
src/control/libvlc_internal.h
+3
-192
src/control/media.c
src/control/media.c
+10
-4
src/control/media_discoverer.c
src/control/media_discoverer.c
+22
-3
src/control/media_internal.h
src/control/media_internal.h
+55
-0
src/control/media_library.c
src/control/media_library.c
+18
-3
src/control/media_list.c
src/control/media_list.c
+12
-3
src/control/media_list_internal.h
src/control/media_list_internal.h
+73
-0
src/control/media_list_path.h
src/control/media_list_path.h
+2
-0
src/control/media_list_player.c
src/control/media_list_player.c
+10
-1
src/control/media_list_view.c
src/control/media_list_view.c
+10
-3
src/control/media_list_view_internal.h
src/control/media_list_view_internal.h
+113
-0
src/control/media_player.c
src/control/media_player.c
+9
-2
src/control/media_player_internal.h
src/control/media_player_internal.h
+62
-0
src/control/mediacontrol_audio_video.c
src/control/mediacontrol_audio_video.c
+2
-0
src/control/video.c
src/control/video.c
+6
-2
src/control/vlm.c
src/control/vlm.c
+3
-2
No files found.
src/Makefile.am
View file @
23132d75
...
...
@@ -427,6 +427,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
\
...
...
src/control/audio.c
View file @
23132d75
...
...
@@ -22,12 +22,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_player.h>
#include <vlc_common.h>
#include <vlc_input.h>
#include <vlc_aout.h>
#include "libvlc_internal.h"
#include "media_player_internal.h"
/*
* Remember to release the returned aout_instance_t since it is locked at
...
...
src/control/flat_media_list_view.c
View file @
23132d75
...
...
@@ -21,10 +21,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <assert.h>
#include "vlc_arrays.h"
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_media_list_view.h>
#include "media_list_view_internal.h"
//#define DEBUG_FLAT_VIEW
...
...
src/control/hierarchical_media_list_view.c
View file @
23132d75
...
...
@@ -21,10 +21,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <assert.h>
#include "vlc_arrays.h"
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_media_list_view.h>
#include "media_list_internal.h"
#include "media_list_view_internal.h"
//#define DEBUG_HIERARCHICAL_VIEW
...
...
src/control/hierarchical_node_media_list_view.c
View file @
23132d75
...
...
@@ -22,10 +22,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <assert.h>
#include "vlc_arrays.h"
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_media_list_view.h>
#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 */
...
...
src/control/libvlc_internal.h
View file @
23132d75
...
...
@@ -29,12 +29,12 @@
# include "config.h"
#endif
#include <vlc/vlc.h>
#include <vlc/libvlc_structures.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_events.h>
#include <vlc_common.h>
#include <vlc_arrays.h>
#include <vlc_input.h>
/***************************************************************************
* 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,119 +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
;
bool
b_own_its_input_thread
;
};
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
*/
...
...
@@ -250,74 +135,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 instance */
libvlc_media_player_t
*
libvlc_media_player_new_from_input_thread
(
libvlc_instance_t
*
,
input_thread_t
*
,
libvlc_exception_t
*
);
void
libvlc_media_player_destroy
(
libvlc_media_player_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
(
...
...
@@ -336,12 +153,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 */
...
...
src/control/media.c
View file @
23132d75
...
...
@@ -21,14 +21,20 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include "libvlc.h"
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h> // For the subitems, here for convenience
#include <vlc/libvlc_events.h>
#include <vlc_common.h>
#include <vlc_input.h>
#include <vlc_meta.h>
#include <vlc_playlist.h>
/* For the preparser */
/* For the preparser */
#include <vlc_playlist.h>
#include "libvlc.h"
#include "libvlc_internal.h"
#include "media_internal.h"
static
const
vlc_meta_type_t
libvlc_to_vlc_meta
[]
=
{
...
...
src/control/media_discoverer.c
View file @
23132d75
...
...
@@ -21,10 +21,29 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <assert.h>
#include "vlc_services_discovery.h"
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_media_discoverer.h>
#include <vlc/libvlc_events.h>
#include <vlc_services_discovery.h>
#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
...
...
src/control/media_internal.h
0 → 100644
View file @
23132d75
/*****************************************************************************
* 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 <zorglub@videolan.org>
*
* 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 <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc_common.h>
#include <vlc_input.h>
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
src/control/media_library.c
View file @
23132d75
...
...
@@ -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 <vlc/libvlc.h>
#include "libvlc.h"
#include "vlc_arrays.h"
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_media_library.h>
#include <vlc/libvlc_events.h>
#include <vlc_common.h>
#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
...
...
src/control/media_list.c
View file @
23132d75
...
...
@@ -21,10 +21,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <assert.h>
#include "vlc_arrays.h"
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_events.h>
#include <vlc_common.h>
#include <vlc_input.h>
#include "libvlc_internal.h"
#include "media_internal.h" // libvlc_media_new_from_input_item()
#include "media_list_internal.h"
typedef
enum
EventPlaceInTime
{
EventWillHappen
,
...
...
src/control/media_list_internal.h
0 → 100644
View file @
23132d75
/*****************************************************************************
* 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 <zorglub@videolan.org>
*
* 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 <vlc/vlc.h>
#include <vlc/libvlc_structures.h>
#include <vlc/libvlc_media.h>
#include <vlc_common.h>
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
src/control/media_list_path.h
View file @
23132d75
...
...
@@ -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)
**************************************************************************/
...
...
src/control/media_list_player.c
View file @
23132d75
...
...
@@ -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 <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_media_player.h>
#include <vlc/libvlc_media_list_player.h>
#include <vlc/libvlc_events.h>
#include "libvlc_internal.h"
#include "media_internal.h" // Abuse, could and should be removed
#include "media_list_path.h"
...
...
src/control/media_list_view.c
View file @
23132d75
...
...
@@ -22,10 +22,17 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <assert.h>
#include "vlc_arrays.h"
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h>
#include <vlc/libvlc_media_list_view.h>
#include <vlc/libvlc_events.h>
#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
...
...
src/control/media_list_view_internal.h
0 → 100644
View file @
23132d75
/*****************************************************************************
* 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 <zorglub@videolan.org>
*
* 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 <vlc/vlc.h>
#include <vlc/libvlc_structures.h>
#include <vlc/libvlc_media_list.h>
#include <vlc_common.h>
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
src/control/media_player.c
View file @
23132d75
...
...
@@ -21,14 +21,21 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include
"libvlc_internal.h"
#include
<assert.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_events.h>
#include <vlc_demux.h>
#include <vlc_input.h>
#include <vlc_vout.h>
#include "libvlc.h"
#include <assert.h>
#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
,
...
...
src/control/media_player_internal.h
0 → 100644
View file @
23132d75
/*****************************************************************************
* 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 <zorglub@videolan.org>
*
* 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 <vlc/vlc.h>
#include <vlc/libvlc_structures.h>
#include <vlc/libvlc_media.h>
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
src/control/mediacontrol_audio_video.c
View file @
23132d75
...
...
@@ -26,11 +26,13 @@
#endif
#include "mediacontrol_internal.h"
#include "libvlc_internal.h"
#include "media_player_internal.h"
#include <vlc/mediacontrol.h>
#include <vlc/libvlc.h>
#include <vlc_vout.h>
#include <vlc_input.h>
#include <vlc_osd.h>
#include <vlc_block.h>
...
...
src/control/video.c
View file @
23132d75
...
...
@@ -25,12 +25,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_player.h>
#include <vlc_common.h>
#include <vlc_input.h>
#include <vlc_vout.h>
#include "media_player_internal.h"
/*
* Remember to release the returned vout_thread_t.
*/
...
...
src/control/vlm.c
View file @
23132d75
...
...
@@ -21,13 +21,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <vlc/libvlc_vlm.h>
#include <vlc_es.h>
#include <vlc_input.h>
#include <vlc_vlm.h>
#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 ) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment