Export (0) Print
Expand All

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.

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

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


public class ManifestInfo

The ManifestInfo type exposes the following members.

  NameDescription
Public propertySupported by Windows PhoneAttributesGets or sets attributes.
Public propertySupported by Windows PhoneLogUrisGets the list of logging Uri objects.
Public propertyManifestType
Public propertySupported by Windows PhoneProtectionInfoContains information specified in the protection element inside the manifest.
Public propertySupported by Windows PhoneSegmentsList of SegmentInfo objects. There is a SegmentInfo for each <Clip> element in the manifest.
Top

  NameDescription
Public methodSupported by Windows PhoneEquals (Inherited from Object.)
Protected methodSupported by Windows PhoneFinalize (Inherited from Object.)
Public methodSupported by Windows PhoneGetHashCode (Inherited from Object.)
Public methodSupported by Windows PhoneGetType (Inherited from Object.)
Protected methodSupported by Windows PhoneMemberwiseClone (Inherited from Object.)
Public methodStatic memberSupported by Windows PhoneParseManifestParses the Smooth Streaming manifest.
Public methodSupported by Windows PhoneToString (Inherited from Object.)
Top

  NameDescription
Public eventChunkListChangedEvent 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 PhoneSelectStreamsCompletedEvent activated when a SelectStreamsAsync call has completed in any of the segments contained in Segments.
Top

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.

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);
                    }
                }
            }
        }
    }

Silverlight

Supported in: 5

Windows Phone

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

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