No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

25 líneas
740 B

  1. using JT1078.Flv.Metadata;
  2. using System;
  3. using System.Buffers.Binary;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. using System.Linq;
  7. namespace JT1078.Flv.Extensions
  8. {
  9. public static class Amf3Extensions
  10. {
  11. public static void WriteDouble(this IAmf3Metadata metadata, Span<byte> value)
  12. {
  13. var flvBuffer = BitConverter.GetBytes(Convert.ToDouble(metadata.Value)).AsSpan();
  14. flvBuffer.Reverse();
  15. flvBuffer.CopyTo(value);
  16. }
  17. public static void WriteBool(this IAmf3Metadata metadata, Span<byte> value)
  18. {
  19. var flvBuffer = BitConverter.GetBytes(Convert.ToBoolean(metadata.Value)).AsSpan();
  20. flvBuffer.CopyTo(value);
  21. }
  22. }
  23. }