isteamvideo.cs (2056B)
1 // This file is provided under The MIT License as part of Steamworks.NET. 2 // Copyright (c) 2013-2019 Riley Labrecque 3 // Please see the included LICENSE.txt for additional information. 4 5 // This file is automatically generated. 6 // Changes to this file will be reverted when you update Steamworks.NET 7 8 #if UNITY_ANDROID || UNITY_IOS || UNITY_TIZEN || UNITY_TVOS || UNITY_WEBGL || UNITY_WSA || UNITY_PS4 || UNITY_WII || UNITY_XBOXONE || UNITY_SWITCH 9 #define DISABLESTEAMWORKS 10 #endif 11 12 #if !DISABLESTEAMWORKS 13 14 using System.Runtime.InteropServices; 15 using IntPtr = System.IntPtr; 16 17 namespace Steamworks { 18 public static class SteamVideo { 19 /// <summary> 20 /// <para> Get a URL suitable for streaming the given Video app ID's video</para> 21 /// </summary> 22 public static void GetVideoURL(AppId_t unVideoAppID) { 23 InteropHelp.TestIfAvailableClient(); 24 NativeMethods.ISteamVideo_GetVideoURL(CSteamAPIContext.GetSteamVideo(), unVideoAppID); 25 } 26 27 /// <summary> 28 /// <para> returns true if user is uploading a live broadcast</para> 29 /// </summary> 30 public static bool IsBroadcasting(out int pnNumViewers) { 31 InteropHelp.TestIfAvailableClient(); 32 return NativeMethods.ISteamVideo_IsBroadcasting(CSteamAPIContext.GetSteamVideo(), out pnNumViewers); 33 } 34 35 /// <summary> 36 /// <para> Get the OPF Details for 360 Video Playback</para> 37 /// </summary> 38 public static void GetOPFSettings(AppId_t unVideoAppID) { 39 InteropHelp.TestIfAvailableClient(); 40 NativeMethods.ISteamVideo_GetOPFSettings(CSteamAPIContext.GetSteamVideo(), unVideoAppID); 41 } 42 43 public static bool GetOPFStringForApp(AppId_t unVideoAppID, out string pchBuffer, ref int pnBufferSize) { 44 InteropHelp.TestIfAvailableClient(); 45 IntPtr pchBuffer2 = Marshal.AllocHGlobal((int)pnBufferSize); 46 bool ret = NativeMethods.ISteamVideo_GetOPFStringForApp(CSteamAPIContext.GetSteamVideo(), unVideoAppID, pchBuffer2, ref pnBufferSize); 47 pchBuffer = ret ? InteropHelp.PtrToStringUTF8(pchBuffer2) : null; 48 Marshal.FreeHGlobal(pchBuffer2); 49 return ret; 50 } 51 } 52 } 53 54 #endif // !DISABLESTEAMWORKS