1 /*****************************************************************************
2 * libvlc_media_discoverer.h: libvlc external API
3 *****************************************************************************
4 * Copyright (C) 1998-2009 VLC authors and VideoLAN
7 * Authors: Clément Stenac <zorglub@videolan.org>
8 * Jean-Paul Saman <jpsaman@videolan.org>
9 * Pierre d'Herbemont <pdherbemont@videolan.org>
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation; either version 2.1 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this program; if not, write to the Free Software Foundation,
23 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24 *****************************************************************************/
28 * This file defines libvlc_media_discoverer external API
31 #ifndef VLC_LIBVLC_MEDIA_DISCOVERER_H
32 #define VLC_LIBVLC_MEDIA_DISCOVERER_H 1
38 /** \defgroup libvlc_media_discoverer LibVLC media discovery
40 * LibVLC media discovery finds available media via various means.
41 * This corresponds to the service discovery functionality in VLC media player.
42 * Different plugins find potential medias locally (e.g. user media directory),
43 * from peripherals (e.g. video capture device), on the local network
44 * (e.g. SAP) or on the Internet (e.g. Internet radios).
48 typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
51 * \deprecated Use libvlc_media_discoverer_new() and libvlc_media_discoverer_start().
53 LIBVLC_DEPRECATED LIBVLC_API libvlc_media_discoverer_t *
54 libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
55 const char * psz_name );
58 * Create a media discoverer object by name.
60 * After this object is created, you should attach to events in order to be
61 * notified of the discoverer state.
62 * You should also attach to media_list events in order to be notified of new
65 * You need to call libvlc_media_discoverer_start() in order to start the
68 * \see libvlc_media_discoverer_media_list
69 * \see libvlc_media_discoverer_event_manager
70 * \see libvlc_media_discoverer_start
72 * \param p_inst libvlc instance
73 * \param psz_name service name
74 * \return media discover object or NULL in case of error
75 * \version LibVLC 3.0.0 or later
77 LIBVLC_API libvlc_media_discoverer_t *
78 libvlc_media_discoverer_new( libvlc_instance_t * p_inst,
79 const char * psz_name );
82 * Start media discovery.
84 * To stop it, call libvlc_media_discoverer_stop() or
85 * libvlc_media_discoverer_release() directly.
87 * \see libvlc_media_discoverer_stop
89 * \param p_mdis media discover object
90 * \return -1 in case of error, 0 otherwise
91 * \version LibVLC 3.0.0 or later
94 libvlc_media_discoverer_start( libvlc_media_discoverer_t * p_mdis );
97 * Stop media discovery.
99 * \see libvlc_media_discoverer_start
101 * \param p_mdis media discover object
102 * \version LibVLC 3.0.0 or later
105 libvlc_media_discoverer_stop( libvlc_media_discoverer_t * p_mdis );
108 * Release media discover object. If the reference count reaches 0, then
109 * the object will be released.
111 * \param p_mdis media service discover object
113 LIBVLC_API void libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
116 * Get media service discover object its localized name.
118 * \param p_mdis media discover object
119 * \return localized name
121 LIBVLC_API char * libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
124 * Get media service discover media list.
126 * \param p_mdis media service discover object
127 * \return list of media items
129 LIBVLC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
132 * Get event manager from media service discover object.
134 * \param p_mdis media service discover object
135 * \return event manager object.
137 LIBVLC_API libvlc_event_manager_t *
138 libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis );
141 * Query if media service discover object is running.
143 * \param p_mdis media service discover object
144 * \return true if running, false if not
146 * \libvlc_return_bool
149 libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis );
157 #endif /* <vlc/libvlc.h> */