Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
bcc7f49d
Commit
bcc7f49d
authored
Nov 20, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/control: Implement hierarchical_media_list_view.
parent
ade76749
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
128 additions
and
4 deletions
+128
-4
include/vlc/libvlc.h
include/vlc/libvlc.h
+5
-1
src/Makefile.am
src/Makefile.am
+1
-0
src/control/hierarchical_media_list_view.c
src/control/hierarchical_media_list_view.c
+119
-0
src/control/libvlc_internal.h
src/control/libvlc_internal.h
+3
-3
No files found.
include/vlc/libvlc.h
View file @
bcc7f49d
...
...
@@ -526,6 +526,10 @@ VLC_PUBLIC_API libvlc_media_list_view_t *
libvlc_media_list_flat_view
(
libvlc_media_list_t
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
libvlc_media_list_view_t
*
libvlc_media_list_hierarchical_view
(
libvlc_media_list_t
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
libvlc_event_manager_t
*
libvlc_media_list_event_manager
(
libvlc_media_list_t
*
,
libvlc_exception_t
*
);
...
...
src/Makefile.am
View file @
bcc7f49d
...
...
@@ -336,6 +336,7 @@ SOURCES_libvlc_control = \
control/dynamic_media_list.c
\
control/event.c
\
control/flat_media_list_view.c
\
control/hierarchical_media_list_view.c
\
control/media_descriptor.c
\
control/media_instance.c
\
control/media_list.c
\
...
...
src/control/hierarchical_media_list_view.c
0 → 100644
View file @
bcc7f49d
/*****************************************************************************
* hierarchical_media_list_view.c: libvlc hierarchical media list view functs.
*****************************************************************************
* Copyright (C) 2007 the VideoLAN team
* $Id: flat_media_list.c 21287 2007-08-20 01:28:12Z pdherbemont $
*
* Authors: Pierre d'Herbemont <pdherbemont # 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.
*****************************************************************************/
#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <assert.h>
#include "vlc_arrays.h"
//#define DEBUG_HIERARCHICAL_VIEW
#ifdef DEBUG_HIERARCHICAL_VIEW
# define trace( fmt, ... ) printf( "%s(): " fmt, __FUNCTION__, ##__VA_ARGS__ )
#else
# define trace( ... )
#endif
struct
libvlc_media_list_view_private_t
{
vlc_array_t
array
;
};
/*
* Private functions
*/
/**************************************************************************
* flat_media_list_view_count (private)
* (called by media_list_view_count)
**************************************************************************/
static
int
hierarch_media_list_view_count
(
libvlc_media_list_view_t
*
p_mlv
,
libvlc_exception_t
*
p_e
)
{
return
libvlc_media_list_count
(
p_mlv
->
p_mlist
,
p_e
);
}
/**************************************************************************
* flat_media_list_view_item_at_index (private)
* (called by flat_media_list_view_item_at_index)
**************************************************************************/
static
libvlc_media_descriptor_t
*
hierarch_media_list_view_item_at_index
(
libvlc_media_list_view_t
*
p_mlv
,
int
index
,
libvlc_exception_t
*
p_e
)
{
return
libvlc_media_list_item_at_index
(
p_mlv
->
p_mlist
,
index
,
p_e
);
}
/**************************************************************************
* flat_media_list_view_item_at_index (private)
* (called by flat_media_list_view_item_at_index)
**************************************************************************/
static
libvlc_media_list_view_t
*
hierarch_media_list_view_children_at_index
(
libvlc_media_list_view_t
*
p_mlv
,
int
index
,
libvlc_exception_t
*
p_e
)
{
libvlc_media_descriptor_t
*
p_md
;
libvlc_media_list_t
*
p_submlist
;
p_md
=
libvlc_media_list_item_at_index
(
p_mlv
->
p_mlist
,
index
,
p_e
);
if
(
!
p_md
)
return
NULL
;
p_submlist
=
libvlc_media_descriptor_subitems
(
p_md
,
p_e
);
if
(
!
p_submlist
)
return
NULL
;
return
libvlc_media_list_hierarchical_view
(
p_submlist
,
p_e
);
}
/**************************************************************************
* flat_media_list_view_release (private)
* (called by media_list_view_release)
**************************************************************************/
static
void
hierarch_media_list_view_release
(
libvlc_media_list_view_t
*
p_mlv
)
{
}
/*
* Public libvlc functions
*/
/**************************************************************************
* libvlc_media_list_flat_view (Public)
**************************************************************************/
libvlc_media_list_view_t
*
libvlc_media_list_hierarchical_view
(
libvlc_media_list_t
*
p_mlist
,
libvlc_exception_t
*
p_e
)
{
trace
(
"
\n
"
);
libvlc_media_list_view_t
*
p_mlv
;
libvlc_media_list_lock
(
p_mlist
);
p_mlv
=
libvlc_media_list_view_new
(
p_mlist
,
hierarch_media_list_view_count
,
hierarch_media_list_view_item_at_index
,
hierarch_media_list_view_children_at_index
,
hierarch_media_list_view_release
,
NULL
,
p_e
);
libvlc_media_list_unlock
(
p_mlist
);
return
p_mlv
;
}
src/control/libvlc_internal.h
View file @
bcc7f49d
...
...
@@ -152,8 +152,8 @@ struct libvlc_media_list_view_t
libvlc_media_list_view_release_func_t
pf_release
;
/* Notification callback */
void
(
*
pf_ml_item_added
)(
const
libvlc_event_t
*
,
void
*
);
void
(
*
pf_ml_item_removed
)(
const
libvlc_event_t
*
,
void
*
);
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_dynamic_media_list_t
...
...
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