Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ChunkResult Class

Contains all the result information for the BeginGetChunk and EndGetChunk methods.

System..::..Object
  Microsoft.Web.Media.SmoothStreaming..::..ChunkResult

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

public class ChunkResult

The ChunkResult type exposes the following members.

  NameDescription
Public propertyChunkDataGets or sets the data contained by ChunkResult.
Public propertyErrorContains error information if an error occurs.
Public propertyResultGets or sets the result of call to BeginGetChunk or GetChunkUri.
Public propertyTimestampGets or sets the time stamp of the chunk in ticks.
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

The following example shows the call to the EndGetChunk(IAsyncResult) method and return of a ChunkResult object that contains the results data and indicates success or failure. For more information on this asynchronous scenario, see Timeline Markers and Events (IIS Smooth Streaming).

    foreach (TrackInfo trackInfo in streamInfo.SelectedTracks)
    {
        ChunkResult chunkResult = trackInfo.EndGetChunk(argAR);

        if (chunkResult.Result == ChunkResult.ChunkResultState.Succeeded)
        {
            System.Text.Encoding enc = System.Text.Encoding.UTF8;
            int length = (int)chunkResult.ChunkData.Length;
            byte[] rawData = new byte[length];
            chunkResult.ChunkData.Read(rawData, 0, length);
            String text = enc.GetString(rawData, 0, rawData.Length);
            TimelineMarker newMarker = new TimelineMarker();
            newMarker.Text = text;
            newMarker.Time = chunkResult.Timestamp;

            SmoothPlayer.Markers.Add(newMarker);
        }
    }

Silverlight

Supported in: 4

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