Provides functions to interface with the Steam video and broadcasting platforms.
See
features/streaming_video for more information.
Member Functions
Member functions for
ISteamVideo
are called through the global accessor function
SteamVideo()
.
GetOPFSettings
void GetOPFSettings( AppId_t unVideoAppID );
Name | Type | Description |
unVideoAppID | AppId_t | The video app ID to get the OPF details of. |
Get the OPF details for 360 video playback
To retrieve the 360 OPF (open projection format) data to playback a 360 video, start by making a call to this, then the callback will indicate whether the request was successful. If it was successful, the actual OPF JSON data can be retrieved with a call to
GetOPFStringForApp.
Returns: void
Triggers a
GetOPFSettingsResult_t callback.
GetOPFStringForApp
bool GetOPFStringForApp( AppId_t unVideoAppID, char *pchBuffer, int32 *pnBufferSize );
Name | Type | Description |
unVideoAppID | AppId_t | The video app ID to get the OPF string for. |
pchBuffer | char * | Returns the OPF string by writing it to this buffer. |
pnBufferSize | int32 * | This should be set to the size of pchBuffer , and returns the number of bytes written to pchBuffer . |
Gets the OPF string for the specified video App ID.
Once the callback for
GetOPFSettingsResult_t has been raised and the EResult indicates success, then calling this will return back the actual OPF data in a JSON format. The size of the OPF string varies, but at this time 48,000 bytes should be sufficient to contain the full string. If it is not,
pnBufferSize
will be set to the size required. In that case, make a second call with the correct buffer size.
NOTE: The data returned in a successful call to GetOPFStringForApp() can only be retrieved once. If you need to retrieve it multiple times, a call to
GetOPFSettings will need to be made each time.
Returns: bool
true if we have the OPF details from a previous call to
GetOPFSettings, otherwise
false.
Returns the details in
pchBuffer
.
For a description of the OPF format and an example response, please see the
Pixvana OPF web page.
GetVideoURL
void GetVideoURL( AppId_t unVideoAppID );
Name | Type | Description |
unVideoAppID | AppId_t | The video app ID to receive the video stream for. |
Asynchronously gets the URL suitable for streaming the video associated with the specified video app ID.
Returns: void
Triggers a
GetVideoURLResult_t callback.
See Also: DASH on WikipediaIsBroadcasting
bool IsBroadcasting( int *pnNumViewers );
Name | Type | Description |
pnNumViewers | int * | Returns the number of viewers currently watching the live broadcast. |
Checks if the user is currently live broadcasting and gets the number of users.
Returns: bool
true if user is uploading a live broadcast, otherwise
false.
Returns the number of viewers via
pnNumViewers
if the user is currently broadcasting.
Callbacks
These are callbacks which can be fired by calling
SteamAPI_RunCallbacks. Many of these will be fired directly in response to the member functions of
ISteamVideo
.
BroadcastUploadStart_t
Automatically called whenever the user starts broadcasting.
This callback has no fields.
BroadcastUploadStop_t
Automatically called whenever the user stops broadcasting.
GetOPFSettingsResult_t
Triggered when the OPF Details for 360 video playback are retrieved.
After receiving this you can use
GetOPFStringForApp to access the OPF details.
Name | Type | Description |
m_eResult | EResult | The result of the operation. Possible values:
|
m_unVideoAppID | AppId_t | The app ID of the video that we got the details of. |
Associated Functions: GetOPFSettingsGetVideoURLResult_t
Provides the result of a call to
GetVideoURL.
Name | Type | Description |
m_eResult | EResult | The result of the operation.
|
m_unVideoAppID | AppId_t | The App ID provided in the original call to GetVideoURL. |
m_rgchURL | char[256] | If the call was successful this contains the URL to the MPEG-DASH Standard schema formatted xml document which can be used to stream the content. |
Associated Functions: GetVideoURLConstants
These are constants which are defined for use with ISteamVideo.
Name | Type | Value | Description |
STEAMVIDEO_INTERFACE_VERSION | const char * | "STEAMVIDEO_INTERFACE_V002" | |