Wasabi ExpressPlay SDK for Desktop Systems  1.23.0
Functions
WSB_TrackInfo Class

Media track information access. More...

Functions

WSB_EXPORT const char * WSB_TrackInfo_GetContentId (WSB_TrackInfo *track_info)
 Gets the content ID for the specified track. More...
 
WSB_EXPORT WSB_UInt32 WSB_TrackInfo_GetTrackId (WSB_TrackInfo *track_info)
 Gets the track ID. More...
 
WSB_EXPORT WSB_Result WSB_TrackInfo_GetMediaInfo (WSB_TrackInfo *track_info, WSB_MediaInfo *media_info)
 Gets the media info for the specified track. More...
 
WSB_EXPORT WSB_Result WSB_TrackInfo_GetContentProtection (WSB_TrackInfo *track_info, SHI_Attribute **content_protection)
 Gets the content protection elements for the specified track. More...
 
WSB_EXPORT void WSB_TrackInfo_Release (WSB_TrackInfo *track_info)
 Releases the specified WSB_TrackInfo object. More...
 

Detailed Description

Media track information access.

Function Documentation

◆ WSB_TrackInfo_GetContentId()

WSB_EXPORT const char* WSB_TrackInfo_GetContentId ( WSB_TrackInfo track_info)

Gets the content ID for the specified track.

Note: This cannot be called after the WSB_MediaFile referencing the file containing the track has been released (via a call to WSB_MediaFile_Close).

Parameters
track_infoThe WSB_TrackInfo from which the content ID is obtained.
Returns
The content ID.

◆ WSB_TrackInfo_GetContentProtection()

WSB_EXPORT WSB_Result WSB_TrackInfo_GetContentProtection ( WSB_TrackInfo track_info,
SHI_Attribute **  content_protection 
)

Gets the content protection elements for the specified track.

This method only applies to DASH content. The caller is responsible for calling SHI_Attribute_Release to release the SHI_Attribute object when it is no longer needed. If the content protection elements cannot be found or an error occurs, no SHI_Attribute object is created, and the SHI_Attribute pointer is set to NULL.

Parameters
track_infoThe WSB_TrackInfo from which ContentProtection elements are applied either from encompassing Representation or AdaptationSet.
content_protection

Address of a SHI_Attribute pointer that will, upon successful return, points to a SHI_Attribute object containing the content protection elements. The SHI_Attribute encodes all the content protection elements that apply to a given track in three levels. The first level is a SHI_Attribute list, the SHI_Attribute type is SHI_ATTRIBUTE_TYPE_LIST. Each child (the second level) corresponds to a ContentProtection element. The child's name is the value of schemeIdUri attribute of the ContentProtection element. The child's SHI_Attribute type is SHI_ATTRIBUTE_TYPE_LIST. The child list contains items (the third level) with SHI_Attribute type of SHI_ATTRIBUTE_TYPE_STRING.

For example, item name: a XML ContentProtection element attribute names such as "cenc:default_KID" or "value", or the string "@xml-body" for the actual XML ContentProtection body. item value: the corresponding attribute or XML body value.

Since
1.22

◆ WSB_TrackInfo_GetMediaInfo()

WSB_EXPORT WSB_Result WSB_TrackInfo_GetMediaInfo ( WSB_TrackInfo track_info,
WSB_MediaInfo media_info 
)

Gets the media info for the specified track.

Note: This cannot be called after the WSB_MediaFile referencing the file containing the track has been released (via a call to WSB_MediaFile_Close).

Parameters
track_infoThe WSB_TrackInfo from which the media info is obtained.
[out]media_infoThe media info for the track.

◆ WSB_TrackInfo_GetTrackId()

WSB_EXPORT WSB_UInt32 WSB_TrackInfo_GetTrackId ( WSB_TrackInfo track_info)

Gets the track ID.

Note: This cannot be called after the WSB_MediaFile referencing the file containing the track has been released (via a call to WSB_MediaFile_Close).

Parameters
track_infoThe WSB_TrackInfo from which the track ID is obtained.
Returns
The track ID.

◆ WSB_TrackInfo_Release()

WSB_EXPORT void WSB_TrackInfo_Release ( WSB_TrackInfo track_info)

Releases the specified WSB_TrackInfo object.

A WSB_TrackInfo must be released when it is no longer needed, by calling this method. Note: This method cannot be called after the WSB_MediaFile referencing the file containing the track has been released, so all WSB_TrackInfo objects representing tracks in the media file should be released prior to calling WSB_MediaFile_Close.

Parameters
track_infoThe WSB_TrackInfo to release.