Facepunch.Steamworks/Generator/steam_sdk/isteamvideo.h

69 lines
1.9 KiB
C
Raw Normal View History

2016-10-31 12:00:47 +03:00
//====== Copyright <20> 1996-2014 Valve Corporation, All rights reserved. =======
//
// Purpose: interface to Steam Video
//
//=============================================================================
#ifndef ISTEAMVIDEO_H
#define ISTEAMVIDEO_H
#ifdef _WIN32
#pragma once
#endif
2019-04-11 18:19:09 +03:00
#include "steam_api_common.h"
2016-10-31 12:00:47 +03:00
// callbacks
#if defined( VALVE_CALLBACK_PACK_SMALL )
#pragma pack( push, 4 )
#elif defined( VALVE_CALLBACK_PACK_LARGE )
#pragma pack( push, 8 )
#else
2019-04-11 18:19:09 +03:00
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
2016-10-31 12:00:47 +03:00
#endif
//-----------------------------------------------------------------------------
// Purpose: Steam Video API
//-----------------------------------------------------------------------------
class ISteamVideo
{
public:
// Get a URL suitable for streaming the given Video app ID's video
virtual void GetVideoURL( AppId_t unVideoAppID ) = 0;
// returns true if user is uploading a live broadcast
virtual bool IsBroadcasting( int *pnNumViewers ) = 0;
2017-05-08 22:56:31 +03:00
// Get the OPF Details for 360 Video Playback
2019-04-11 18:19:09 +03:00
STEAM_CALL_BACK( GetOPFSettingsResult_t )
2017-05-08 22:56:31 +03:00
virtual void GetOPFSettings( AppId_t unVideoAppID ) = 0;
virtual bool GetOPFStringForApp( AppId_t unVideoAppID, char *pchBuffer, int32 *pnBufferSize ) = 0;
2016-10-31 12:00:47 +03:00
};
2017-05-08 22:56:31 +03:00
#define STEAMVIDEO_INTERFACE_VERSION "STEAMVIDEO_INTERFACE_V002"
2016-10-31 12:00:47 +03:00
2019-04-11 18:19:09 +03:00
// Global interface accessor
inline ISteamVideo *SteamVideo();
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamVideo *, SteamVideo, STEAMVIDEO_INTERFACE_VERSION );
2016-10-31 12:00:47 +03:00
2021-11-22 15:22:54 +03:00
STEAM_CALLBACK_BEGIN( GetVideoURLResult_t, k_iSteamVideoCallbacks + 11 )
2019-04-11 18:19:09 +03:00
STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult )
STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
STEAM_CALLBACK_MEMBER( 2, char, m_rgchURL[256] )
STEAM_CALLBACK_END(3)
2017-05-08 22:56:31 +03:00
2019-04-11 18:19:09 +03:00
2021-11-22 15:22:54 +03:00
STEAM_CALLBACK_BEGIN( GetOPFSettingsResult_t, k_iSteamVideoCallbacks + 24 )
2019-04-11 18:19:09 +03:00
STEAM_CALLBACK_MEMBER( 0, EResult, m_eResult )
STEAM_CALLBACK_MEMBER( 1, AppId_t, m_unVideoAppID )
STEAM_CALLBACK_END(2)
2016-10-31 12:00:47 +03:00
#pragma pack( pop )
#endif // ISTEAMVIDEO_H