/// <summary> /// Base constructor. /// </summary> /// <param name="source">The source to transcode, most commonly path to a file.</param> /// <param name="transcoder">The transcoder to use.</param> public TranscodingStreamer(string source, TranscoderProfile transcoder) { this.Source = source; this.Transcoder = transcoder; currentState = State.Initialized; }
public static TranscoderProfile CreateFromXmlNode(XmlNode node) { TranscoderProfile transcoder = new TranscoderProfile(); foreach (XmlNode child in node.ChildNodes) { if (child.Name == "name") transcoder.Name = child.InnerText; if (child.Name == "useTranscoding") transcoder.UseTranscoding = child.InnerText == "true"; if (child.Name == "inputMethod") transcoder.InputMethod = (TransportMethod)Enum.Parse(typeof(TransportMethod), child.InnerText, true); if (child.Name == "outputMethod") transcoder.OutputMethod = (TransportMethod)Enum.Parse(typeof(TransportMethod), child.InnerText, true); if (child.Name == "transcoder") transcoder.Transcoder = child.InnerText; if (child.Name == "parameters") transcoder.Parameters = child.InnerText; if (child.Name == "mime") transcoder.MIME = child.InnerText; } return transcoder; }
/// <summary> /// Convenience method to use when streaming live TV. /// /// Based on the transcoder configuration, we need to pass an RTSP url, a path to the TS buffer file to the transcoder, or we need to read the TS /// buffer file ourself. This method abstracts that choice from your application. /// </summary> /// <param name="RTSPurl">URL to the RTSP stream.</param> /// <param name="tsbuffer">Path to the TsBuffer file.</param> /// <param name="transcoder">The transcoder to use.</param> public TranscodingStreamer(string RTSPurl, string tsbuffer, TranscoderProfile transcoder) : this(transcoder.UseTranscoding && (transcoder.InputMethod == TransportMethod.Filename || transcoder.InputMethod == TransportMethod.Path) ? RTSPurl : tsbuffer, transcoder) { }
public Encoder(TranscoderProfile transcoder, string input) { this.Profile = transcoder; this.Input = input; this.WantTranscoderInfo = false; }