Share via


IWMSPlaylist.UncueStream (C#)

banner art

Previous Next

IWMSPlaylist.UncueStream (C#)

The UncueStream method specifies that content that was previously prepared for streaming is uncued.

Syntax

  Playlist
  .UncueStream(
  
  IXMLDOMElement
    pPlaylistEntry
  
  );

Parameters

pPlaylistEntry

[in] IXMLDOMElement containing a playlist entry object.

Return Values

This method does not return a value.

If this method fails, it throws an exception.

Number Meaning
0xC00D14B7L Indicates that pPlaylistEntry is not a media element.
0xC00D14B4L Indicates that pPlaylistEntry is already playing.

Example Code

using interop_msxml;
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer          Server;
IWMSPlayers        Players;
IWMSPlayer         Player;
IWMSPlaylist       Playlist;
IXMLDOMElement     PlaylistEntry;

bool               bVal;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the IWMSPlayers object.
    Players = Server.Players;

    // Retrieve information about each requested playlist.
    for (int i = 0; i < Players.Count; i++)
    {
        Player = Players[i];

        // Retrieve the playlist requested
        // by the client, if one exists.
        Playlist = Player.RequestedPlaylist;

        // Retrieve information about the current playlist entry.
        PlaylistEntry = Playlist.CurrentPlaylistEntry;

        // Retrieve the next playlist entry.
        PlaylistEntry = Playlist.get_CallerEntry(PlaylistEntry);

        // Retrieve information about each playlist entry.
        while (PlaylistEntry != null)
        {
            // Retrieve a Boolean value indicating whether this
            // playlist entry is cued.
            bVal = Playlist.get_IsStreamCued(PlaylistEntry);

            // Uncue playlist entry if it is cued.
            if (bVal == true)
            {
                Playlist.UncueStream (PlaylistEntry);
            }

            PlaylistEntry = Playlist.get_CallerEntry(PlaylistEntry);
        }
    }







Requirements

Reference: Add a reference to Microsoft.WindowsMediaServices

Namespace: Microsoft.WindowsMediaServices.Interop

Assembly: Microsoft.WindowsMediaServices.dll

Library: WMSServerTypeLib.dll

Platform: Windows Server 2003 family, Windows Server 2008 family.

See Also

Previous Next