Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d919d75e
Commit
d919d75e
authored
Nov 23, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control/flat_media_list_view.c: Import pre existing md in the view.
parent
61b9fc22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
src/control/flat_media_list_view.c
src/control/flat_media_list_view.c
+30
-1
No files found.
src/control/flat_media_list_view.c
View file @
d919d75e
...
...
@@ -129,6 +129,33 @@ flat_media_list_view_release( libvlc_media_list_view_t * p_mlv )
* Public libvlc functions
*/
/* Little helper */
static
void
import_mlist_rec
(
libvlc_media_list_view_t
*
p_mlv
,
libvlc_media_list_t
*
p_mlist
,
libvlc_exception_t
*
p_e
)
{
int
i
,
count
;
count
=
libvlc_media_list_count
(
p_mlist
,
p_e
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
libvlc_media_descriptor_t
*
p_md
;
libvlc_media_list_t
*
p_submlist
;
p_md
=
libvlc_media_list_item_at_index
(
p_mlist
,
i
,
p_e
);
vlc_array_append
(
&
p_mlv
->
p_this_view_data
->
array
,
p_md
);
p_submlist
=
libvlc_media_descriptor_subitems
(
p_md
,
p_e
);
if
(
p_submlist
)
{
libvlc_media_list_lock
(
p_submlist
);
import_mlist_rec
(
p_mlv
,
p_submlist
,
p_e
);
libvlc_media_list_unlock
(
p_submlist
);
libvlc_media_list_release
(
p_submlist
);
}
/* No need to release the md, as we want to retain it, as it is
* stored in our array */
}
}
/**************************************************************************
* libvlc_media_list_flat_view (Public)
**************************************************************************/
...
...
@@ -138,7 +165,6 @@ libvlc_media_list_flat_view( libvlc_media_list_t * p_mlist,
{
trace
(
"
\n
"
);
libvlc_media_list_view_t
*
p_mlv
;
libvlc_media_list_lock
(
p_mlist
);
struct
libvlc_media_list_view_private_t
*
p_this_view_data
;
p_this_view_data
=
malloc
(
sizeof
(
struct
libvlc_media_list_view_private_t
));
vlc_array_init
(
&
p_this_view_data
->
array
);
...
...
@@ -149,9 +175,12 @@ libvlc_media_list_flat_view( libvlc_media_list_t * p_mlist,
flat_media_list_view_release
,
p_this_view_data
,
p_e
);
libvlc_media_list_lock
(
p_mlist
);
import_mlist_rec
(
p_mlv
,
p_mlist
,
p_e
);
libvlc_media_list_view_set_ml_notification_callback
(
p_mlv
,
ml_item_added
,
ml_item_removed
);
libvlc_media_list_unlock
(
p_mlist
);
return
p_mlv
;
}
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