    const bool local_cache = !(flags & REPLAY_FLAG_NO_FILE_CACHE);
    bool success = false;
    if (id < MAX_CAMERAS) {
      frames[id] = std::make_unique<FrameReader>();
      success = frames[id]->load(file, flags & REPLAY_FLAG_NO_CUDA, &abort_, local_cache, 20 * 1024 * 1024, 3);
    } else {
      log = std::make_unique<LogReader>();
      success = log->load(file, &abort_, local_cache, 0, 3);
    }
  
 
</s> remove   bool load(const std::string &url, bool no_cuda = false, std::atomic<bool> *abort = nullptr, bool local_cache = false, int chunk_size = -1, int retries = 0);
  bool load(const std::byte *data, size_t size, bool no_cuda = false, std::atomic<bool> *abort = nullptr);
 </s> add   bool load(const std::string &url, bool no_hw_decoder = false, std::atomic<bool> *abort = nullptr, bool local_cache = false, int chunk_size = -1, int retries = 0);
  bool load(const std::byte *data, size_t size, bool no_hw_decoder = false, std::atomic<bool> *abort = nullptr); </s> remove   if (has_cuda_device && !no_cuda) {
    if (!initHardwareDecoder(AV_HWDEVICE_TYPE_CUDA)) {
      rWarning("No CUDA capable device was found. fallback to CPU decoding.");
 </s> add   if (has_hw_decoder && !no_hw_decoder) {
    if (!initHardwareDecoder(HW_DEVICE_TYPE)) {
      rWarning("No device with hardware decoder found. fallback to CPU decoding."); </s> remove bool FrameReader::load(const std::string &url, bool no_cuda, std::atomic<bool> *abort, bool local_cache, int chunk_size, int retries) {
 </s> add bool FrameReader::load(const std::string &url, bool no_hw_decoder, std::atomic<bool> *abort, bool local_cache, int chunk_size, int retries) { </s> remove     has_cuda_device = false;
 </s> add     has_hw_decoder = false; </s> remove   if (hw_pix_fmt == AV_PIX_FMT_CUDA) {
 </s> add   if (hw_pix_fmt == HW_PIX_FMT) {
    success = frames[id]->load(file, flags & REPLAY_FLAG_NO_HW_DECODER, &abort_, local_cache, 20 * 1024 * 1024, 3);
    const bool local_cache = !(flags & REPLAY_FLAG_NO_FILE_CACHE);
    bool success = false;
    if (id < MAX_CAMERAS) {
      frames[id] = std::make_unique<FrameReader>();
    success = frames[id]->load(file, flags & REPLAY_FLAG_NO_HW_DECODER, &abort_, local_cache, 20 * 1024 * 1024, 3);
    } else {
      log = std::make_unique<LogReader>();
      success = log->load(file, &abort_, local_cache, 0, 3);
    }
  
keep keep keep keep replace keep keep keep keep keep
 replay: use VideoToolbox HW decoder on Mac (#23832)

* replay: support VideoToolbox HW decoding

* rename flag

* remove debug assert 
selfdrive/ui/replay/route.cc