Commit 5516468f authored by Thomas Guillem's avatar Thomas Guillem

renderer: add missing "_t"

Bad habit but it's for the sake of coherence.
parent 24dd39cd
......@@ -208,8 +208,8 @@ typedef struct playlist_item_t playlist_item_t;
typedef struct services_discovery_t services_discovery_t;
typedef struct services_discovery_sys_t services_discovery_sys_t;
typedef struct playlist_add_t playlist_add_t;
typedef struct vlc_renderer_discovery vlc_renderer_discovery;
typedef struct vlc_renderer_item vlc_renderer_item;
typedef struct vlc_renderer_discovery_t vlc_renderer_discovery_t;
typedef struct vlc_renderer_item_t vlc_renderer_item_t;
/* Modules */
typedef struct module_t module_t;
......
......@@ -205,11 +205,11 @@ typedef struct vlc_event_t
/* Renderer discovery events */
struct vlc_renderer_discovery_item_added
{
vlc_renderer_item * p_new_item;
vlc_renderer_item_t * p_new_item;
} renderer_discovery_item_added;
struct vlc_renderer_discovery_item_removed
{
vlc_renderer_item * p_item;
vlc_renderer_item_t * p_item;
} renderer_discovery_item_removed;
/* Addons */
......
......@@ -37,8 +37,6 @@
* @{
*/
typedef struct vlc_renderer_item vlc_renderer_item;
#define VLC_RENDERER_CAN_AUDIO 0x0001
#define VLC_RENDERER_CAN_VIDEO 0x0002
......@@ -53,7 +51,7 @@ typedef struct vlc_renderer_item vlc_renderer_item;
* @param i_flags flags for the item
* @return a renderer item or NULL in case of error
*/
VLC_API vlc_renderer_item *
VLC_API vlc_renderer_item_t *
vlc_renderer_item_new(const char *psz_name, const char *psz_uri,
const char *psz_extra_sout, const char *psz_icon_uri,
int i_flags) VLC_USED;
......@@ -61,38 +59,38 @@ vlc_renderer_item_new(const char *psz_name, const char *psz_uri,
/**
* Hold a renderer item, i.e. creates a new reference
*/
VLC_API vlc_renderer_item *
vlc_renderer_item_hold(vlc_renderer_item *p_item);
VLC_API vlc_renderer_item_t *
vlc_renderer_item_hold(vlc_renderer_item_t *p_item);
/**
* Releases a renderer item, i.e. decrements its reference counter
*/
VLC_API void
vlc_renderer_item_release(vlc_renderer_item *p_item);
vlc_renderer_item_release(vlc_renderer_item_t *p_item);
/**
* Get the human readable name of a renderer item
*/
VLC_API const char *
vlc_renderer_item_name(const vlc_renderer_item *p_item);
vlc_renderer_item_name(const vlc_renderer_item_t *p_item);
/**
* Get the sout command of a renderer item
*/
VLC_API const char *
vlc_renderer_item_sout(const vlc_renderer_item *p_item);
vlc_renderer_item_sout(const vlc_renderer_item_t *p_item);
/**
* Get the icon uri of a renderer item
*/
VLC_API const char *
vlc_renderer_item_icon_uri(const vlc_renderer_item *p_item);
vlc_renderer_item_icon_uri(const vlc_renderer_item_t *p_item);
/**
* Get the flags of a renderer item
*/
VLC_API int
vlc_renderer_item_flags(const vlc_renderer_item *p_item);
vlc_renderer_item_flags(const vlc_renderer_item_t *p_item);
/**
* @}
......@@ -100,7 +98,6 @@ vlc_renderer_item_flags(const vlc_renderer_item *p_item);
* @{
*/
typedef struct vlc_renderer_discovery vlc_renderer_discovery;
typedef struct vlc_renderer_discovery_sys vlc_renderer_discovery_sys;
/**
......@@ -127,7 +124,7 @@ vlc_rd_get_names(vlc_object_t *p_obj, char ***pppsz_names,
* @return a valid vlc_renderer_discovery, need to be released with
* vlc_rd_release()
*/
VLC_API vlc_renderer_discovery *
VLC_API vlc_renderer_discovery_t *
vlc_rd_new(vlc_object_t *p_obj, const char *psz_name) VLC_USED;
#define vlc_rd_release(p_rd) vlc_object_release(p_rd)
......@@ -139,22 +136,22 @@ vlc_rd_new(vlc_object_t *p_obj, const char *psz_name) VLC_USED;
* @see vlc_RendererDiscoveryItemRemoved
*/
VLC_API vlc_event_manager_t *
vlc_rd_event_manager(vlc_renderer_discovery *p_rd);
vlc_rd_event_manager(vlc_renderer_discovery_t *p_rd);
/**
* Start the renderer discovery module
*
* Once started, the module can send new vlc_renderer_item via the
* Once started, the module can send new vlc_renderer_item_t via the
* vlc_RendererDiscoveryItemAdded event.
*/
VLC_API int
vlc_rd_start(vlc_renderer_discovery *p_rd);
vlc_rd_start(vlc_renderer_discovery_t *p_rd);
/**
* Stop the renderer discovery module
*/
VLC_API void
vlc_rd_stop(vlc_renderer_discovery *p_rd);
vlc_rd_stop(vlc_renderer_discovery_t *p_rd);
/**
* @}
......@@ -162,7 +159,7 @@ vlc_rd_stop(vlc_renderer_discovery *p_rd);
* @{
*/
struct vlc_renderer_discovery
struct vlc_renderer_discovery_t
{
VLC_COMMON_MEMBERS
module_t * p_module;
......@@ -181,7 +178,7 @@ struct vlc_renderer_discovery
* This will send the vlc_RendererDiscoveryItemAdded event
*/
VLC_API void
vlc_rd_add_item(vlc_renderer_discovery * p_rd, vlc_renderer_item * p_item);
vlc_rd_add_item(vlc_renderer_discovery_t * p_rd, vlc_renderer_item_t * p_item);
/**
* Add a new renderer item
......@@ -189,7 +186,7 @@ vlc_rd_add_item(vlc_renderer_discovery * p_rd, vlc_renderer_item * p_item);
* This will send the vlc_RendererDiscoveryItemRemoved event
*/
VLC_API void
vlc_rd_remove_item(vlc_renderer_discovery * p_rd, vlc_renderer_item * p_item);
vlc_rd_remove_item(vlc_renderer_discovery_t * p_rd, vlc_renderer_item_t * p_item);
/**
* Renderer Discovery proble helpers
......
......@@ -250,7 +250,7 @@ void ActionsManager::renderer_event_received( const vlc_event_t * p_event, void
if ( p_event->type == vlc_RendererDiscoveryItemAdded )
{
vlc_renderer_item *p_item = p_event->u.renderer_discovery_item_added.p_new_item;
vlc_renderer_item_t *p_item = p_event->u.renderer_discovery_item_added.p_new_item;
QAction *firstSeparator = NULL;
foreach (QAction* action, VLCMenuBar::rendererMenu->actions())
......
......@@ -74,7 +74,7 @@ private:
virtual ~ActionsManager();
intf_thread_t *p_intf;
vlc_renderer_discovery *p_rd;
vlc_renderer_discovery_t *p_rd;
bool b_rd_started;
static void renderer_event_received( const vlc_event_t * p_event, void * user_data );
......
......@@ -111,7 +111,7 @@ struct item
{
char * psz_uri;
input_item_t * p_input_item;
vlc_renderer_item * p_renderer_item;
vlc_renderer_item_t*p_renderer_item;
mtime_t i_last_seen;
};
......@@ -181,7 +181,7 @@ items_add_input( struct discovery_sys *p_sys, services_discovery_t *p_sd,
}
static int
items_add_renderer( struct discovery_sys *p_sys, vlc_renderer_discovery *p_rd,
items_add_renderer( struct discovery_sys *p_sys, vlc_renderer_discovery_t *p_rd,
const char *psz_name, char *psz_uri,
const char *psz_icon_uri, int i_flags )
{
......@@ -191,7 +191,7 @@ items_add_renderer( struct discovery_sys *p_sys, vlc_renderer_discovery *p_rd,
const char *psz_extra_uri = i_flags & VLC_RENDERER_CAN_VIDEO ? NULL : "video=0";
vlc_renderer_item *p_renderer_item =
vlc_renderer_item_t *p_renderer_item =
vlc_renderer_item_new( psz_name, psz_uri, psz_extra_uri, psz_icon_uri, i_flags );
if( p_renderer_item == NULL )
{
......@@ -245,7 +245,7 @@ items_exists( struct discovery_sys *p_sys, const char *psz_uri )
static void
items_timeout( struct discovery_sys *p_sys, services_discovery_t *p_sd,
vlc_renderer_discovery *p_rd )
vlc_renderer_discovery_t *p_rd )
{
mtime_t i_now = mdate();
......@@ -437,7 +437,7 @@ RunSD( void *p_this )
static void
new_entries_rd_cb( void *p_this, int i_status, const struct rr_entry *p_entries )
{
vlc_renderer_discovery *p_rd = (vlc_renderer_discovery *)p_this;
vlc_renderer_discovery_t *p_rd = (vlc_renderer_discovery_t *)p_this;
struct discovery_sys *p_sys = &p_rd->p_sys->s;
if( i_status < 0 )
{
......@@ -519,7 +519,7 @@ new_entries_rd_cb( void *p_this, int i_status, const struct rr_entry *p_entries
static bool
stop_rd_cb( void *p_this )
{
vlc_renderer_discovery *p_rd = ( vlc_renderer_discovery* )p_this;
vlc_renderer_discovery_t *p_rd = p_this;
struct discovery_sys *p_sys = &p_rd->p_sys->s;
if( atomic_load( &p_sys->stop ) )
......@@ -534,7 +534,7 @@ stop_rd_cb( void *p_this )
static void *
RunRD( void *p_this )
{
vlc_renderer_discovery *p_rd = ( vlc_renderer_discovery* )p_this;
vlc_renderer_discovery_t *p_rd = p_this;
struct discovery_sys *p_sys = &p_rd->p_sys->s;
int i_status = mdns_listen( p_sys->p_microdns,
......@@ -632,7 +632,7 @@ CloseSD( vlc_object_t *p_this )
static int
OpenRD( vlc_object_t *p_obj )
{
vlc_renderer_discovery *p_rd = (vlc_renderer_discovery *)p_obj;
vlc_renderer_discovery_t *p_rd = (vlc_renderer_discovery_t *)p_obj;
p_rd->p_sys = calloc( 1, sizeof(vlc_renderer_discovery_sys) );
if( !p_rd->p_sys )
......@@ -646,7 +646,7 @@ OpenRD( vlc_object_t *p_obj )
static void
CloseRD( vlc_object_t *p_this )
{
vlc_renderer_discovery *p_rd = (vlc_renderer_discovery *) p_this;
vlc_renderer_discovery_t *p_rd = (vlc_renderer_discovery_t *) p_this;
CleanCommon( &p_rd->p_sys->s );
free( p_rd->p_sys );
......
......@@ -32,7 +32,7 @@
#include <vlc_modules.h>
#include <libvlc.h>
struct vlc_renderer_item
struct vlc_renderer_item_t
{
char *psz_name;
char *psz_sout;
......@@ -41,20 +41,20 @@ struct vlc_renderer_item
atomic_uint refs;
};
vlc_renderer_item *
vlc_renderer_item_t *
vlc_renderer_item_new(const char *psz_name, const char *psz_uri,
const char *psz_extra_sout, const char *psz_icon_uri,
int i_flags)
{
assert(psz_uri != NULL);
vlc_renderer_item *p_item = NULL;
vlc_renderer_item_t *p_item = NULL;
vlc_url_t url;
vlc_UrlParse(&url, psz_uri);
if (url.psz_protocol == NULL || url.psz_host == NULL)
goto error;
p_item = calloc(1, sizeof(vlc_renderer_item));
p_item = calloc(1, sizeof(vlc_renderer_item_t));
if (unlikely(p_item == NULL))
goto error;
......@@ -93,7 +93,7 @@ error:
}
const char *
vlc_renderer_item_name(const vlc_renderer_item *p_item)
vlc_renderer_item_name(const vlc_renderer_item_t *p_item)
{
assert(p_item != NULL);
......@@ -101,7 +101,7 @@ vlc_renderer_item_name(const vlc_renderer_item *p_item)
}
const char *
vlc_renderer_item_sout(const vlc_renderer_item *p_item)
vlc_renderer_item_sout(const vlc_renderer_item_t *p_item)
{
assert(p_item != NULL);
......@@ -109,7 +109,7 @@ vlc_renderer_item_sout(const vlc_renderer_item *p_item)
}
const char *
vlc_renderer_item_icon_uri(const vlc_renderer_item *p_item)
vlc_renderer_item_icon_uri(const vlc_renderer_item_t *p_item)
{
assert(p_item != NULL);
......@@ -117,15 +117,15 @@ vlc_renderer_item_icon_uri(const vlc_renderer_item *p_item)
}
int
vlc_renderer_item_flags(const vlc_renderer_item *p_item)
vlc_renderer_item_flags(const vlc_renderer_item_t *p_item)
{
assert(p_item != NULL);
return p_item->i_flags;
}
vlc_renderer_item *
vlc_renderer_item_hold(vlc_renderer_item *p_item)
vlc_renderer_item_t *
vlc_renderer_item_hold(vlc_renderer_item_t *p_item)
{
assert(p_item != NULL);
......@@ -134,7 +134,7 @@ vlc_renderer_item_hold(vlc_renderer_item *p_item)
}
void
vlc_renderer_item_release(vlc_renderer_item *p_item)
vlc_renderer_item_release(vlc_renderer_item_t *p_item)
{
assert(p_item != NULL);
......@@ -208,7 +208,7 @@ vlc_rd_get_names(vlc_object_t *p_obj, char ***pppsz_names,
static void
rd_destructor(vlc_object_t *p_obj)
{
vlc_renderer_discovery * p_rd =(vlc_renderer_discovery *)p_obj;
vlc_renderer_discovery_t * p_rd =(vlc_renderer_discovery_t *)p_obj;
assert(!p_rd->p_module); /* Forgot to call Stop */
config_ChainDestroy(p_rd->p_cfg);
......@@ -216,10 +216,10 @@ rd_destructor(vlc_object_t *p_obj)
vlc_event_manager_fini(&p_rd->event_manager);
}
vlc_renderer_discovery *
vlc_renderer_discovery_t *
vlc_rd_new(vlc_object_t *p_obj, const char *psz_name)
{
vlc_renderer_discovery *p_rd;
vlc_renderer_discovery_t *p_rd;
p_rd = vlc_custom_create(p_obj, sizeof(*p_rd), "renderer discovery");
if(!p_rd)
......@@ -236,13 +236,13 @@ vlc_rd_new(vlc_object_t *p_obj, const char *psz_name)
}
VLC_API vlc_event_manager_t *
vlc_rd_event_manager(vlc_renderer_discovery *p_rd)
vlc_rd_event_manager(vlc_renderer_discovery_t *p_rd)
{
return &p_rd->event_manager;
}
int
vlc_rd_start(vlc_renderer_discovery *p_rd)
vlc_rd_start(vlc_renderer_discovery_t *p_rd)
{
assert(!p_rd->p_module);
......@@ -258,14 +258,14 @@ vlc_rd_start(vlc_renderer_discovery *p_rd)
}
void
vlc_rd_stop(vlc_renderer_discovery * p_rd)
vlc_rd_stop(vlc_renderer_discovery_t * p_rd)
{
module_unneed(p_rd, p_rd->p_module);
p_rd->p_module = NULL;
}
void
vlc_rd_add_item(vlc_renderer_discovery * p_rd, vlc_renderer_item * p_item)
vlc_rd_add_item(vlc_renderer_discovery_t * p_rd, vlc_renderer_item_t * p_item)
{
vlc_event_t event;
event.type = vlc_RendererDiscoveryItemAdded;
......@@ -275,7 +275,7 @@ vlc_rd_add_item(vlc_renderer_discovery * p_rd, vlc_renderer_item * p_item)
}
void
vlc_rd_remove_item(vlc_renderer_discovery * p_rd, vlc_renderer_item * p_item)
vlc_rd_remove_item(vlc_renderer_discovery_t * p_rd, vlc_renderer_item_t * p_item)
{
vlc_event_t event;
event.type = vlc_RendererDiscoveryItemRemoved;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment