37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
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) ? null : InteropHelp.PtrToStringUTF8(intPtr));
|
|
Marshal.FreeHGlobal(intPtr);
|
|
return flag;
|
|
}
|
|
}
|
|
}
|