isteamvideo001 interface added

This commit is contained in:
Detanup01 2024-06-14 11:59:45 +02:00 committed by otavepto
parent 58e934cea0
commit 4390cc1616
5 changed files with 30 additions and 2 deletions

View File

@ -21,7 +21,8 @@
#include "base.h"
class Steam_Video :
public ISteamVideo
public ISteamVideo,
public ISteamVideo001
{
public:

View File

@ -5413,6 +5413,11 @@ STEAMAPI_API steam_bool SteamAPI_ISteamInventory_InspectItem( ISteamInventory* s
return (ptr)->InspectItem(pResultHandle, pchItemToken);
}
STEAMAPI_API ISteamVideo *SteamAPI_SteamVideo_v001()
{
return get_steam_client()->GetISteamVideo(flat_hsteamuser(), flat_hsteampipe(), "STEAMVIDEO_INTERFACE_V001");
}
STEAMAPI_API ISteamVideo *SteamAPI_SteamVideo_v002()
{
return get_steam_client()->GetISteamVideo(flat_hsteamuser(), flat_hsteampipe(), "STEAMVIDEO_INTERFACE_V002");

View File

@ -782,7 +782,10 @@ ISteamVideo *Steam_Client::GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSt
PRINT_DEBUG("%s", pchVersion);
if (!steam_pipes.count(hSteamPipe) || !hSteamuser) return NULL;
if (strcmp(pchVersion, STEAMVIDEO_INTERFACE_VERSION) == 0) {
if (strcmp(pchVersion, "STEAMVIDEO_INTERFACE_V00") == 0) {
return reinterpret_cast<ISteamVideo *>(static_cast<ISteamVideo001 *>(steam_video));
}
else if (strcmp(pchVersion, STEAMVIDEO_INTERFACE_VERSION) == 0) {
return reinterpret_cast<ISteamVideo *>(static_cast<ISteamVideo *>(steam_video));
}

View File

@ -0,0 +1,18 @@
#ifndef ISTEAMVIDEO001_H
#define ISTEAMVIDEO001_H
#ifdef _WIN32
#pragma once
#endif
class ISteamVideo001
{
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;
};
#endif // ISTEAMVIDEO001_H

View File

@ -177,6 +177,7 @@
#include "isteaminventory001.h"
#include "isteaminventory002.h"
#include "isteamvideo.h"
#include "isteamvideo001.h"
#include "isteamparentalsettings.h"
#include "isteamgamecoordinator.h"
#include "isteammasterserverupdater.h"