using System; using System.Runtime.InteropServices; namespace Steamworks; public static class SteamVideo { public static void GetVideoURL(AppId_t unVideoAppID) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamVideo_GetVideoURL(CSteamAPIContext.GetSteamVideo(), unVideoAppID); } public static bool IsBroadcasting(out int pnNumViewers) { InteropHelp.TestIfAvailableClient(); return NativeMethods.ISteamVideo_IsBroadcasting(CSteamAPIContext.GetSteamVideo(), out pnNumViewers); } public static void GetOPFSettings(AppId_t unVideoAppID) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamVideo_GetOPFSettings(CSteamAPIContext.GetSteamVideo(), unVideoAppID); } public static bool GetOPFStringForApp(AppId_t unVideoAppID, out string pchBuffer, ref int pnBufferSize) { InteropHelp.TestIfAvailableClient(); IntPtr intPtr = Marshal.AllocHGlobal(pnBufferSize); bool flag = NativeMethods.ISteamVideo_GetOPFStringForApp(CSteamAPIContext.GetSteamVideo(), unVideoAppID, intPtr, ref pnBufferSize); pchBuffer = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); Marshal.FreeHGlobal(intPtr); return flag; } }