Exemplo n.º 1
0
/** callbacks to deal with images taken in tethering mode */
static const char *_camera_request_image_filename(const dt_camera_t *camera, const char *filename, void *data)
{
  struct dt_capture_t *lib = (dt_capture_t *)data;

  /* update import session with orginal filename so that $(FILE_EXTENSION)
   *     and alikes can be expanded. */
  dt_import_session_set_filename(lib->session, filename);
  const gchar *file = dt_import_session_filename(lib->session, FALSE);

  if(file == NULL) return NULL;

  return g_strdup(file);
}
Exemplo n.º 2
0
static const char *_camera_request_image_filename(const dt_camera_t *camera, const char *filename,
                                                  time_t *exif_time, void *data)
{
  const gchar *file;
  struct dt_camera_shared_t *shared;
  shared = (dt_camera_shared_t *)data;

  /* update import session with orginal filename so that $(FILE_EXTENSION)
   *     and alikes can be expanded. */
  dt_import_session_set_filename(shared->session, filename);
  if(exif_time)
    dt_import_session_set_exif_time(shared->session, *exif_time);
  file = dt_import_session_filename(shared->session, FALSE);

  if(file == NULL) return NULL;

  return g_strdup(file);
}