diff options
author | waker <wakeroid@gmail.com> | 2010-12-27 22:24:39 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2010-12-27 22:24:39 +0100 |
commit | ad072a13964e24e5592956e1ff4da2c7685daa4d (patch) | |
tree | aa82b49807acef9ae184937192a45c9254091a27 /plugins/converter | |
parent | f097d2946c4eaa4bb418f6ad9330ba8b7bf08fe1 (diff) |
converter gui is now thread-safe, and runs conversion in background thread(s)
Diffstat (limited to 'plugins/converter')
-rw-r--r-- | plugins/converter/converter.c | 10 | ||||
-rw-r--r-- | plugins/converter/converter.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/plugins/converter/converter.c b/plugins/converter/converter.c index 6046002f..c66c3ee1 100644 --- a/plugins/converter/converter.c +++ b/plugins/converter/converter.c @@ -155,6 +155,15 @@ encoder_preset_save (ddb_encoder_preset_t *p, int overwrite) { return 0; } +void +encoder_preset_copy (ddb_encoder_preset_t *to, ddb_encoder_preset_t *from) { + to->title = strdup (from->title); + to->fname = strdup (from->fname); + to->encoder = strdup (from->encoder); + to->method = from->method; + to->formats = from->formats; +} + ddb_encoder_preset_t * encoder_preset_get_list (void) { return encoder_presets; @@ -752,6 +761,7 @@ static ddb_converter_t plugin = { .encoder_preset_free = encoder_preset_free, .encoder_preset_load = encoder_preset_load, .encoder_preset_save = encoder_preset_save, + .encoder_preset_copy = encoder_preset_copy, .encoder_preset_get_list = encoder_preset_get_list, .encoder_preset_get_for_idx = encoder_preset_get_for_idx, .encoder_preset_append = encoder_preset_append, diff --git a/plugins/converter/converter.h b/plugins/converter/converter.h index ca9a83e6..60677b1e 100644 --- a/plugins/converter/converter.h +++ b/plugins/converter/converter.h @@ -75,6 +75,9 @@ typedef struct { int (*encoder_preset_save) (ddb_encoder_preset_t *p, int overwrite); + void + (*encoder_preset_copy) (ddb_encoder_preset_t *to, ddb_encoder_preset_t *from); + ddb_encoder_preset_t * (*encoder_preset_get_list) (void); |