Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Steve Lhomme
vlc
Commits
20196581
Commit
20196581
authored
Jul 19, 2017
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: Add playlist_SetRenderer
refs #18605
parent
f7ef0752
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
0 deletions
+65
-0
include/vlc_playlist.h
include/vlc_playlist.h
+8
-0
src/Makefile.am
src/Makefile.am
+1
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/playlist/engine.c
src/playlist/engine.c
+3
-0
src/playlist/playlist_internal.h
src/playlist/playlist_internal.h
+1
-0
src/playlist/renderer.c
src/playlist/renderer.c
+51
-0
No files found.
include/vlc_playlist.h
View file @
20196581
...
...
@@ -358,6 +358,14 @@ VLC_API bool playlist_IsServicesDiscoveryLoaded( playlist_t *,const char *) VLC_
/** Query a services discovery */
VLC_API
int
playlist_ServicesDiscoveryControl
(
playlist_t
*
,
const
char
*
,
int
,
...
);
/********************** Renderer ***********************/
/**
* Sets a renderer or remove the current one
* @param p_item The renderer item to be used, or NULL to disable the current
* one. If a renderer is provided, its reference count will be
* incremented.
*/
VLC_API
int
playlist_SetRenderer
(
playlist_t
*
p_pl
,
vlc_renderer_item_t
*
p_item
);
/********************************************************
...
...
src/Makefile.am
View file @
20196581
...
...
@@ -225,6 +225,7 @@ libvlccore_la_SOURCES = \
playlist/item.c
\
playlist/search.c
\
playlist/services_discovery.c
\
playlist/renderer.c
\
input/item.c
\
input/access.c
\
input/clock.c
\
...
...
src/libvlccore.sym
View file @
20196581
...
...
@@ -362,6 +362,7 @@ playlist_VolumeSet
playlist_VolumeUp
playlist_MuteSet
playlist_MuteGet
playlist_SetRenderer
sdp_AddAttribute
sdp_AddMedia
secstotimestr
...
...
src/playlist/engine.c
View file @
20196581
...
...
@@ -34,6 +34,7 @@
#include <vlc_playlist.h>
#include <vlc_interface.h>
#include <vlc_http.h>
#include <vlc_renderer_discovery.h>
#include "playlist_internal.h"
#include "input/resource.h"
...
...
@@ -310,6 +311,8 @@ void playlist_Destroy( playlist_t *p_playlist )
/* Release input resources */
assert
(
p_sys
->
p_input
==
NULL
);
input_resource_Release
(
p_sys
->
p_input_resource
);
if
(
p_sys
->
p_renderer
)
vlc_renderer_item_release
(
p_sys
->
p_renderer
);
if
(
p_playlist
->
p_media_library
!=
NULL
)
playlist_MLDump
(
p_playlist
);
...
...
src/playlist/playlist_internal.h
View file @
20196581
...
...
@@ -58,6 +58,7 @@ typedef struct playlist_private_t
input_thread_t
*
p_input
;
/**< the input thread associated
* with the current item */
input_resource_t
*
p_input_resource
;
/**< input resources */
vlc_renderer_item_t
*
p_renderer
;
struct
{
/* Current status. These fields are readonly, only the playlist
* main loop can touch it*/
...
...
src/playlist/renderer.c
0 → 100644
View file @
20196581
/*****************************************************************************
* renderer.c : Manage renderer modules
*****************************************************************************
* Copyright (C) 1999-2017 VLC authors, VideoLAN and VideoLabs
*
* Authors: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser 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.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_playlist.h>
#include <vlc_renderer_discovery.h>
#include "playlist/playlist_internal.h"
int
playlist_SetRenderer
(
playlist_t
*
p_playlist
,
vlc_renderer_item_t
*
p_item
)
{
if
(
p_item
)
vlc_renderer_item_hold
(
p_item
);
PL_LOCK
;
playlist_private_t
*
p_priv
=
pl_priv
(
p_playlist
);
vlc_renderer_item_t
*
p_prev_renderer
=
p_priv
->
p_renderer
;
p_priv
->
p_renderer
=
p_item
;
if
(
p_priv
->
p_input
)
input_Control
(
p_priv
->
p_input
,
INPUT_SET_RENDERER
,
p_item
);
PL_UNLOCK
;
if
(
p_prev_renderer
)
vlc_renderer_item_release
(
p_prev_renderer
);
return
VLC_SUCCESS
;
}
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