public void StartEncode(JsonEncodeObject encodeObject) { JsonSerializerSettings settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, }; string encode = JsonConvert.SerializeObject(encodeObject, Formatting.Indented, settings); HBFunctions.hb_add_json(this.hbHandle, InteropUtilities.ToUtf8PtrFromString(encode)); HBFunctions.hb_start(this.hbHandle); this.encodePollTimer = new Timer(); this.encodePollTimer.Interval = EncodePollIntervalMs; this.encodePollTimer.Elapsed += (o, e) => { try { this.PollEncodeProgress(); } catch (Exception exc) { Debug.WriteLine(exc); } }; this.encodePollTimer.Start(); }
public void StartEncode(string encodeJson) { HBFunctions.hb_add_json(this.Handle, InteropUtilities.ToUtf8PtrFromString(encodeJson)); HBFunctions.hb_start(this.Handle); this.encodePollTimer = new Timer(); this.encodePollTimer.Interval = EncodePollIntervalMs; this.encodePollTimer.Elapsed += (o, e) => { try { this.PollEncodeProgress(); } catch (Exception exc) { Debug.WriteLine(exc); } }; this.encodePollTimer.Start(); }
public void StartEncode(EncodeJob job, Title title) { JsonEncodeObject encodeObject = EncodeFactory.Create(job, title); JsonSerializerSettings settings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, }; string encode = JsonConvert.SerializeObject(encodeObject, Formatting.Indented, settings); HBFunctions.hb_add_json(this.hbHandle, InteropUtilities.ToUtf8PtrFromString(encode)); HBFunctions.hb_start(this.hbHandle); this.encodePollTimer = new Timer(); this.encodePollTimer.Interval = EncodePollIntervalMs; this.encodePollTimer.Elapsed += (o, e) => { this.PollEncodeProgress(); }; this.encodePollTimer.Start(); }
public int hb_add_json(IntPtr hbHandle, IntPtr json_job) { return(HBFunctions.hb_add_json(hbHandle, json_job)); }