1 /*****************************************************************************
2 * renderer.c : Manage renderer modules
3 *****************************************************************************
4 * Copyright (C) 1999-2017 VLC authors, VideoLAN and VideoLabs
6 * Authors: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
27 #include <vlc_common.h>
28 #include <vlc_playlist.h>
29 #include <vlc_renderer_discovery.h>
31 #include "playlist/playlist_internal.h"
33 int playlist_SetRenderer( playlist_t
* p_playlist
, vlc_renderer_item_t
* p_item
)
36 vlc_renderer_item_hold( p_item
);
40 playlist_private_t
*p_priv
= pl_priv( p_playlist
);
41 vlc_renderer_item_t
*p_prev_renderer
= p_priv
->p_renderer
;
42 p_priv
->p_renderer
= p_item
;
44 input_Control( p_priv
->p_input
, INPUT_SET_RENDERER
, p_item
);
49 vlc_renderer_item_release( p_prev_renderer
);