[vlc-devel] [PATCH 4/6] microdns: Include the modele in the item name
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Fri Jun 26 17:11:10 CEST 2020
This can help differenciate devices with similar names and matches
bonjour's behavior
---
modules/services_discovery/microdns.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/modules/services_discovery/microdns.c b/modules/services_discovery/microdns.c
index 3cbd501681..16f23d914c 100644
--- a/modules/services_discovery/microdns.c
+++ b/modules/services_discovery/microdns.c
@@ -521,6 +521,16 @@ new_entries_rd_cb( void *p_this, int i_status, const struct rr_entry *p_entries
free( psz_uri );
break;
}
+ if( p_srv->renderer.psz_model != NULL )
+ {
+ char* psz_name;
+ if ( asprintf( &psz_name, "%s (%s)", p_srv->psz_device_name,
+ p_srv->renderer.psz_model ) > 0 )
+ {
+ free( p_srv->psz_device_name );
+ p_srv->psz_device_name = psz_name;
+ }
+ }
if( strcmp( p_srv->psz_protocol, "chromecast" ) == 0)
psz_demux_filter = "cc_demux";
--
2.20.1
More information about the vlc-devel
mailing list