Commit 10d1c416 authored by Martin Finkel's avatar Martin Finkel

Simplify RendererAPI

This a non-breaking API change. The default service discovery protocol can be inferred, simplying the end user API usage. It can still be specified in case new protocols are supported in the future.

(cherry picked from commit b230e9841c863b77841ef0b81d8d81179167a797)
parent f029b28f
......@@ -32,7 +32,7 @@ namespace LibVLCSharp.Tests
var rendererList = libVLC.RendererList;
var rendererDiscoverer = new RendererDiscoverer(libVLC, rendererList[0].Name);
var rendererDiscoverer = new RendererDiscoverer(libVLC);
var rendererItems = new List<RendererItem>();
var tcs = new TaskCompletionSource<bool>();
......@@ -140,6 +140,11 @@ namespace LibVLCSharp.Shared
internal const string CoreLibraryName = "libvlccore";
internal const string ServiceDiscoveryProtocol = "Bonjour_renderer";
internal const string ServiceDiscoveryProtocol = "microdns_renderer";
/// <summary>
/// The name of the folder that contains the per-architecture folders
/// </summary>
......@@ -36,9 +36,8 @@ namespace LibVLCSharp.Shared
internal static extern IntPtr LibVLCRendererDiscovererEventManager(IntPtr rendererDiscoverer);
public RendererDiscoverer(LibVLC libVLC, string name)
: base(() => Native.LibVLCRendererDiscovererNew(libVLC.NativeReference, name),
public RendererDiscoverer(LibVLC libVLC, string name = Constants.ServiceDiscoveryProtocol)
: base(() => Native.LibVLCRendererDiscovererNew(libVLC.NativeReference, name), Native.LibVLCRendererDiscovererRelease)
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