blob: 9c8d287bd47834dfc8ac82817817e2e0ea6419d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
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;
}
}
|