ManifestInfo Class

Represents the manifest in application code. This class corresponds to the <SmoothStreamingMedia> element in the client manifest and to the SmoothStreamingSource property of the SmoothStreamingMediaElement.

Inheritance Hierarchy

System.Object
  Microsoft.Web.Media.SmoothStreaming.ManifestInfo

Namespace:  Microsoft.Web.Media.SmoothStreaming
Assembly:  Microsoft.Web.Media.SmoothStreaming (in Microsoft.Web.Media.SmoothStreaming.dll)

Syntax

'Declaration

Public Class ManifestInfo
'Usage

Dim instance As ManifestInfo
public class ManifestInfo
public ref class ManifestInfo
type ManifestInfo =  class end
public class ManifestInfo

The ManifestInfo type exposes the following members.

Properties

  Name Description
Public propertySupported by Windows Phone Attributes Gets or sets attributes.
Public propertySupported by Windows Phone LogUris Gets the list of logging Uri objects.
Public property ManifestType
Public propertySupported by Windows Phone ProtectionInfo Contains information specified in the protection element inside the manifest.
Public propertySupported by Windows Phone Segments List of SegmentInfo objects. There is a SegmentInfo for each <Clip> element in the manifest.

Top

Methods

  Name Description
Public methodSupported by Windows Phone Equals (Inherited from Object.)
Protected methodSupported by Windows Phone Finalize (Inherited from Object.)
Public methodSupported by Windows Phone GetHashCode (Inherited from Object.)
Public methodSupported by Windows Phone GetType (Inherited from Object.)
Protected methodSupported by Windows Phone MemberwiseClone (Inherited from Object.)
Public methodStatic memberSupported by Windows Phone ParseManifest Parses the Smooth Streaming manifest.
Public methodSupported by Windows Phone ToString (Inherited from Object.)

Top

Events

  Name Description
Public event ChunkListChanged Event activated when the fragment info of a new text/binary chunk in a live scenario is added to the manifest. This event will fire on the UI thread.
Public eventSupported by Windows Phone SelectStreamsCompleted Event activated when a SelectStreamsAsync call has completed in any of the segments contained in Segments.

Top

Remarks

The object represents the top element in the client manifest. It has a collection of SegmentInfo objects, which each contain AvailableStreams and SelectedStreams collections. These StreamInfo objects contain the audio, video, and textual data of Smooth Streaming presentations. The SelectedStreams property must include exactly one video stream and one audio stream. Non-audio/video streams do not have this restriction and can be multiply selected and deselected. The streams in the list must be members of the current segment’s AvailableStreams and/or SelectedStreams collections. To generate the lists of available streams or selected streams use a List<T>.CopyTo constructor of type StreamInfo to copy either the AvailableStreams or the SelectedStreams property. Add or remove streams until you have the desired list.

Notifications for de-selection of current streams will arrive before selection notifications on a per-segment basis. Applications can clean up any state associated with the deselected stream before adding state associated with the new stream. However, due to the possibility of multiple segments, it is preferable to use the UniqueId property to identify the stream with which objects are associated.

Examples

The following example shows how to get SegmentInfo and StreamInfo objects from the ManifestInfo object.

For more information, see Microsoft Smooth Streaming Client 2.0

    void SmoothPlayer_ManifestReady(object sender, EventArgs e)
    {
        if (!PremiumAccount)
        {
            foreach (SegmentInfo segment in SmoothPlayer.ManifestInfo.Segments)
            {
                IList<StreamInfo> streamInfoList = segment.AvailableStreams;
                foreach (StreamInfo stream in streamInfoList)
                {
                    if (stream.Type == MediaStreamType.Video)
                    {
                        // Limit bit-rate to 866000.
                        ulong highRate = 866000 + 1;
                        List<TrackInfo> tracks = new List<TrackInfo>();

                        tracks = stream.AvailableTracks.ToList<TrackInfo>();
                        IList<TrackInfo> allowedTracks = tracks.Where((ti) => ti.Bitrate < highRate).ToList();
                        stream.SelectTracks(allowedTracks, false);
                    }
                }
            }
        }
    }

Version Information

Silverlight

Supported in: 5

Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Web.Media.SmoothStreaming Namespace