Share via


IWMSAdminArchiveSink Object (C#)

banner art

Previous Next

IWMSAdminArchiveSink Object (C#)

You can use the IWMSAdminArchiveSink object to archive streamed content. This object is exposed by the WMS Archive Data Writer plug-in. The IWMSAdminArchiveSink object exposes the following properties and methods.

Property Description
ActivePath Retrieves the path to the content that is being archived.
AutoStart Specifies and retrieves a Boolean value indicating whether archiving begins automatically when streaming begins.
AvailableDiskSpace Retrieves the amount of remaining disk space that can be used for archiving.
Bandwidth Retrieves the current bandwidth used by the content being archived.
ElapsedTime Retrieves the amount of time that the archiving process has been running.
IsRecording Retrieves a Boolean value indicating whether the archiving process is running.
Path Specifies and retrieves the template path to which content is being archived.
Method Description
ExpandTemplate Retrieves the expanded form of a tokenized template path.
StartRecord Starts the archiving process.
StopRecord Stops the archiving process.

Example Code

The following example illustrates how to retrieve an IWMSAdminArchiveSink object.

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

// Declare variables.
WMSServer Server;
IWMSBroadcastPublishingPoint BCPubPoint;
IWMSPlugin Plugin;
IWMSAdminArchiveSink AdminArchiveSink;

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

    // Add a new broadcast publishing point.
    BCPubPoint = (IWMSBroadcastPublishingPoint)
                 Server.PublishingPoints.Add("NewPubPoint",
                                           WMS_PUBLISHING_POINT_CATEGORY.
                                           WMS_PUBLISHING_POINT_BROADCAST,
                                           "c:\\wmpub\\wmroot\\playlist.wsx");

    // Retrieve the plug-in to be configured.
    Plugin = BCPubPoint.BroadcastDataSinks[
                             "WMS Archive Data Writer"];

    // Retrieve the custom interface of the plug-in.
    AdminArchiveSink =
        (IWMSAdminArchiveSink)Plugin.CustomInterface;
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

See Also

Previous Next