Retrieves the requested tags/headers from a URL stream, if they are available.
Namespace: Un4seen.Bass.AddOn.Tags
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- stream
- Type: SystemInt32
The stream to get the TAG information from. - tags
- Type: Un4seen.Bass.AddOn.TagsTAG_INFO
The TAG_INFO class where to put the data.
Return Value
Type: BooleanIf TAGs could be retrieved successfully is returned, else is returned.
Remarks
This method first tries to get streaming header information via BASS_TAG_ICY and BASS_TAG_HTTP. Then it tries the following tags in that order: BASS_TAG_META, BASS_TAG_OGG, BASS_TAG_APE and BASS_TAG_WMA.
This method is able to retrieve the following TAGs:
Shoutcast streaming | BASS_TAG_ICY and BASS_TAG_META |
Icecast streaming | BASS_TAG_HTTP and BASS_TAG_OGG |
WMA streaming | Use BASS_TAG_GetFromFile(String) instead, since WMA URL stream are created with the file method. |
APE streaming | BASS_TAG_HTTP and BASS_TAG_APE |
title | With the detected new stream title, if found.
Note: The 'streamtitle' might be composed within the meta data, e.g. Shoutcast combines the artist name and the real track name together. Shoutcast titles will be split at the first occurence of a " - " seperator. |
artist | With the detected new artist, if found.
Note: For Shoutcast stream this will be set as the 'streamtile' will splitted. |
album | With the detected name of the stream, if found (eg. icy-name). |
genre | With the detected genre of the stream, if found (eg. icy-genre). |
comment | With the detected new stream url, if found (eg. icy-url). |
year | With the detected bitrate, if found (only used with shoutcast streams, eg. icy-br). |
Examples
// create a stream int stream = BASS_StreamCreateURL(url, 0, BASSFlag.BASS_STREAM_STATUS, null, 0); // update the tags TAG_INFO tagInfo = new TAG_INFO(url); if ( BassTags.BASS_TAG_GetFromURL( stream, tagInfo) ) { // display the tags... }
See Also