  
  class V4LEncoder : public VideoEncoder {
  public:
    V4LEncoder(const char* filename, CameraType type, int in_width, int in_height, int fps,
               int bitrate, cereal::EncodeIndex::Type codec, int out_width, int out_height, bool write) :
               VideoEncoder(filename, type, in_width, in_height, fps, bitrate, codec, out_width, out_height, write) { encoder_init(); }
    ~V4LEncoder();
    void encoder_init();
    int encode_frame(VisionBuf* buf, VisionIpcBufExtra *extra);
    void encoder_open(const char* path);
    void encoder_close();
 
</s> remove                 int bitrate, cereal::EncodeIndex::Type codec, int out_width, int out_height, bool write) :
                VideoEncoder(filename, type, in_width, in_height, fps, bitrate, cereal::EncodeIndex::Type::BIG_BOX_LOSSLESS, out_width, out_height, write) { encoder_init(); }
 </s> add                 int bitrate, cereal::EncodeIndex::Type codec, int out_width, int out_height) :
                VideoEncoder(filename, type, in_width, in_height, fps, bitrate, cereal::EncodeIndex::Type::BIG_BOX_LOSSLESS, out_width, out_height) { encoder_init(); } </s> remove               int bitrate, cereal::EncodeIndex::Type codec, int out_width, int out_height, bool write)
 </s> add               int bitrate, cereal::EncodeIndex::Type codec, int out_width, int out_height) </s> remove     bitrate(bitrate), codec(codec), out_width(out_width), out_height(out_height), write(write) { }
 </s> add     bitrate(bitrate), codec(codec), out_width(out_width), out_height(out_height) { } </s> remove   bool write;
 </s> add  </s> remove   void writer_open(const char* path) {
    if (this->write) write_handler_thread = std::thread(VideoEncoder::write_handler, this, path);
  }

  void writer_close() {
    if (this->write) {
      to_write.push(NULL);
      write_handler_thread.join();
    }
    assert(to_write.empty());
  }
 </s> add 
             int bitrate, cereal::EncodeIndex::Type codec, int out_width, int out_height) :
             VideoEncoder(filename, type, in_width, in_height, fps, bitrate, codec, out_width, out_height) { encoder_init(); }
  
  class V4LEncoder : public VideoEncoder {
  public:
    V4LEncoder(const char* filename, CameraType type, int in_width, int in_height, int fps,
             int bitrate, cereal::EncodeIndex::Type codec, int out_width, int out_height) :
             VideoEncoder(filename, type, in_width, in_height, fps, bitrate, codec, out_width, out_height) { encoder_init(); }
             int bitrate, cereal::EncodeIndex::Type codec, int out_width, int out_height) :
             VideoEncoder(filename, type, in_width, in_height, fps, bitrate, codec, out_width, out_height) { encoder_init(); }
    ~V4LEncoder();
    void encoder_init();
    int encode_frame(VisionBuf* buf, VisionIpcBufExtra *extra);
    void encoder_open(const char* path);
    void encoder_close();
keep keep keep keep replace replace keep keep keep keep keep
 Encoderd: encoders don't write, they only encode (#28499)

* Encoders dont write, they encode

* Delete words

* unused

---------

Co-authored-by: Harald Schaefer <torq_boi@Haralds-MacBook-Air.local>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
system/loggerd/encoder/v4l_encoder.h