Creates a sample stream from a WebM or Matroska file.
HSTREAM BASS_WEBM_StreamCreateFile( BOOL mem, void *file, QWORD offset, QWORD length, DWORD flags, DWORD track );
mem | TRUE = stream the file from memory. | ||||||||||||||||
file | Filename (mem = FALSE) or a memory location (mem = TRUE). | ||||||||||||||||
offset | File offset to begin streaming from (only used if mem = FALSE). | ||||||||||||||||
length | Data length... 0 = use all data up to the end of the file (if mem = FALSE). | ||||||||||||||||
flags | A combination of these flags.
| ||||||||||||||||
track | The track to play from the file... 1 = first, 0 = first playable track. When requesting the first playable track, all tracks will be checked in numerical order until a playable one is found. The active track is available via the BASS_ATTRIB_WEBM_TRACK attribute. |
BASS_ERROR_INIT | BASS_Init has not been successfully called. |
BASS_ERROR_NOTAVAIL | The BASS_STREAM_AUTOFREE flag cannot be combined with the BASS_STREAM_DECODE flag. |
BASS_ERROR_ILLPARAM | The length must be specified when streaming from memory. |
BASS_ERROR_FILEOPEN | The file could not be opened. |
BASS_ERROR_FILEFORM | The file's format is not recognised/supported. |
BASS_ERROR_NOTAUDIO | The track or file does not contain audio. |
BASS_ERROR_CODEC | The file uses a codec that is not available/supported. |
BASS_ERROR_FORMAT | The sample format is not supported. |
BASS_ERROR_SPEAKER | The specified SPEAKER flags are invalid. |
BASS_ERROR_MEM | There is insufficent memory. |
BASS_ERROR_NO3D | Could not initialize 3D support. |
BASS_ERROR_WEBM_TRACK | track is invalid. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
When using the plugin system, the availability of the BASS_ATTRIB_WEBM_TRACK attribute can be used to identify a WebM or Matroska file. The stream's ctype value from BASS_ChannelGetInfo tells the format of the active track from the file.
WebM and Matroska files can have tags for the file as a whole and for individual tracks. When present, they are available as a series of null-terminated UTF-8 strings from BASS_ChannelGetTags with BASS_TAG_WEBM and BASS_TAG_WEBM_TRACK, respectively. In the case of BASS_TAG_WEBM_TRACK, the active track's tags are given. When the Vorbis codec is used, BASS_TAG_OGG tags may also be available.
BASS_ChannelGetInfo, BASS_ChannelGetLength, BASS_ChannelGetTags, BASS_ChannelPlay, BASS_ChannelSetAttribute, BASS_ChannelSetDSP, BASS_ChannelSetFX, BASS_StreamFree, BASS_StreamGetFilePosition