Accepting request 794632 from multimedia:libs
OBS-URL: https://build.opensuse.org/request/show/794632 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vlc?expand=0&rev=105
This commit is contained in:
@@ -1,55 +0,0 @@
|
|||||||
From 5ae7c3aa2847b44f188704049724424b5eb3cdaf Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
||||||
Date: Tue, 25 Dec 2018 03:46:59 +0100
|
|
||||||
Subject: [PATCH 1/2] Fix leaking AvahiServiceResolver in the error paths
|
|
||||||
|
|
||||||
---
|
|
||||||
modules/services_discovery/avahi.c | 9 +++++++++
|
|
||||||
1 file changed, 9 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules/services_discovery/avahi.c b/modules/services_discovery/avahi.c
|
|
||||||
index 1d71cc82d3..aa58c7f673 100644
|
|
||||||
--- a/modules/services_discovery/avahi.c
|
|
||||||
+++ b/modules/services_discovery/avahi.c
|
|
||||||
@@ -148,7 +148,10 @@ static void resolve_callback(
|
|
||||||
avahi_address_snprint(a, (sizeof(a)/sizeof(a[0]))-1, address);
|
|
||||||
if( protocol == AVAHI_PROTO_INET6 )
|
|
||||||
if( asprintf( &psz_addr, "[%s]", a ) == -1 )
|
|
||||||
+ {
|
|
||||||
+ avahi_service_resolver_free( r );
|
|
||||||
return;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
const char *psz_protocol = NULL;
|
|
||||||
for( unsigned int i = 0; i < NB_PROTOCOLS; i++ )
|
|
||||||
@@ -157,7 +160,11 @@ static void resolve_callback(
|
|
||||||
psz_protocol = protocols[i].psz_protocol;
|
|
||||||
}
|
|
||||||
if( psz_protocol == NULL )
|
|
||||||
+ {
|
|
||||||
+ free( psz_addr );
|
|
||||||
+ avahi_service_resolver_free( r );
|
|
||||||
return;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if( txt != NULL )
|
|
||||||
asl = avahi_string_list_find( txt, "path" );
|
|
||||||
@@ -175,6 +182,7 @@ static void resolve_callback(
|
|
||||||
port, value ) == -1 )
|
|
||||||
{
|
|
||||||
free( psz_addr );
|
|
||||||
+ avahi_service_resolver_free( r );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -190,6 +198,7 @@ static void resolve_callback(
|
|
||||||
psz_addr != NULL ? psz_addr : a, port ) == -1 )
|
|
||||||
{
|
|
||||||
free( psz_addr );
|
|
||||||
+ avahi_service_resolver_free( r );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
@@ -1,430 +0,0 @@
|
|||||||
From c3e38bce3b30c6e0974ec5da47e22260ed5b7ea8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
||||||
Date: Tue, 25 Dec 2018 03:48:15 +0100
|
|
||||||
Subject: [PATCH 2/2] Add Avahi implementation for chromecast renderer
|
|
||||||
discovery
|
|
||||||
|
|
||||||
---
|
|
||||||
modules/services_discovery/avahi.c | 246 ++++++++++++++++++++++++-----
|
|
||||||
1 file changed, 209 insertions(+), 37 deletions(-)
|
|
||||||
|
|
||||||
Index: vlc-3.0.7.1/modules/services_discovery/avahi.c
|
|
||||||
===================================================================
|
|
||||||
--- vlc-3.0.7.1.orig/modules/services_discovery/avahi.c
|
|
||||||
+++ vlc-3.0.7.1/modules/services_discovery/avahi.c
|
|
||||||
@@ -33,6 +33,7 @@
|
|
||||||
#include <vlc_common.h>
|
|
||||||
#include <vlc_plugin.h>
|
|
||||||
#include <vlc_services_discovery.h>
|
|
||||||
+#include <vlc_renderer_discovery.h>
|
|
||||||
|
|
||||||
#include <avahi-client/client.h>
|
|
||||||
#include <avahi-client/publish.h>
|
|
||||||
@@ -48,8 +49,11 @@
|
|
||||||
/* Callbacks */
|
|
||||||
static int Open ( vlc_object_t * );
|
|
||||||
static void Close( vlc_object_t * );
|
|
||||||
+static int OpenRD ( vlc_object_t * );
|
|
||||||
+static void CloseRD( vlc_object_t * );
|
|
||||||
|
|
||||||
VLC_SD_PROBE_HELPER("avahi", N_("Zeroconf network services"), SD_CAT_LAN)
|
|
||||||
+VLC_RD_PROBE_HELPER( "avahi_renderer", "Avahi Zeroconf renderer Discovery" )
|
|
||||||
|
|
||||||
vlc_module_begin ()
|
|
||||||
set_shortname( "Avahi" )
|
|
||||||
@@ -61,45 +65,153 @@ vlc_module_begin ()
|
|
||||||
add_shortcut( "mdns", "avahi" )
|
|
||||||
|
|
||||||
VLC_SD_PROBE_SUBMODULE
|
|
||||||
+ add_submodule() \
|
|
||||||
+ set_description( N_( "Avahi Renderer Discovery" ) )
|
|
||||||
+ set_category( CAT_SOUT )
|
|
||||||
+ set_subcategory( SUBCAT_SOUT_RENDERER )
|
|
||||||
+ set_capability( "renderer_discovery", 0 )
|
|
||||||
+ set_callbacks( OpenRD, CloseRD )
|
|
||||||
+ add_shortcut( "mdns_renderer", "avahi_renderer" )
|
|
||||||
+ VLC_RD_PROBE_SUBMODULE
|
|
||||||
vlc_module_end ()
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* Local structures
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
-struct services_discovery_sys_t
|
|
||||||
+typedef
|
|
||||||
+struct
|
|
||||||
{
|
|
||||||
AvahiThreadedPoll *poll;
|
|
||||||
AvahiClient *client;
|
|
||||||
vlc_dictionary_t services_name_to_input_item;
|
|
||||||
+ vlc_object_t *parent;
|
|
||||||
+ bool renderer;
|
|
||||||
+} discovery_sys_t;
|
|
||||||
+
|
|
||||||
+struct vlc_renderer_discovery_sys
|
|
||||||
+{
|
|
||||||
+ discovery_sys_t s;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+struct services_discovery_sys_t
|
|
||||||
+{
|
|
||||||
+ discovery_sys_t s;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct
|
|
||||||
{
|
|
||||||
const char *psz_protocol;
|
|
||||||
const char *psz_service_name;
|
|
||||||
+ bool b_renderer;
|
|
||||||
} protocols[] = {
|
|
||||||
- { "ftp", "_ftp._tcp" },
|
|
||||||
- { "smb", "_smb._tcp" },
|
|
||||||
- { "nfs", "_nfs._tcp" },
|
|
||||||
- { "sftp", "_sftp-ssh._tcp" },
|
|
||||||
- { "rtsp", "_rtsp._tcp" },
|
|
||||||
+ { "ftp", "_ftp._tcp", false },
|
|
||||||
+ { "smb", "_smb._tcp", false },
|
|
||||||
+ { "nfs", "_nfs._tcp", false },
|
|
||||||
+ { "sftp", "_sftp-ssh._tcp", false },
|
|
||||||
+ { "rtsp", "_rtsp._tcp", false },
|
|
||||||
+ { "chromecast", "_googlecast._tcp", true },
|
|
||||||
};
|
|
||||||
#define NB_PROTOCOLS (sizeof(protocols) / sizeof(*protocols))
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
+ * helpers
|
|
||||||
+ *****************************************************************************/
|
|
||||||
+static void add_renderer( const char *psz_protocol, const char *psz_name,
|
|
||||||
+ const char *psz_addr, uint16_t i_port,
|
|
||||||
+ AvahiStringList *txt, discovery_sys_t *p_sys )
|
|
||||||
+{
|
|
||||||
+ vlc_renderer_discovery_t *p_rd = ( vlc_renderer_discovery_t* )(p_sys->parent);
|
|
||||||
+ AvahiStringList *asl = NULL;
|
|
||||||
+ if ( !strcmp( "chromecast", psz_protocol ) ) {
|
|
||||||
+ int renderer_flags = 0;
|
|
||||||
+
|
|
||||||
+ /* Friendly name */
|
|
||||||
+ asl = avahi_string_list_find( txt, "fn" );
|
|
||||||
+ if( asl != NULL )
|
|
||||||
+ {
|
|
||||||
+ char *key = NULL;
|
|
||||||
+ char *value = NULL;
|
|
||||||
+ if( avahi_string_list_get_pair( asl, &key, &value, NULL ) == 0 &&
|
|
||||||
+ value != NULL )
|
|
||||||
+ {
|
|
||||||
+
|
|
||||||
+ }
|
|
||||||
+ msg_Info( p_rd, "key: '%s' value: '%s'", key, value );
|
|
||||||
+
|
|
||||||
+ if( key != NULL )
|
|
||||||
+ avahi_free( (void *)key );
|
|
||||||
+ if( value != NULL )
|
|
||||||
+ avahi_free( (void *)value );
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* capabilities */
|
|
||||||
+ asl = avahi_string_list_find( txt, "ca" );
|
|
||||||
+ if( asl != NULL ) {
|
|
||||||
+ char *key = NULL;
|
|
||||||
+ char *value = NULL;
|
|
||||||
+ if( avahi_string_list_get_pair( asl, &key, &value, NULL ) == 0 &&
|
|
||||||
+ value != NULL )
|
|
||||||
+ {
|
|
||||||
+ int ca = atoi( value );
|
|
||||||
+
|
|
||||||
+ if ( ( ca & 0x01 ) != 0 )
|
|
||||||
+ renderer_flags |= VLC_RENDERER_CAN_VIDEO;
|
|
||||||
+ if ( ( ca & 0x04 ) != 0 )
|
|
||||||
+ renderer_flags |= VLC_RENDERER_CAN_AUDIO;
|
|
||||||
+ }
|
|
||||||
+ msg_Info( p_rd, "key: '%s' value: '%s'", key, value );
|
|
||||||
+
|
|
||||||
+ if( key != NULL )
|
|
||||||
+ avahi_free( (void *)key );
|
|
||||||
+ if( value != NULL )
|
|
||||||
+ avahi_free( (void *)value );
|
|
||||||
+ }
|
|
||||||
+ /*
|
|
||||||
+ * "md": model
|
|
||||||
+ * "id": uuid
|
|
||||||
+ * "ic": icon URL, relative to http://<ip>:8008/
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+ const char *extra_uri = renderer_flags & VLC_RENDERER_CAN_VIDEO ? NULL : "no-video";
|
|
||||||
+ char *uri = NULL;
|
|
||||||
+ char *icon_uri = NULL;
|
|
||||||
+ if( asprintf( &uri, "%s://%s:%u", psz_protocol, psz_addr, i_port ) < 0 )
|
|
||||||
+ return;
|
|
||||||
+ if( asprintf( &icon_uri, "http://%s:8008/setup/icon.png", psz_addr) < 0 )
|
|
||||||
+ {
|
|
||||||
+ free( uri );
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ vlc_renderer_item_t *p_renderer_item =
|
|
||||||
+ vlc_renderer_item_new( "chromecast", psz_name, uri, extra_uri,
|
|
||||||
+ "cc_demux", icon_uri, renderer_flags );
|
|
||||||
+ if( p_renderer_item == NULL ) {
|
|
||||||
+ free( uri );
|
|
||||||
+ free( icon_uri );
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ vlc_dictionary_insert( &p_sys->services_name_to_input_item,
|
|
||||||
+ psz_name, p_renderer_item);
|
|
||||||
+ vlc_rd_add_item( p_rd, p_renderer_item );
|
|
||||||
+ vlc_renderer_item_release( p_renderer_item );
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*****************************************************************************
|
|
||||||
* client_callback
|
|
||||||
*****************************************************************************/
|
|
||||||
static void client_callback( AvahiClient *c, AvahiClientState state,
|
|
||||||
void * userdata )
|
|
||||||
{
|
|
||||||
- services_discovery_t *p_sd = ( services_discovery_t* )userdata;
|
|
||||||
- services_discovery_sys_t *p_sys = p_sd->p_sys;
|
|
||||||
+ discovery_sys_t *p_sys = userdata;
|
|
||||||
|
|
||||||
if( state == AVAHI_CLIENT_FAILURE &&
|
|
||||||
(avahi_client_errno(c) == AVAHI_ERR_DISCONNECTED) )
|
|
||||||
{
|
|
||||||
- msg_Err( p_sd, "avahi client disconnected" );
|
|
||||||
+ msg_Err( p_sys->parent, "avahi client disconnected" );
|
|
||||||
avahi_threaded_poll_quit( p_sys->poll );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -122,15 +234,14 @@ static void resolve_callback(
|
|
||||||
AvahiLookupResultFlags flags,
|
|
||||||
void* userdata )
|
|
||||||
{
|
|
||||||
- services_discovery_t *p_sd = ( services_discovery_t* )userdata;
|
|
||||||
- services_discovery_sys_t *p_sys = p_sd->p_sys;
|
|
||||||
+ discovery_sys_t *p_sys = userdata;
|
|
||||||
|
|
||||||
VLC_UNUSED(interface); VLC_UNUSED(host_name);
|
|
||||||
VLC_UNUSED(flags);
|
|
||||||
|
|
||||||
if( event == AVAHI_RESOLVER_FAILURE )
|
|
||||||
{
|
|
||||||
- msg_Err( p_sd,
|
|
||||||
+ msg_Err( p_sys->parent,
|
|
||||||
"failed to resolve service '%s' of type '%s' in domain '%s'",
|
|
||||||
name, type, domain );
|
|
||||||
}
|
|
||||||
@@ -142,7 +253,7 @@ static void resolve_callback(
|
|
||||||
AvahiStringList *asl = NULL;
|
|
||||||
input_item_t *p_input = NULL;
|
|
||||||
|
|
||||||
- msg_Info( p_sd, "service '%s' of type '%s' in domain '%s' port %i",
|
|
||||||
+ msg_Info( p_sys->parent, "service '%s' of type '%s' in domain '%s' port %i",
|
|
||||||
name, type, domain, port );
|
|
||||||
|
|
||||||
avahi_address_snprint(a, (sizeof(a)/sizeof(a[0]))-1, address);
|
|
||||||
@@ -154,10 +265,15 @@ static void resolve_callback(
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *psz_protocol = NULL;
|
|
||||||
+ bool is_renderer = false;
|
|
||||||
for( unsigned int i = 0; i < NB_PROTOCOLS; i++ )
|
|
||||||
{
|
|
||||||
if( !strcmp(type, protocols[i].psz_service_name) )
|
|
||||||
+ {
|
|
||||||
psz_protocol = protocols[i].psz_protocol;
|
|
||||||
+ is_renderer = protocols[i].b_renderer;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
if( psz_protocol == NULL )
|
|
||||||
{
|
|
||||||
@@ -166,6 +282,15 @@ static void resolve_callback(
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if( txt != NULL && is_renderer )
|
|
||||||
+ {
|
|
||||||
+ const char* addr_v4v6 = psz_addr != NULL ? psz_addr : a;
|
|
||||||
+ add_renderer( psz_protocol, name, addr_v4v6, port, txt, p_sys );
|
|
||||||
+ free( psz_addr );
|
|
||||||
+ avahi_service_resolver_free( r );
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if( txt != NULL )
|
|
||||||
asl = avahi_string_list_find( txt, "path" );
|
|
||||||
if( asl != NULL )
|
|
||||||
@@ -212,6 +337,7 @@ static void resolve_callback(
|
|
||||||
}
|
|
||||||
if( p_input != NULL )
|
|
||||||
{
|
|
||||||
+ services_discovery_t *p_sd = ( services_discovery_t* )(p_sys->parent);
|
|
||||||
vlc_dictionary_insert( &p_sys->services_name_to_input_item,
|
|
||||||
name, p_input );
|
|
||||||
services_discovery_AddItem( p_sd, p_input );
|
|
||||||
@@ -237,8 +363,8 @@ static void browse_callback(
|
|
||||||
{
|
|
||||||
VLC_UNUSED(b);
|
|
||||||
VLC_UNUSED(flags);
|
|
||||||
- services_discovery_t *p_sd = ( services_discovery_t* )userdata;
|
|
||||||
- services_discovery_sys_t *p_sys = p_sd->p_sys;
|
|
||||||
+ discovery_sys_t *p_sys = userdata;
|
|
||||||
+ msg_Info( p_sys->parent, "browse_callback - event: %d, name: %s, type: %s", event, name, type);
|
|
||||||
if( event == AVAHI_BROWSER_NEW )
|
|
||||||
{
|
|
||||||
if( avahi_service_resolver_new( p_sys->client, interface, protocol,
|
|
||||||
@@ -246,22 +372,32 @@ static void browse_callback(
|
|
||||||
0,
|
|
||||||
resolve_callback, userdata ) == NULL )
|
|
||||||
{
|
|
||||||
- msg_Err( p_sd, "failed to resolve service '%s': %s", name,
|
|
||||||
+ msg_Err( p_sys->parent, "failed to resolve service '%s': %s", name,
|
|
||||||
avahi_strerror( avahi_client_errno( p_sys->client ) ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( name )
|
|
||||||
{
|
|
||||||
/** \todo Store the input id and search it, rather than searching the items */
|
|
||||||
- input_item_t *p_item;
|
|
||||||
+ void *p_item;
|
|
||||||
p_item = vlc_dictionary_value_for_key(
|
|
||||||
&p_sys->services_name_to_input_item,
|
|
||||||
name );
|
|
||||||
if( !p_item )
|
|
||||||
- msg_Err( p_sd, "failed to find service '%s' in playlist", name );
|
|
||||||
+ msg_Err( p_sys->parent, "failed to find service '%s' in playlist", name );
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- services_discovery_RemoveItem( p_sd, p_item );
|
|
||||||
+ if( p_sys->renderer )
|
|
||||||
+ {
|
|
||||||
+ vlc_renderer_discovery_t *p_rd = ( vlc_renderer_discovery_t* )(p_sys->parent);
|
|
||||||
+ vlc_rd_remove_item( p_rd, p_item );
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ //input_item_t *p_item;
|
|
||||||
+ services_discovery_t *p_sd = ( services_discovery_t* )(p_sys->parent);
|
|
||||||
+ services_discovery_RemoveItem( p_sd, p_item );
|
|
||||||
+ }
|
|
||||||
vlc_dictionary_remove_value_for_key(
|
|
||||||
&p_sys->services_name_to_input_item,
|
|
||||||
name, NULL, NULL );
|
|
||||||
@@ -279,46 +415,41 @@ static void clear_item( void* p_item, vo
|
|
||||||
/*****************************************************************************
|
|
||||||
* Open: initialize and create stuff
|
|
||||||
*****************************************************************************/
|
|
||||||
-static int Open( vlc_object_t *p_this )
|
|
||||||
+static int OpenCommon( discovery_sys_t *p_sys )
|
|
||||||
{
|
|
||||||
- services_discovery_t *p_sd = ( services_discovery_t* )p_this;
|
|
||||||
- services_discovery_sys_t *p_sys;
|
|
||||||
int err;
|
|
||||||
|
|
||||||
- p_sd->p_sys = p_sys = calloc( 1, sizeof( services_discovery_sys_t ) );
|
|
||||||
- if( !p_sys )
|
|
||||||
- return VLC_ENOMEM;
|
|
||||||
-
|
|
||||||
- p_sd->description = _("Zeroconf network services");
|
|
||||||
-
|
|
||||||
vlc_dictionary_init( &p_sys->services_name_to_input_item, 1 );
|
|
||||||
|
|
||||||
p_sys->poll = avahi_threaded_poll_new();
|
|
||||||
if( p_sys->poll == NULL )
|
|
||||||
{
|
|
||||||
- msg_Err( p_sd, "failed to create Avahi threaded poll" );
|
|
||||||
+ msg_Err( p_sys->parent, "failed to create Avahi threaded poll" );
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
p_sys->client = avahi_client_new( avahi_threaded_poll_get(p_sys->poll),
|
|
||||||
- 0, client_callback, p_sd, &err );
|
|
||||||
+ 0, client_callback, p_sys, &err );
|
|
||||||
if( p_sys->client == NULL )
|
|
||||||
{
|
|
||||||
- msg_Err( p_sd, "failed to create avahi client: %s",
|
|
||||||
+ msg_Err( p_sys->parent, "failed to create avahi client: %s",
|
|
||||||
avahi_strerror( err ) );
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
for( unsigned i = 0; i < NB_PROTOCOLS; i++ )
|
|
||||||
{
|
|
||||||
+ if ( protocols[i].b_renderer != p_sys->renderer )
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
AvahiServiceBrowser *sb;
|
|
||||||
sb = avahi_service_browser_new( p_sys->client, AVAHI_IF_UNSPEC,
|
|
||||||
AVAHI_PROTO_UNSPEC,
|
|
||||||
protocols[i].psz_service_name, NULL,
|
|
||||||
- 0, browse_callback, p_sd );
|
|
||||||
+ 0, browse_callback, p_sys );
|
|
||||||
if( sb == NULL )
|
|
||||||
{
|
|
||||||
- msg_Err( p_sd, "failed to create avahi service browser %s", avahi_strerror( avahi_client_errno(p_sys->client) ) );
|
|
||||||
+ msg_Err( p_sys->parent, "failed to create avahi service browser %s", avahi_strerror( avahi_client_errno(p_sys->client) ) );
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -339,13 +470,39 @@ error:
|
|
||||||
return VLC_EGENERIC;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int Open( vlc_object_t *p_this )
|
|
||||||
+{
|
|
||||||
+ services_discovery_t *p_sd = ( services_discovery_t* )p_this;
|
|
||||||
+ p_sd->description = _("Zeroconf network services");
|
|
||||||
+
|
|
||||||
+ p_sd->p_sys = calloc( 1, sizeof( services_discovery_sys_t ) );
|
|
||||||
+ if( !p_sd->p_sys )
|
|
||||||
+ return VLC_ENOMEM;
|
|
||||||
+ p_sd->p_sys->s.parent = p_this;
|
|
||||||
+ p_sd->p_sys->s.renderer = false;
|
|
||||||
+
|
|
||||||
+ return OpenCommon( &p_sd->p_sys->s );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int OpenRD( vlc_object_t *p_this )
|
|
||||||
+{
|
|
||||||
+ vlc_renderer_discovery_t *p_rd = (vlc_renderer_discovery_t *)p_this;
|
|
||||||
+
|
|
||||||
+ p_rd->p_sys = calloc( 1, sizeof( vlc_renderer_discovery_sys ) );
|
|
||||||
+ if( !p_rd->p_sys )
|
|
||||||
+ return VLC_ENOMEM;
|
|
||||||
+ p_rd->p_sys->s.parent = p_this;
|
|
||||||
+ p_rd->p_sys->s.renderer = true;
|
|
||||||
+
|
|
||||||
+ msg_Info( p_this, "Opening Avahi Renderer SD");
|
|
||||||
+ return OpenCommon( &p_rd->p_sys->s );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*****************************************************************************
|
|
||||||
* Close: cleanup
|
|
||||||
*****************************************************************************/
|
|
||||||
-static void Close( vlc_object_t *p_this )
|
|
||||||
+static void CloseCommon( discovery_sys_t *p_sys )
|
|
||||||
{
|
|
||||||
- services_discovery_t *p_sd = ( services_discovery_t* )p_this;
|
|
||||||
- services_discovery_sys_t *p_sys = p_sd->p_sys;
|
|
||||||
avahi_threaded_poll_stop( p_sys->poll );
|
|
||||||
|
|
||||||
avahi_client_free( p_sys->client );
|
|
||||||
@@ -354,3 +511,18 @@ static void Close( vlc_object_t *p_this
|
|
||||||
vlc_dictionary_clear( &p_sys->services_name_to_input_item, clear_item, NULL );
|
|
||||||
free( p_sys );
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+static void Close( vlc_object_t *p_this )
|
|
||||||
+{
|
|
||||||
+ services_discovery_t *p_sd = ( services_discovery_t* )p_this;
|
|
||||||
+ services_discovery_sys_t *p_sys = p_sd->p_sys;
|
|
||||||
+ CloseCommon( &p_sys->s );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void CloseRD( vlc_object_t *p_this )
|
|
||||||
+{
|
|
||||||
+ msg_Info( p_this, "Closing Avahi Renderer SD");
|
|
||||||
+ vlc_renderer_discovery_t *p_rd = (vlc_renderer_discovery_t *)p_this;
|
|
||||||
+ vlc_renderer_discovery_sys *p_sys = p_rd->p_sys;
|
|
||||||
+ CloseCommon( &p_sys->s );
|
|
||||||
+}
|
|
@@ -1,35 +0,0 @@
|
|||||||
https://mailman.videolan.org/pipermail/vlc-devel/2019-October/128188.html
|
|
||||||
|
|
||||||
commit d5e7205f0a4c5dbd55b1b56487f3044a5b01be16
|
|
||||||
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
|
||||||
Date: Fri Oct 4 12:55:46 2019 +0200
|
|
||||||
|
|
||||||
Sort tar file list
|
|
||||||
|
|
||||||
if available (in GNU tar >= 1.28)
|
|
||||||
and use ustar format to not have pax headers add nondetermistic bits
|
|
||||||
to make skins2/default.vlt reproducible.
|
|
||||||
|
|
||||||
See https://reproducible-builds.org/ for why this is good.
|
|
||||||
|
|
||||||
This patch was done while working on reproducible builds for openSUSE.
|
|
||||||
|
|
||||||
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
|
||||||
|
|
||||||
diff --git a/share/Makefile.am b/share/Makefile.am
|
|
||||||
index e5b801a5be..327d36a64d 100644
|
|
||||||
--- a/share/Makefile.am
|
|
||||||
+++ b/share/Makefile.am
|
|
||||||
@@ -92,8 +92,11 @@ skins2_default_vlt_FILES = \
|
|
||||||
skins2/default.vlt: $(skins2_default_vlt_FILES)
|
|
||||||
$(AM_V_at)mkdir -p skins2
|
|
||||||
$(AM_V_at)rm -f -- skins2/default.vlt.tmp
|
|
||||||
- $(AM_V_GEN)GZIP=--no-name \
|
|
||||||
+ $(AM_V_GEN)tarsort= ; \
|
|
||||||
+ tar --help|grep -q sort=ORDER && tarsort=--sort=name ; \
|
|
||||||
+ GZIP=--no-name \
|
|
||||||
tar cvvzf skins2/default.vlt.tmp \
|
|
||||||
+ --format=ustar $$tarsort \
|
|
||||||
--owner=root --group=root --directory="$(srcdir)/skins2" \
|
|
||||||
default/
|
|
||||||
$(AM_V_at)mv -f -- skins2/default.vlt.tmp skins2/default.vlt
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:e0149ef4a20a19b9ecd87309c2d27787ee3f47dfd47c6639644bc1f6fd95bdf6
|
|
||||||
size 26041520
|
|
3
vlc-3.0.9.2.tar.xz
Normal file
3
vlc-3.0.9.2.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601
|
||||||
|
size 25895876
|
6
vlc-3.0.9.2.tar.xz.asc
Normal file
6
vlc-3.0.9.2.tar.xz.asc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iF0EABECAB0WIQRl98a0IGvQV6frc3hxgHE75Y0a3AUCXo8OUQAKCRBxgHE75Y0a
|
||||||
|
3MRuAJ9rw6YHNmAbLW1wHcAWVg+RDSDmLwCcCEXAfYzhkebOUtLNvf93QPWVd1s=
|
||||||
|
=SUQV
|
||||||
|
-----END PGP SIGNATURE-----
|
73
vlc.changes
73
vlc.changes
@@ -1,3 +1,76 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 16 16:10:19 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Update to version 3.0.9.2:
|
||||||
|
+ Misc: Properly bump the version in configure.ac.
|
||||||
|
- Changes from version 3.0.9.1:
|
||||||
|
+ Misc: Fix VLSub returning 401 for earch request.
|
||||||
|
- Changes from version 3.0.9:
|
||||||
|
+ Core: Work around busy looping when playing an invalid item
|
||||||
|
through VLM.
|
||||||
|
+ Access:
|
||||||
|
* Multiple dvdread and dvdnav crashs fixes
|
||||||
|
* Fixed DVD glitches on clip change
|
||||||
|
* Fixed dvdread commands/data sequence inversion in some cases causing
|
||||||
|
unwanted glitches
|
||||||
|
* Better handling of authored as corrupted DVD
|
||||||
|
* Added libsmb2 support for SMB2/3 shares
|
||||||
|
+ Demux:
|
||||||
|
* Fix TTML entities not passed to decoder
|
||||||
|
* Fixed some WebVTT styling tags being not applied
|
||||||
|
* Misc raw H264/HEVC frame rate fixes
|
||||||
|
* Fix adaptive regression on TS format change (mostly HLS)
|
||||||
|
* Fixed MP4 regression with twos/sowt PCM audio
|
||||||
|
* Fixed some MP4 raw quicktime and ms-PCM audio
|
||||||
|
* Fixed MP4 interlacing handling
|
||||||
|
* Multiple adaptive stack (DASH/HLS/Smooth) fixes
|
||||||
|
* Enabled Live seeking for HLS
|
||||||
|
* Fixed seeking in some cases for HLS
|
||||||
|
* Improved Live playback for Smooth and DASH
|
||||||
|
* Fixed adaptive unwanted end of stream in some cases
|
||||||
|
* Faster adaptive start and new buffering control options
|
||||||
|
+ Packetizers:
|
||||||
|
* Fixes H264/HEVC incomplete draining in some cases
|
||||||
|
* packetizer_helper: Fix potential trailing junk on last packet
|
||||||
|
* Added missing drain in packetizers that was causing missing
|
||||||
|
last frame or audio
|
||||||
|
* Improved check to prevent fLAC synchronization drops
|
||||||
|
+ Decoder:
|
||||||
|
* avcodec: revector video decoder to fix incomplete drain
|
||||||
|
* spudec: implemented palette updates, fixing missing subtitles
|
||||||
|
on some DVD
|
||||||
|
* Fixed WebVTT CSS styling not being applied on Windows/macOS
|
||||||
|
* Fixed Hebrew teletext pages support in zvbi
|
||||||
|
* Fixed Dav1d aborting decoding on corrupted picture
|
||||||
|
* Extract and display of all CEA708 subtitles
|
||||||
|
* Update libfaad to 2.9.1
|
||||||
|
* Add DXVA support for VP9 Profile 2 (10 bits)
|
||||||
|
* Mediacodec aspect ratio with Amazon devices
|
||||||
|
+ Audio output:
|
||||||
|
* Added support for iOS audiounit audio above 48KHz
|
||||||
|
* Added support for amem audio up to 384KHz
|
||||||
|
+ Video output:
|
||||||
|
* Fix for opengl glitches in some drivers
|
||||||
|
* Fix GMA950 opengl support on macOS
|
||||||
|
* YUV to RGB StretchRect fixes with NVIDIA drivers
|
||||||
|
* Use libpacebo new tone mapping desaturation algorithm
|
||||||
|
+ Text renderer:
|
||||||
|
* Fix crashes on macOS with SSA/ASS subtitles containing emoji
|
||||||
|
* Fixed unwanted growing background in Freetype rendering and Y padding
|
||||||
|
+ Mux: Fixed some YUV mappings
|
||||||
|
+ Service Discovery: Update libmicrodns to 0.1.2.
|
||||||
|
+ Misc:
|
||||||
|
* Update YouTube, SoundCloud and Vocaroo scripts: this restores
|
||||||
|
playback of YouTube URLs.
|
||||||
|
* Add missing .wpl & .zpl file associations on Windows
|
||||||
|
* Improved chromecast audio quality
|
||||||
|
+ Updated translations.
|
||||||
|
- Drop patches that have been merged upstream:
|
||||||
|
D 0001-Fix-leaking-AvahiServiceResolver-in-the-error-paths.patch
|
||||||
|
D 0002-Add-Avahi-implementation-for-chromecast-renderer-dis.patch
|
||||||
|
D reproducible.patch
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 31 08:58:04 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
|
Tue Mar 31 08:58:04 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||||
|
|
||||||
|
28
vlc.keyring
Normal file
28
vlc.keyring
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
mQGiBFD9w2QRBACoEzH9KKirWE4wgiuPPynNnxks+p+t5i1z3CG+1XhagmTHoOf3
|
||||||
|
v8i19kKHV6WnVMn2CKJFgwTTLYXOJTrBM/4ABVtu11cHeeueeo+pCSkdoLzYJ5QF
|
||||||
|
HbByB6j33QUbwKF0frEs+ge4LxzvYyCDAmNAW560QtOAR9Lk1Fo5B1GXzwCg1kDk
|
||||||
|
RkSe7EOZNm1U2rYAQ2VPrfsEAIHr4ooOyUByPR7XpoDOKoaXEG0hjpgh46lbgse+
|
||||||
|
dQx8YrxS9vXQLwYokfWLrs55avx9Ys0iVv2TMv7X4Tn5sTVaK5K+NbKhxhLORxGI
|
||||||
|
sgKqRn7W5SG5xoO0w/dmQj756ppjITGbxjFuhYE0X5S6NeMhUuFci7sJ42R7F1Ko
|
||||||
|
6sYuA/wOMUxCk4XOXeQF16ApyyenjE/UWbBNEhBmjEsZkYAFNc89pAEnEFSnIxK8
|
||||||
|
fcuCQioM6ojjaW+aEs/q3/klI0nat9LMLhNSCebjriMHwJDU70NeCn4nPWsfItT1
|
||||||
|
eKvbHNcX+3bq3D/i2Wa3PZ5YFFF01C61dHmVC9YGh4sAOXO09LQjVmlkZW9MQU4g
|
||||||
|
UmVsZWFzZSBTaWduaW5nIEtleSAoMjAxMymIaAQTEQIAKAIbAwYLCQgHAwIGFQgC
|
||||||
|
CQoLBBYCAwECHgECF4AFAlk3/bQFCQobbdAACgkQcYBxO+WNGtzKtgCgr8e+eznK
|
||||||
|
XeYnZYnSKz2pxvbetsQAn36gLn30dOINLPzDmWMc4lfIA2wGtCNWaWRlb0xBTiBS
|
||||||
|
ZWxlYXNlIFNpZ25pbmcgS2V5ICgyMDE0KYhpBBMRAgApAhsDBwsJCAcDAgEGFQgC
|
||||||
|
CQoLBBYCAwECHgECF4AFAlk3/bQFCQobbdAACgkQcYBxO+WNGty1xgCfci7vVRoG
|
||||||
|
FfDEccO417/OdsZ4l7MAnitkQtN+Lq+3rjgDZAWlNaF45i7TtCNWaWRlb0xBTiBS
|
||||||
|
ZWxlYXNlIFNpZ25pbmcgS2V5ICgyMDE1KYhqBBMRAgAqAhsDBQsJCAcCBhUICQoL
|
||||||
|
AgQWAgMBAh4BAheAAhkBBQJZN/20BQkKG23QAAoJEHGAcTvljRrcwscAn0CQBVCl
|
||||||
|
ArPMtbaybLn0TSsAehjkAKCQcHSfvkDxxYsY13x2Xk7ONqp2GbQjVmlkZW9MQU4g
|
||||||
|
UmVsZWFzZSBTaWduaW5nIEtleSAoMjAxNimIaAQTEQIAKAIbAwYLCQgHAwIGFQgC
|
||||||
|
CQoLBBYCAwECHgECF4AFAlk3/bQFCQobbdAACgkQcYBxO+WNGtzITACgmUpWpNGn
|
||||||
|
QKo+Rcap86RA0ptdWLkAn3/VU5ao7m0kWLWks5Nxj/Snx3+StCNWaWRlb0xBTiBS
|
||||||
|
ZWxlYXNlIFNpZ25pbmcgS2V5ICgyMDE3KYhnBBMRAgAnAhsDBQsJCAcCBhUICQoL
|
||||||
|
AgQWAgMBAh4BAheABQJZN/20BQkKG23QAAoJEHGAcTvljRrcX08AoIRlpqSSaWmw
|
||||||
|
Kd+PCQO5VNjtSWmOAKDQoyHd6QzL3BAkOajdEg3G98fM/Q==
|
||||||
|
=k6/6
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
13
vlc.spec
13
vlc.spec
@@ -33,7 +33,7 @@
|
|||||||
%bcond_with faad
|
%bcond_with faad
|
||||||
%bcond_with fdk_aac
|
%bcond_with fdk_aac
|
||||||
Name: vlc
|
Name: vlc
|
||||||
Version: 3.0.8
|
Version: 3.0.9.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Graphical media player
|
Summary: Graphical media player
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||||
@@ -41,6 +41,8 @@ Group: Productivity/Multimedia/Video/Players
|
|||||||
URL: http://www.videolan.org
|
URL: http://www.videolan.org
|
||||||
Source: http://download.videolan.org/%{name}/%{version}/%{name}-%{version}.tar.xz
|
Source: http://download.videolan.org/%{name}/%{version}/%{name}-%{version}.tar.xz
|
||||||
Source2: %{name}-rpmlintrc
|
Source2: %{name}-rpmlintrc
|
||||||
|
Source98: http://download.videolan.org/%{name}/%{version}/%{name}-%{version}.tar.xz.asc
|
||||||
|
Source99: vlc.keyring
|
||||||
# PATCH-FIX-UPSTREAM vlc.a52.patch https://trac.videolan.org/vlc/ticket/3731 dimstar@opensuse.org -- Support new version of liba52
|
# PATCH-FIX-UPSTREAM vlc.a52.patch https://trac.videolan.org/vlc/ticket/3731 dimstar@opensuse.org -- Support new version of liba52
|
||||||
Patch0: vlc.a52.patch
|
Patch0: vlc.a52.patch
|
||||||
# PATCH-FIX-UPSTREAM vlc-allow-deprecated-fribidi.patch dimstar@opensuse.org -- Allow usage of deprecated fribidi functions
|
# PATCH-FIX-UPSTREAM vlc-allow-deprecated-fribidi.patch dimstar@opensuse.org -- Allow usage of deprecated fribidi functions
|
||||||
@@ -51,16 +53,10 @@ Patch2: vlc-lua-5.3.patch
|
|||||||
Patch3: fix-build-with-fdk-2.0.patch
|
Patch3: fix-build-with-fdk-2.0.patch
|
||||||
# PATCH-FEATURE-OPENSUSE vlc-projectM-qt5.patch -- Build against projectM-qt5; openSUSE provides projectM as -qt and -qt5 variant
|
# PATCH-FEATURE-OPENSUSE vlc-projectM-qt5.patch -- Build against projectM-qt5; openSUSE provides projectM as -qt and -qt5 variant
|
||||||
Patch100: vlc-projectM-qt5.patch
|
Patch100: vlc-projectM-qt5.patch
|
||||||
# PATCH-FIX-UPSTREAM 0001-Fix-leaking-AvahiServiceResolver-in-the-error-paths.patch -- Fix some memleaks
|
|
||||||
Patch101: 0001-Fix-leaking-AvahiServiceResolver-in-the-error-paths.patch
|
|
||||||
# PATCH-FIX-UPSTREAM 0002-Add-Avahi-implementation-for-chromecast-renderer-dis.patch -- Use Avahi for discovery, microdns is not available
|
|
||||||
Patch102: 0002-Add-Avahi-implementation-for-chromecast-renderer-dis.patch
|
|
||||||
# PATCH-FIX-UPSTREAM -- Use OpenCV C++ API
|
# PATCH-FIX-UPSTREAM -- Use OpenCV C++ API
|
||||||
Patch103: 0001-Port-OpenCV-facedetect-example-to-C-API.patch
|
Patch103: 0001-Port-OpenCV-facedetect-example-to-C-API.patch
|
||||||
# PATCH-FIX-UPSTREAM -- Fix building with Qt 5.15 by adding a missing include
|
# PATCH-FIX-UPSTREAM -- Fix building with Qt 5.15 by adding a missing include
|
||||||
Patch104: fix-missing-includes-with-qt-5.15.patch
|
Patch104: fix-missing-includes-with-qt-5.15.patch
|
||||||
# PATCH-FIX-UPSTREAM reproducible.patch -- make tar reproducible -- 87ea3c0dfb7367b434f688d657f931c074bb34f4
|
|
||||||
Patch105: reproducible.patch
|
|
||||||
BuildRequires: Mesa-devel
|
BuildRequires: Mesa-devel
|
||||||
BuildRequires: aalib-devel
|
BuildRequires: aalib-devel
|
||||||
BuildRequires: alsa-devel >= 1.0.24
|
BuildRequires: alsa-devel >= 1.0.24
|
||||||
@@ -405,11 +401,8 @@ OpenCV based video filters and a face detection example.
|
|||||||
%if 0%{?suse_version} > 1320 && 0%{?suse_version} < 1550
|
%if 0%{?suse_version} > 1320 && 0%{?suse_version} < 1550
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch101 -p1
|
|
||||||
%patch102 -p1
|
|
||||||
%patch103 -p1
|
%patch103 -p1
|
||||||
%patch104 -p1
|
%patch104 -p1
|
||||||
%patch105 -p1
|
|
||||||
|
|
||||||
### And LUA 5.3.1 has some more API changes
|
### And LUA 5.3.1 has some more API changes
|
||||||
if pkg-config --atleast-version 5.3.1 lua; then
|
if pkg-config --atleast-version 5.3.1 lua; then
|
||||||
|
Reference in New Issue
Block a user