本文整理汇总了C#中ArgusTV.DataContracts.LiveStream类的典型用法代码示例。如果您正苦于以下问题:C# LiveStream类的具体用法?C# LiveStream怎么用?C# LiveStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LiveStream类属于ArgusTV.DataContracts命名空间,在下文中一共展示了LiveStream类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LiveStreamEnded
public override void LiveStreamEnded(LiveStream liveStream)
{
if (_statusForm != null)
{
_statusForm.OnLiveStreamEnded(liveStream);
}
}
示例2: LiveStreamEnded
public override void LiveStreamEnded(LiveStream liveStream)
{
Log.Debug("EventListener: LiveStreamEnded()");
OnLiveStreamEnded(liveStream,LiveStreamAbortReason.Unknown,null);
}
示例3: OnLiveStreamChanged
private void OnLiveStreamChanged(LiveStream liveStream)
{
RefreshBotPersonalMessage();
}
示例4: AsyncStopLiveStreamThreadMain
private void AsyncStopLiveStreamThreadMain()
{
if (_streamToStopAsync != null)
{
for (int i = 0; i < 50 ;i++)
{
if (!GUIGraphicsContext.IsPlaying)
break;
Thread.Sleep(100);
Log.Debug("ChannelNavigator: AsyncStopLiveStream wait 100ms {0}",_lastChannelChangeFailed);
}
Thread.Sleep(200);
for (int i = 0; i < 10; i++)
{
try
{
this.ControlAgent.StopLiveStream(_streamToStopAsync);
}
catch
{
Thread.Sleep(25);
}
}
_streamToStopAsync = null;
}
}
示例5: StopLiveStream
/// <summary>
/// Use this when you are sure that the livestream playback was stopped some time ago.
/// </summary>
public void StopLiveStream()
{
Log.Debug("ChannelNavigator: StopLiveStream()");
if (_liveStream != null)
{
this.ControlAgent.StopLiveStream(_liveStream);
_liveStream = null;
if (_currentChannel != null)
_navigatorChannels[_currentChannel.ChannelType].PreviousChannel = _currentChannel;
}
if (!_doingChannelChange && !_lastChannelChangeFailed)
_currentChannel = null;
}
示例6: StartAndPlayNewLiveStream
private LiveStreamResult StartAndPlayNewLiveStream(Channel channel,LiveStream liveStream)
{
LiveStreamResult result = this.ControlAgent.TuneLiveStream(channel, ref liveStream);
Log.Debug("ChannelNavigator: start a new live stream, result = {0}", result);
if (result == LiveStreamResult.Succeeded)
{
result = PlayLiveStream(liveStream);
if (result == LiveStreamResult.Succeeded)
{
if (_autoFullScreen) g_Player.ShowFullScreenWindow();
}
}
return result;
}
示例7: GetLiveStreamTuningDetails
public virtual ServiceTuning GetLiveStreamTuningDetails(LiveStream liveStream)
{
return null;
}
示例8: TuneLiveStream
public virtual LiveStreamResult TuneLiveStream(Channel channel, CardChannelAllocation upcomingRecordingAllocation, ref LiveStream liveStream)
{
liveStream = null;
return LiveStreamResult.NotSupported;
}
示例9: GetTeletextPageBytes
/// <summary>
/// Request a teletext page/subpage from the recorder for the given live stream.
/// </summary>
/// <param name="liveStream">The live stream.</param>
/// <param name="pageNumber">The teletext page number.</param>
/// <param name="subPageNumber">The teletext subpage number.</param>
/// <returns>The requested page content, or null if the page was not ready yet.</returns>
public async Task<GetTeletextPageBytesResult> GetTeletextPageBytes(LiveStream liveStream, int pageNumber, int subPageNumber)
{
var request = NewRequest(HttpMethod.Put, "Live/Teletext/GetPage/{0}/{1}", pageNumber, subPageNumber);
request.AddBody(liveStream);
var data = await ExecuteAsync<InternalGetTeletextPageBytesResult>(request).ConfigureAwait(false);
return new GetTeletextPageBytesResult
{
Bytes = Convert.FromBase64String(data.result),
SubPageCount = data.subPageCount
};
}
示例10: IsGrabbingTeletext
/// <summary>
/// Ask the recorder whether it is grabbing teletext for the given live stream.
/// </summary>
/// <param name="liveStream">The live stream.</param>
/// <returns>True if the recorder is grabbing teletext.</returns>
public async Task<bool> IsGrabbingTeletext(LiveStream liveStream)
{
var request = NewRequest(HttpMethod.Put, "Live/Teletext/IsGrabbing");
request.AddBody(liveStream);
return await ExecuteResult<bool>(request).ConfigureAwait(false);
}
示例11: StopGrabbingTeletext
/// <summary>
/// Tell the recorder to stop grabbing teletext for the given live stream.
/// </summary>
/// <param name="liveStream">The live stream.</param>
public async Task StopGrabbingTeletext(LiveStream liveStream)
{
var request = NewRequest(HttpMethod.Put, "Live/Teletext/StopGrabbing");
request.AddBody(liveStream);
await ExecuteAsync(request).ConfigureAwait(false);
}
示例12: GetLiveStreamTuningDetails
/// <summary>
/// Ask the recorder for the give live stream's tuning details (if possible).
/// </summary>
/// <param name="liveStream">The active live stream.</param>
/// <returns>The service tuning details, or null if none are available.</returns>
public async Task<ServiceTuning> GetLiveStreamTuningDetails(LiveStream liveStream)
{
var request = NewRequest(HttpMethod.Put, "Live/TuningDetails");
request.AddBody(liveStream);
return await ExecuteResult<ServiceTuning>(request).ConfigureAwait(false);
}
示例13: GetChannelsLiveState
/// <summary>
/// Get the live tuning state of a number of channels.
/// </summary>
/// <param name="channels">The channels to get the live state from.</param>
/// <param name="liveStream">The live stream you want to be ignored (since it's yours), or null.</param>
/// <returns>An array with all the live states for the given channels.</returns>
public async Task<List<ChannelLiveState>> GetChannelsLiveState(IList<Channel> channels, LiveStream liveStream)
{
var request = NewRequest(HttpMethod.Put, "ChannelsLiveState");
request.AddBody(new
{
channels = ChannelsAsArgument(channels),
stream = liveStream
});
return await ExecuteResult<List<ChannelLiveState>>(request).ConfigureAwait(false);
}
示例14: KeepLiveStreamAlive
/// <summary>
/// Tell the recorder we are still showing this stream and to keep it alive. Call this every 30 seconds or so.
/// </summary>
/// <param name="liveStream">The live stream that is stil in use.</param>
/// <returns>True if the live stream is still running, false otherwise.</returns>
public async Task<bool> KeepLiveStreamAlive(LiveStream liveStream)
{
var request = NewRequest(HttpMethod.Put, "Live/KeepAlive");
request.AddBody(liveStream);
return await ExecuteResult<bool>(request).ConfigureAwait(false);
}
示例15: TuneLiveStream
/// <summary>
/// Tune to a channel, and get a live stream to that channel.
/// </summary>
/// <param name="channel">The channel to tune to.</param>
/// <param name="upcomingRecordingAllocation">The allocation if the next upcoming recording, or null if there isn't one.</param>
/// <param name="liveStream">A live stream that is either existing or null for a new one.</param>
/// <returns>A LiveStreamResult value to indicate success or failure, and a new or updated live stream.</returns>
public async Task<TuneLiveStreamResult> TuneLiveStream(Channel channel, CardChannelAllocation upcomingRecordingAllocation, LiveStream liveStream)
{
var request = NewRequest(HttpMethod.Post, "Live/Tune");
request.AddBody(new
{
channel = channel,
upcomingRecordingAllocation = upcomingRecordingAllocation,
stream = liveStream
});
var data = await ExecuteAsync<InternalTuneLiveStreamResult>(request).ConfigureAwait(false);
return new TuneLiveStreamResult
{
Result = data.result,
Stream = data.stream
};
}