ChunkResult Class

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

Inheritance Hierarchy


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



Public Class ChunkResult

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

The ChunkResult type exposes the following members.


  Name Description
Public property ChunkData Gets or sets the data contained by ChunkResult.
Public property Error Contains error information if an error occurs.
Public property Result Gets or sets the result of call to BeginGetChunk or GetChunkUri.
Public property Timestamp Gets or sets the time stamp of the chunk in ticks.



  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)



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.

    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;


Version Information


Supported in: 5

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


Microsoft.Web.Media.SmoothStreaming Namespace