This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIT License | |
Copyright (c) 2022 Matt Johnson-Pint | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class LibMpv { | |
const string mpv = "mpv-1.dll"; | |
[DllImport(mpv, EntryPoint = "mpv_command_string", CallingConvention = CallingConvention.Cdecl)] | |
public static extern MpvError Command(IntPtr ctx, [In()] [MarshalAs(UnmanagedType.LPStr)] string args); | |
[DllImport(mpv, EntryPoint = "mpv_initialize", CallingConvention = CallingConvention.Cdecl)] | |
public static extern MpvError Initialize(IntPtr ctx); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
var file = "http://m.radiofollow.me:8000/live192"; | |
var handles = new List<IntPtr>(); | |
var rand = new Random(); | |
for (int i = 0; i < 10; i++) | |
{ | |
var handle = LibMpv.Create(); | |
handles.Add(handle); | |
LibMpv.Initialize(handle); |