private static string EncodeTimeCode(TimeCode time) { //00:50:39:13 (last is frame) return time.ToHHMMSSFF(); }
private static string EncodeTimeCode(TimeCode time) { //00:03:15:22 (last is frame) return time.ToHHMMSSFF(); }
private static string ToTimeCode(TimeCode timeCode) { return timeCode.ToHHMMSSFF(); //10:00:07:27 }
/// <summary> /// The encode time code. /// </summary> /// <param name="time"> /// The time. /// </param> /// <returns> /// The <see cref="string"/>. /// </returns> private static string EncodeTimeCode(TimeCode time) { return time.ToHHMMSSFF(); }
private static void WriteTime(FileStream fs, TimeCode timeCode, bool addEndBytes) { var time = timeCode.ToHHMMSSFF(); var buffer = Encoding.ASCII.GetBytes(time); fs.Write(buffer, 0, buffer.Length); if (addEndBytes) { fs.WriteByte(0xd); fs.WriteByte(0xa); } }
/// <summary> /// The make time code. /// </summary> /// <param name="tc"> /// The tc. /// </param> /// <returns> /// The <see cref="string"/>. /// </returns> private static string MakeTimeCode(TimeCode tc) { return tc.ToHHMMSSFF(); }
private static void WriteTime(FileStream fs, TimeCode timeCode) { fs.WriteByte(0xb); byte[] buffer = Encoding.ASCII.GetBytes(timeCode.ToHHMMSSFF()); fs.Write(buffer, 0, buffer.Length); }
private static string EncodeEndTimeCode(TimeCode time) { //00:50:39:13 (last is frame) //Bugfix for Avid - On 23.976 FPS and 24 FPS projects, when the End time of a subtitle ends in 02, 07, 12, 17, 22, 27 frames, the subtitle won't import. if (Math.Abs(Configuration.Settings.General.CurrentFrameRate - 23.976) < 0.01 || Math.Abs(Configuration.Settings.General.CurrentFrameRate - 24) < 0.01) { var frames = SubtitleFormat.MillisecondsToFramesMaxFrameRate(time.Milliseconds); if (frames == 2 || frames == 7 || frames == 12 || frames == 17 || frames == 22 || frames == 27) frames--; return string.Format("{0:00}:{1:00}:{2:00}:{3:00}", time.Hours, time.Minutes, time.Seconds, frames); } else { return time.ToHHMMSSFF(); } }
private static string EncodeTimeCode(TimeCode time) { var s = time.ToHHMMSSFF(); return AddSpaces(s); }