  
    update = "--update" in sys.argv
  
    lr = LogReader(get_url(TEST_ROUTE, 0))
    fr = FrameReader(get_url(TEST_ROUTE, 0, log_type="fcamera"))
  
    log_msgs = camera_replay(list(lr), fr)
  
    failed = False
 
</s> remove     ref_commit = open("model_replay_ref_commit").read().strip()
 </s> add     ref_commit = open(ref_commit_fn).read().strip() </s> remove       pm.send(msg.which(), msg.as_builder())
 </s> add       pm.send(msg.which(), replace_calib(msg, calib)) </s> remove   cl_device_id device_id = cl_get_device_id(device_type);
 </s> add   cl_device_id device_id = cl_get_device_id(CL_DEVICE_TYPE_DEFAULT); </s> remove       if msg.which() == "liveCalibrationd":
        pm.send(msg.which(), msg.as_builder())
 </s> add       if msg.which() == "liveCalibration":
        pm.send(msg.which(), replace_calib(msg, calib))
  replay_dir = os.path.dirname(os.path.abspath(__file__))
  ref_commit_fn = os.path.join(replay_dir, "model_replay_ref_commit")

  
    update = "--update" in sys.argv
  
  replay_dir = os.path.dirname(os.path.abspath(__file__))
  ref_commit_fn = os.path.join(replay_dir, "model_replay_ref_commit")

    lr = LogReader(get_url(TEST_ROUTE, 0))
    fr = FrameReader(get_url(TEST_ROUTE, 0, log_type="fcamera"))
  
    log_msgs = camera_replay(list(lr), fr)
  
    failed = False
keep keep add keep keep keep keep keep keep
 Added model_replay and fixed some bugs in camera_replay (#2679)

* Added model_replay and fixed some bugs in camera_replay

* Unpack capnp logs on device

* add sync to device

* GPU now also works on PC

* update model ref

* update refs

* dont change this one

* Use pipeline calib instead of rlog calib

* remove that

* update refs

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
selfdrive/test/process_replay/camera_replay.py