public override void Put(StreamBase f)
 {
     base.Put(f);
     col.Put(f);
     f.WriteByte((byte)(desc ? 1 : 0));
 }
示例#2
0
        private async Task UpdateSmashcastStreamAsync(StreamBase stream)
        {
            Uri uri = new Uri($"{ApiRoot}/user/{stream.AccountName}");

            stream.IsLive = await GetSmashcastApiResponse(uri);
        }
 public override void Put(StreamBase f)
 {
     base.Put(f);
     f.PutString(alias);
 }
示例#4
0
 private static async Task UpdateChaturbateStreamAsync(StreamBase stream)
 {
     stream.IsLive = await GetIsLiveAsync(stream.AccountLink);
 }
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, StreamBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_SubscribeStream, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Pluginv2.SubscribeStreamRequest, global::Pluginv2.SubscribeStreamResponse>(serviceImpl.SubscribeStream));
     serviceBinder.AddMethod(__Method_PublishStream, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Pluginv2.PublishStreamRequest, global::Pluginv2.PublishStreamResponse>(serviceImpl.PublishStream));
     serviceBinder.AddMethod(__Method_RunStream, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Pluginv2.RunStreamRequest, global::Pluginv2.StreamPacket>(serviceImpl.RunStream));
 }
示例#6
0
 /// <inheritdoc />
 public async Task DownloadMediaStreamAsync(StreamBase mediaStream, string filePath)
 {
     await HttpClient.DownloadToFileAsync(mediaStream.Url, filePath);
 }
 /// <summary>
 /// Meldet einen Datenstrom zum Datenempfang an.
 /// </summary>
 /// <param name="pid">Die gewünschte Datestromkennung (PID).</param>
 /// <param name="type">Die Art der Nutzdaten im Datenstrom.</param>
 /// <param name="stream">Der Empfänger der Daten.</param>
 private void AddConsumer(ushort pid, StreamTypes type, StreamBase stream) => m_Consumers.Add(Hardware.AddConsumer(pid, type, stream.AddPayload));