internal static string DumpConfig(this AudioStreamInfo audioConf) { StringBuilder sb = new StringBuilder(); sb.AppendLine("AudioStreamInfo:"); sb.Append("\tmimeType = "); sb.AppendLine(audioConf.mimeType.ToString()); sb.Append("\tsampleRate = "); sb.AppendLine(audioConf.sampleRate.ToString()); sb.Append("\tchannels = "); sb.AppendLine(audioConf.channels.ToString()); sb.AppendLine("\tCodec Data:"); sb.AppendLine(DumpTools.HexDump(audioConf.codecData)); return(sb.ToString()); }
internal static string DumpConfig(this VideoStreamInfo videoConf) { StringBuilder sb = new StringBuilder(); sb.AppendLine("VideoStreamInfo:"); sb.Append("\tmimeType = "); sb.AppendLine(videoConf.mimeType.ToString()); sb.Append("\tWidth / Max = "); sb.Append(videoConf.width); sb.Append(" / "); sb.AppendLine(videoConf.maxWidth.ToString()); sb.Append("\tHeight / Max = "); sb.Append(videoConf.height); sb.Append(" / "); sb.AppendLine(videoConf.maxHeight.ToString()); sb.Append("\tFrameRate = "); sb.Append(videoConf.num + "/"); sb.Append(videoConf.den); sb.AppendLine(" (" + (videoConf.num / (videoConf.den == 0 ? 1 : videoConf.den)) + ")"); sb.AppendLine("\tCodec Data:"); sb.AppendLine(DumpTools.HexDump(videoConf.codecData)); return(sb.ToString()); }
public override string ToString() { return("\tCodecData:\n" + DumpTools.HexDump(CodecExtraData)); }