/**
 * Creates a recording device to record the given device and save it to the given file as rosbag format
 * \param[in]  file                  The desired path to which the recorder should save the data
 * \param[in]  device                The device to record
 * \param[in]  compression_enabled   Indicates if compression is enabled
 */
 recorder(const std::string& file, rs2::device dev, bool compression_enabled)
 {
     rs2_error* e = nullptr;
     _dev = std::shared_ptr<rs2_device>(
         rs2_create_record_device_ex(dev.get().get(), file.c_str(), compression_enabled, &e),
         rs2_delete_device);
     rs2::error::handle(e);
 }
 /**
 * Creates a recording device to record the given device and save it to the given file as rosbag format
 * \param[in]  file      The desired path to which the recorder should save the data
 * \param[in]  device    The device to record
 */
 recorder(const std::string& file, rs2::device dev)
 {
     rs2_error* e = nullptr;
     _dev = std::shared_ptr<rs2_device>(
         rs2_create_record_device(dev.get().get(), file.c_str(), &e),
         rs2_delete_device);
     rs2::error::handle(e);
 }