IWMEncStatistics2.PushDistributionStats
The PushDistributionStats property retrieves an IWMEncPushDistributionStats object for status information about push distribution.
Syntax
object = IWMEncStatistics2.PushDistributionStats;
Parameters
This property takes no parameters.
Property Value
An IWMEncPushDistributionStats object.
Remarks
This property is read-only. The IWMEncPushDistributionStats object contains information about the broadcast such as the number of connected players, bandwidth, the start time, and the server CPU.
Example Code
using WMEncoderLib;
try
{
// Create a WMEncoder object.
WMEncoder Encoder;
Encoder = new WMEncoder();
// Retrieve an IWMEncStatistics object.
IWMEncStatistics2 Stats;
Stats = (IWMEncStatistics2)Encoder.Statistics;
// Configure the encoding session.
// Configure push distribution.
// Retrieve an IWMEncPushDistributionStats object from the
// IWMEncStatistics2 object.
IWMEncPushDistributionStats PushStats;
PushStats = (IWMEncPushDistributionStats)Stats.PushDistributionStats;
// You can create a timer control to retrieve the statistics
// (as follows) after you start the encoding session.
object vStartTime;
object vCurPlayers;
object vPeakPlayers;
object vTTLPlayers;
object vPLimit;
object vCurBWidth;
object vPeakBWidth;
object vBWidthLim;
object vCPU;
vStartTime = PushStats.get_Property("PubPointStartTimeForPeak");
vCurPlayers = PushStats.get_Property("PubPointCurrentConnectedPlayers");
vPeakPlayers = PushStats.get_Property("PubPointPeakConnectedPlayers");
vTTLPlayers = PushStats.get_Property("PubPointTotalConnectedPlayers");
vPLimit = PushStats.get_Property("PubPointPlayersLimit");
vCurBWidth = PushStats.get_Property("PubPointCurrentPlayerBandwidth");
vPeakBWidth = PushStats.get_Property("PubPointPeakPlayerBandwidth");
vBWidthLim = PushStats.get_Property("PubPointBandwidthLimit");
vCPU = PushStats.get_Property("CurrentServerCPU");
}
catch (Exception e)
{
// TODO: Handle exceptions.
}
Requirements
Reference: Windows Media Encoder
Namespace: WMEncoderLib
Assembly: Interop.WMEncoderLib.dll
Library: WMEncoderLib.dll
See Also