IWMEncPushDistribution.PublishingPoint

Windows Media Encoder SDK banner art

The PublishingPoint property specifies and retrieves a publishing point name.

Syntax

string = IWMEncPushDistribution.PublishingPoint;
IWMEncPushDistribution.PublishingPoint = string;

Parameters

This property takes no parameters.

Property Value

A String that contains the name of your publishing point.

If this property fails, it returns an error number.

Return code Number Description
NS_E_INVALIDCALL_WHILE_ENCODER_RUNNING 0xC00D1B66L This property cannot be set while the encoder engine is running.

Remarks

You can specify an existing publishing point, or specify a new name to create a new publishing point. The publishing point is created with the default settings on the Windows Media server, unless you use IWMEncPushDistribution.Template to specify an existing publishing point from which to copy settings.

Note You must have access permission to the Windows Media Services service through DCOM, and the encoding computer must have write access on the Windows Media server to be able to push a stream to it. For more information about configuring publishing points, see the Windows Media Services Help.

Example Code

using WMEncoderLib;

try
{
// Create a WMEncoder object.
  WMEncoder Encoder;
  Encoder = new WMEncoder();

// Configure the encoding session including the input sources and profile.

// Create a push distribution object.
  IWMEncPushDistribution PushDist;
  PushDist = (IWMEncPushDistribution)Encoder.Broadcast;

// Declare variables. 
  string sServerName;
  string sPubPoint;
  string sPubTemplate;
  string sBrdcstInfo;
  string sMyNSCFile;
  string sMyNSCURL;
  string sMyASXFile;

// Provide values for the following variables.
  sServerName = "YOURSERVERNAME:PORTNUMBER";
  sPubPoint = "PUBLISHING_POINT_NAME";
  sPubTemplate = "EXISTING_PUBLISHING_POINT_NAME";
  sBrdcstInfo = "NAME OF THE BROACAST INFORMATION FILE";
  sMyNSCFile = "NAME OF THE NSC FILE TO CREATE";
  sMyNSCURL = "URL TO THE NSC FILE YOU CREATE";
  sMyASXFile = "NAME OF THE ANNOUNCMENT FILE";

// Specify the server name, publishing point, an existing publishing
// point, and then generate an .nsc file and announcement file. 
  PushDist.ServerName = sServerName;
  PushDist.PublishingPoint = sPubPoint;
  PushDist.Template = sPubTemplate;

// Specify whether to destroy the publishing point.
  PushDist.AutoRemovePublishingPoint = true;

// Initialize the encoding session.
  Encoder.PrepareToEncode(true);

// Generate the announcement file.
  PushDist.GenerateMulticastInfoFile(sMyNSCFile);
  PushDist.GenerateAnnouncementFile(sMyNSCURL, sMyASXFile);

// Start encoding.
  Encoder.Start();
}

catch (Exception e)
{
     // TODO: Handle exceptions.
}

Requirements

Reference: Windows Media Encoder

Namespace: WMEncoderLib

Assembly: Interop.WMEncoderLib.dll

Library: WMEncoderLib.dll

See Also