Wasabi ExpressPlay SDK for Desktop Systems  1.10
Data Structures | Macros | Typedefs | Enumerations | Functions
WsbMediaFile.h File Reference

Wasabi Media File API. More...

#include "WsbTypes.h"
#include "ShiAttributes.h"
#include "ShiData.h"

Go to the source code of this file.

Data Structures

struct  WSB_AudioMediaInfo
 Information about audio media. More...
 
struct  WSB_VideoMediaInfo
 Information about video media. More...
 
struct  WSB_MediaInfo
 Information about a media file. More...
 
struct  WSB_FileProgress
 File progress information. More...
 

Macros

#define WSB_CONTENT_TYPE_VIDEO_MP4   "video/mp4"
 Identifiers for mime type. More...
 
#define WSB_CONTENT_TYPE_AUDIO_MP4   "audio/mp4"
 
#define WSB_CONTENT_TYPE_VIDEO_MPEG2TS   "video/MP2T"
 
#define WSB_CONTENT_TYPE_DASH   "application/dash+xml"
 
#define WSB_CONTENT_TYPE_HLS   "application/vnd.apple.mpegurl"
 
#define WSB_CONTENT_TYPE_DCF   "application/vnd.oma.drm.dcf"
 
#define WSB_CONTENT_TYPE_DECE   "video/vnd.dece.mp4"
 
#define WSB_MEDIA_FILE_METADATA_FILTER_MINIMAL_SET   1
 Identifiers for metadata filters. More...
 
#define WSB_MEDIA_FILE_METADATA_FILTER_BASIC_SET   2
 
#define WSB_MEDIA_FILE_METADATA_FILTER_EXTENDED_SET   4
 
#define WSB_MEDIA_FILE_METADATA_FILTER_LICENSE   8
 
#define WSB_MEDIA_FILE_METADATA_FILTER_ALL   0xFFFFFFFF
 
#define WSB_MEDIA_FILE_FLAG_PROGRESS_CAN_START   1
 Identifiers for file progress flags. More...
 
#define WSB_FILE_METADATA_NAME   "Name" /* string */
 Media file metadata items and their corresponding data types. More...
 
#define WSB_FILE_METADATA_ARTIST   "Artist" /* string */
 
#define WSB_FILE_METADATA_ALBUM_ARTIST   "AlbumArtist" /* string */
 
#define WSB_FILE_METADATA_COMPOSER   "Composer" /* string */
 
#define WSB_FILE_METADATA_WRITER   "Writer" /* string */
 
#define WSB_FILE_METADATA_ALBUM   "Album" /* string */
 
#define WSB_FILE_METADATA_GENRE_CODE   "GenreCode" /* integer */
 
#define WSB_FILE_METADATA_GENRE_NAME   "GenreName" /* string */
 
#define WSB_FILE_METADATA_GROUPING   "Grouping" /* string */
 
#define WSB_FILE_METADATA_DATE   "Date" /* string */
 
#define WSB_FILE_METADATA_ENCODING_TOOL   "Tool", /* string */
 
#define WSB_FILE_METADATA_COMMENT   "Comment" /* string */
 
#define WSB_FILE_METADATA_LYRICS   "Lyrics" /* string */
 
#define WSB_FILE_METADATA_COPYRIGHT   "Copyright" /* string */
 
#define WSB_FILE_METADATA_TRACK_NUMBER   "Track" /* integer */
 
#define WSB_FILE_METADATA_DISC_NUMBER   "Disc" /* integer */
 
#define WSB_FILE_METADATA_COVER_ART   "Cover" /* byte array */
 
#define WSB_FILE_METADATA_DESCRIPTION   "Description" /* string */
 
#define WSB_FILE_METADATA_RATING   "Rating" /* integer */
 
#define WSB_FILE_METADATA_TEMPO   "Tempo" /* integer */
 
#define WBS_FILE_METADATA_COMPILATION   "Compilation" /* boolean */
 
#define WSB_FILE_METADATA_IS_GAPLESS   "IsGapless" /* boolean */
 
#define WSB_FILE_METADATA_TITLE   "Title" /* string */
 
#define WSB_FILE_METADATA_DESCRIPTION   "Description" /* string */
 
#define WSB_FILE_METADATA_STORE_FRONT   "StoreFrontId" /* integer */
 
#define WSB_FILE_METADATA_FILE_KIND   "FileKind" /* integer */
 
#define WSB_FILE_METADATA_SHOW_NAME   "ShowName" /* string */
 
#define WSB_FILE_METADATA_SHOW_SEASON   "ShowSeason" /* integer */
 
#define WSB_FILE_METADATA_SHOW_EPISODE_NUM   "ShowEpisodeNumber" /* integer */
 
#define WSB_FILE_METADATA_SHOW_EPISONE_NAME   "ShowEpisodeName" /* string */
 
#define WSB_FILE_METADATA_TV_NETWORK_NAME   "TVNetworkName" /* string */
 
#define WSB_FILE_METADATA_IS_PODCAST   "IsPodcast" /* boolean */
 
#define WSB_FILE_METADATA_PODCAST_URL   "PodcastUrl" /* string */
 
#define WSB_FILE_METADATA_PODCAST_GUID   "PodcastGuid" /* byte array */
 
#define WSB_FILE_METADATA_PODCAST_CATEGORY   "PodcastCategory" /* string */
 
#define WSB_FILE_METADATA_KEYWORDS   "Keywords" /* string */
 
#define WSB_FILE_METADATA_PURCHASE_DATE   "PurchaseDate" /* string */
 
#define WSB_FILE_METADATA_ICON_URI   "IconUri" /* string */
 
#define WSB_FILE_METADATA_INFO_URL   "Info URL" /* string */
 
#define WSB_FILE_METADATA_COVER_ART_URI   "CoverUri" /* string */
 
#define WSB_FILE_METADATA_LYRICS_URI   "LyricsUri" /* string */
 
#define WSB_FILE_METADATA_DURATION   "Duration" /* integer */
 
#define WSB_FILE_METADATA_PERFORMER   "Performer" /* string */
 
#define WSB_FILE_METADATA_AUTHOR   "Author" /* string */
 
#define WSB_SLAS_ATTRIBUTE_NAME   "SilentLicenseAcquisitionUrls"
 Identifiers for the file attribute special URLs. More...
 
#define WSB_RI_ATTRIBUTE_NAME   "RightsIssuerUrls"
 

Typedefs

typedef struct WSB_MediaFile WSB_MediaFile
 A WSB_MediaFile object represents information about a media file. More...
 
typedef struct WSB_TrackInfo WSB_TrackInfo
 A WSB_TrackInfo object represents information about a track in a media file. More...
 
typedef struct WSB_AudioMediaInfo WSB_AudioMediaInfo
 Information about audio media. More...
 
typedef struct WSB_VideoMediaInfo WSB_VideoMediaInfo
 Information about video media. More...
 
typedef struct WSB_MediaInfo WSB_MediaInfo
 Information about a media file. More...
 
typedef struct WSB_FileProgress WSB_FileProgress
 File progress information. More...
 

Enumerations

enum  WSB_MediaType {
  WSB_MEDIA_TYPE_UNKNOWN = 0,
  WSB_MEDIA_TYPE_AUDIO = 1,
  WSB_MEDIA_TYPE_VIDEO = 2
}
 Identifiers for the different media types. More...
 
enum  WSB_MediaFormat {
  WSB_MEDIA_FORMAT_UNKNOWN = 0,
  WSB_MEDIA_FORMAT_AAC = 1,
  WSB_MEDIA_FORMAT_AVC = 2,
  WSB_MEDIA_FORMAT_MP3 = 3,
  WSB_MEDIA_FORMAT_MPEG4_VID = 4,
  WSB_MEDIA_FORMAT_HEVC = 5,
  WSB_MEDIA_FORMAT_AC3 = 6
}
 Identifiers for media formats. More...
 
enum  WSB_StreamEncryptionMethod {
  WSB_STREAM_ENCRYPTION_METHOD_UNKNOWN = 0,
  WSB_STREAM_ENCRYPTION_METHOD_NULL = 1,
  WSB_STREAM_ENCRYPTION_METHOD_AES_128_CBC = 2,
  WSB_STREAM_ENCRYPTION_METHOD_AES_128_CTR = 3,
  WSB_STREAM_ENCRYPTION_METHOD_DVB_CSA = 4
}
 Identifiers for stream encryption methods. More...
 
enum  WSB_MediaFileProtectionType {
  WSB_PROTECTION_TYPE_UNKNOWN = 0,
  WSB_PROTECTION_TYPE_CLEAR_TEXT = 1,
  WSB_PROTECTION_TYPE_DCF = 2,
  WSB_PROTECTION_TYPE_PDCF = 3,
  WSB_PROTECTION_TYPE_PIFF = 4,
  WSB_PROTECTION_TYPE_BBTS = 5,
  WSB_PROTECTION_TYPE_CENC = 6,
  WSB_PROTECTION_TYPE_HLS_AES = 7
}
 Identifiers for media file protection types. 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 void WSB_TrackInfo_Release (WSB_TrackInfo *track_info)
 Releases the specified WSB_TrackInfo object. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_Open (const char *name, const char *mime_type, WSB_MediaFile **file)
 Opens the specified media file and creates a WSB_MediaFile object referencing it. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_GetProtectionType (WSB_MediaFile *file, WSB_MediaFileProtectionType *type)
 Gets the type of protection on the specified media file, which may be none (indicated as WSB_PROTECTION_TYPE_CLEAR_TEXT). More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_GetMetadata (WSB_MediaFile *file, SHI_Attribute **metadata)
 Returns an attribute list containing all the metadata for the specified media file. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_GetProgress (WSB_MediaFile *file, WSB_FileProgress *progress)
 Gets file progress information, indicating how many bytes of the file are available, and the total number of bytes in the file. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_SetLicense (WSB_MediaFile *file, const void *license_data, WSB_Size license_data_size)
 Attempts to write the given license into the specified file. More...
 
WSB_EXPORT const char * WSB_MediaFile_GetContentId (WSB_MediaFile *file)
 Returns the content ID for the content in the specified media file. More...
 
WSB_EXPORT const char * WSB_MediaFile_GetContentType (WSB_MediaFile *file)
 Gets the specified media file's content type as a MIME type. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_GetMediaInfo (WSB_MediaFile *file, WSB_MediaInfo *media_info)
 Gets basic information, such as media type, format, and so on, about the specified media file. More...
 
WSB_EXPORT WSB_Cardinal WSB_MediaFile_GetTrackCount (WSB_MediaFile *file)
 Returns the number of tracks in the specified media file. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_GetTrackInfo (WSB_MediaFile *file, WSB_Ordinal index, WSB_TrackInfo **track_info)
 Gets information about a specified track. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_GetLicense (WSB_MediaFile *file, SHI_Data **license)
 Gets the license from the metadata attached to the specified media file. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_GetRightsIssuerUrls (WSB_MediaFile *file, SHI_Attribute **ri_urls)
 Gets the right issuer URLs from the specified media file. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_GetSilentLicenseAcquisitionUrls (WSB_MediaFile *file, SHI_Attribute **slas)
 Gets the silent license acquisition URLs from the specified media file. More...
 
WSB_EXPORT const char * WSB_MediaFile_GetName (WSB_MediaFile *file)
 Gets the name of the media file, which was passed in during creation. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_WaitUntilReady (WSB_MediaFile *file, WSB_UInt32 file_ready_timeout_ms)
 Waits until the file is ready or the specified timeout has been reached. More...
 
WSB_EXPORT WSB_Result WSB_MediaFile_Close (WSB_MediaFile *file)
 Closes the media file and releases the WSB_MediaFile object referencing it. More...
 

Detailed Description

Wasabi Media File API.

Macro Definition Documentation

#define WBS_FILE_METADATA_COMPILATION   "Compilation" /* boolean */
#define WSB_CONTENT_TYPE_AUDIO_MP4   "audio/mp4"
#define WSB_CONTENT_TYPE_DASH   "application/dash+xml"
#define WSB_CONTENT_TYPE_DCF   "application/vnd.oma.drm.dcf"
#define WSB_CONTENT_TYPE_DECE   "video/vnd.dece.mp4"
#define WSB_CONTENT_TYPE_HLS   "application/vnd.apple.mpegurl"
#define WSB_CONTENT_TYPE_VIDEO_MP4   "video/mp4"

Identifiers for mime type.

#define WSB_CONTENT_TYPE_VIDEO_MPEG2TS   "video/MP2T"
#define WSB_FILE_METADATA_ALBUM   "Album" /* string */
#define WSB_FILE_METADATA_ALBUM_ARTIST   "AlbumArtist" /* string */
#define WSB_FILE_METADATA_ARTIST   "Artist" /* string */
#define WSB_FILE_METADATA_AUTHOR   "Author" /* string */
#define WSB_FILE_METADATA_COMMENT   "Comment" /* string */
#define WSB_FILE_METADATA_COMPOSER   "Composer" /* string */
#define WSB_FILE_METADATA_COPYRIGHT   "Copyright" /* string */
#define WSB_FILE_METADATA_COVER_ART   "Cover" /* byte array */
#define WSB_FILE_METADATA_COVER_ART_URI   "CoverUri" /* string */
#define WSB_FILE_METADATA_DATE   "Date" /* string */
#define WSB_FILE_METADATA_DESCRIPTION   "Description" /* string */
#define WSB_FILE_METADATA_DESCRIPTION   "Description" /* string */
#define WSB_FILE_METADATA_DISC_NUMBER   "Disc" /* integer */
#define WSB_FILE_METADATA_DURATION   "Duration" /* integer */
#define WSB_FILE_METADATA_ENCODING_TOOL   "Tool", /* string */
#define WSB_FILE_METADATA_FILE_KIND   "FileKind" /* integer */
#define WSB_FILE_METADATA_GENRE_CODE   "GenreCode" /* integer */
#define WSB_FILE_METADATA_GENRE_NAME   "GenreName" /* string */
#define WSB_FILE_METADATA_GROUPING   "Grouping" /* string */
#define WSB_FILE_METADATA_ICON_URI   "IconUri" /* string */
#define WSB_FILE_METADATA_INFO_URL   "Info URL" /* string */
#define WSB_FILE_METADATA_IS_GAPLESS   "IsGapless" /* boolean */
#define WSB_FILE_METADATA_IS_PODCAST   "IsPodcast" /* boolean */
#define WSB_FILE_METADATA_KEYWORDS   "Keywords" /* string */
#define WSB_FILE_METADATA_LYRICS   "Lyrics" /* string */
#define WSB_FILE_METADATA_LYRICS_URI   "LyricsUri" /* string */
#define WSB_FILE_METADATA_NAME   "Name" /* string */

Media file metadata items and their corresponding data types.

#define WSB_FILE_METADATA_PERFORMER   "Performer" /* string */
#define WSB_FILE_METADATA_PODCAST_CATEGORY   "PodcastCategory" /* string */
#define WSB_FILE_METADATA_PODCAST_GUID   "PodcastGuid" /* byte array */
#define WSB_FILE_METADATA_PODCAST_URL   "PodcastUrl" /* string */
#define WSB_FILE_METADATA_PURCHASE_DATE   "PurchaseDate" /* string */
#define WSB_FILE_METADATA_RATING   "Rating" /* integer */
#define WSB_FILE_METADATA_SHOW_EPISODE_NUM   "ShowEpisodeNumber" /* integer */
#define WSB_FILE_METADATA_SHOW_EPISONE_NAME   "ShowEpisodeName" /* string */
#define WSB_FILE_METADATA_SHOW_NAME   "ShowName" /* string */
#define WSB_FILE_METADATA_SHOW_SEASON   "ShowSeason" /* integer */
#define WSB_FILE_METADATA_STORE_FRONT   "StoreFrontId" /* integer */
#define WSB_FILE_METADATA_TEMPO   "Tempo" /* integer */
#define WSB_FILE_METADATA_TITLE   "Title" /* string */
#define WSB_FILE_METADATA_TRACK_NUMBER   "Track" /* integer */
#define WSB_FILE_METADATA_TV_NETWORK_NAME   "TVNetworkName" /* string */
#define WSB_FILE_METADATA_WRITER   "Writer" /* string */
#define WSB_MEDIA_FILE_FLAG_PROGRESS_CAN_START   1

Identifiers for file progress flags.

#define WSB_MEDIA_FILE_METADATA_FILTER_ALL   0xFFFFFFFF
#define WSB_MEDIA_FILE_METADATA_FILTER_BASIC_SET   2
#define WSB_MEDIA_FILE_METADATA_FILTER_EXTENDED_SET   4
#define WSB_MEDIA_FILE_METADATA_FILTER_LICENSE   8
#define WSB_MEDIA_FILE_METADATA_FILTER_MINIMAL_SET   1

Identifiers for metadata filters.

#define WSB_RI_ATTRIBUTE_NAME   "RightsIssuerUrls"
#define WSB_SLAS_ATTRIBUTE_NAME   "SilentLicenseAcquisitionUrls"

Identifiers for the file attribute special URLs.

Typedef Documentation

Information about audio media.

File progress information.

typedef struct WSB_MediaFile WSB_MediaFile

A WSB_MediaFile object represents information about a media file.

typedef struct WSB_MediaInfo WSB_MediaInfo

Information about a media file.

typedef struct WSB_TrackInfo WSB_TrackInfo

A WSB_TrackInfo object represents information about a track in a media file.

Information about video media.

Enumeration Type Documentation

Identifiers for media file protection types.

Enumerator
WSB_PROTECTION_TYPE_UNKNOWN 
WSB_PROTECTION_TYPE_CLEAR_TEXT 
WSB_PROTECTION_TYPE_DCF 
WSB_PROTECTION_TYPE_PDCF 
WSB_PROTECTION_TYPE_PIFF 
WSB_PROTECTION_TYPE_BBTS 
WSB_PROTECTION_TYPE_CENC 
WSB_PROTECTION_TYPE_HLS_AES 

Identifiers for media formats.

Enumerator
WSB_MEDIA_FORMAT_UNKNOWN 
WSB_MEDIA_FORMAT_AAC 
WSB_MEDIA_FORMAT_AVC 
WSB_MEDIA_FORMAT_MP3 
WSB_MEDIA_FORMAT_MPEG4_VID 
WSB_MEDIA_FORMAT_HEVC 
WSB_MEDIA_FORMAT_AC3 

Identifiers for the different media types.

Enumerator
WSB_MEDIA_TYPE_UNKNOWN 
WSB_MEDIA_TYPE_AUDIO 
WSB_MEDIA_TYPE_VIDEO 

Identifiers for stream encryption methods.

Enumerator
WSB_STREAM_ENCRYPTION_METHOD_UNKNOWN 
WSB_STREAM_ENCRYPTION_METHOD_NULL 
WSB_STREAM_ENCRYPTION_METHOD_AES_128_CBC 
WSB_STREAM_ENCRYPTION_METHOD_AES_128_CTR 
WSB_STREAM_ENCRYPTION_METHOD_DVB_CSA