feyris-tan 30026b2b02
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 3m38s
Added functionality necessary to extract the MPEG-DASH segments on the Arsat stream.
2025-11-23 00:27:00 +01:00

52 lines
1.0 KiB
C#

using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace skyscraper8.Ietf.Rfc4566_SDP
{
public class SdpMedia
{
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name);
public SdpMedia(string[] args)
{
if (!MediaType.TryParse(args[0], true, out _mediaType))
{
logger.ErrorFormat("Unknown Media Type \"{0}\", assuming \"data\"", args[0]);
_mediaType = MediaType.Data;
}
Port = ushort.Parse(args[1]);
Transport = args[2];
int numFormats = args.Length - 3;
FormatList = new string[numFormats];
Array.Copy(args, 3, FormatList, 0, numFormats);
}
public string[] FormatList { get; private set; }
public string Transport { get; private set; }
public ushort Port { get; private set; }
private MediaType _mediaType;
public MediaType MediaType
{
get => _mediaType;
}
}
public enum MediaType
{
Audio,
Video,
Application,
Data,
Control
}
}