gimp-gap r753 - in trunk: . gap libgapvidapi
- From: wolfgangh svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp-gap r753 - in trunk: . gap libgapvidapi
- Date: Mon, 19 May 2008 20:14:48 +0000 (UTC)
Author: wolfgangh
Date: Mon May 19 20:14:47 2008
New Revision: 753
URL: http://svn.gnome.org/viewvc/gimp-gap?rev=753&view=rev
Log:
applied fixes (bug348456, extract videoframes as jpeg)
Modified:
trunk/ChangeLog
trunk/gap/gap_story_render_processor.c
trunk/gap/gap_vex_exec.c
trunk/libgapvidapi/gap_vid_api.c
Modified: trunk/gap/gap_story_render_processor.c
==============================================================================
--- trunk/gap/gap_story_render_processor.c (original)
+++ trunk/gap/gap_story_render_processor.c Mon May 19 20:14:47 2008
@@ -610,7 +610,6 @@
/* ----------------------------------------------------
* p_frame_backup_save
* ----------------------------------------------------
- * set layer to unique color
*/
static void
p_frame_backup_save( char *key
@@ -640,7 +639,7 @@
}
else
{
- l_framename = gap_lib_alloc_fname(l_basename, master_frame_nr, ".jpg");
+ l_framename = gap_lib_alloc_fname(l_basename, master_frame_nr, ".png");
}
if(gap_debug) printf("Debug: Saving frame to file: %s\n", l_framename);
Modified: trunk/gap/gap_vex_exec.c
==============================================================================
--- trunk/gap/gap_vex_exec.c (original)
+++ trunk/gap/gap_vex_exec.c Mon May 19 20:14:47 2008
@@ -347,7 +347,12 @@
}
- /* check if we need an INTERACTIVE Dummy save to set defaults for further save calls */
+ /* check if we need an INTERACTIVE Dummy save to set default parameters
+ * for further frame save operation.
+ * The dummy save is done at begin of processing
+ * because the handling of the 1st frame may
+ * occure after a significant delay, caused by seeking in large videofiles.
+ */
if((strcmp(gpp->val.extension, ".xcf") == 0)
|| (strcmp(gpp->val.extension, ".XCF") == 0))
{
@@ -372,14 +377,22 @@
gap_layer_clear_to_color(l_empty_layer_id, 0.0, 0.0, 0.0, 1.0);
l_save_run_mode = GIMP_RUN_INTERACTIVE; /* for the 1.st call of saving a non xcf frame */
- l_dummyname = gimp_temp_name(gpp->val.extension);
+
+ /* must use same basename and extension for the dummyname
+ * because setup of jpeg save params for further non interactive save operation
+ * depend on a key that includes the same basename and extension.
+ */
+ l_dummyname = gap_lib_alloc_fname6(&gpp->val.basename[0]
+ ,99999999
+ ,&gpp->val.extension[0]
+ ,8 /* use full 8 digits for the numberpart */
+ );
gimp_image_set_filename(l_dummy_image_id, l_dummyname);
- gimp_file_save(l_save_run_mode
- ,l_dummy_image_id
- ,l_empty_layer_id
- ,l_dummyname
- ,l_dummyname
- );
+ gap_lib_save_named_image(l_dummy_image_id
+ , l_dummyname
+ , l_save_run_mode
+ );
+
gap_image_delete_immediate(l_dummy_image_id);
g_remove(l_dummyname);
g_free(l_dummyname);
@@ -499,12 +512,20 @@
g_free(framename);
break;
}
- gimp_file_save(l_save_run_mode
- ,gvahand->image_id
- ,gvahand->layer_id
- ,framename
- ,framename
- );
+ else
+ {
+ gint32 l_sav_rc;
+
+ l_sav_rc = gap_lib_save_named_image(gvahand->image_id
+ , framename
+ , l_save_run_mode
+ );
+ if (l_sav_rc < 0)
+ {
+ g_message(_("failed to save file:\n'%s'"), framename);
+ break;
+ }
+ }
g_free(framename);
}
}
@@ -685,6 +706,7 @@
if(gpp->val.image_ID >= 0)
{
+ gimp_image_undo_enable(gpp->val.image_ID);
gimp_display_new(gpp->val.image_ID);
gimp_displays_flush();
gvahand->image_id = -1; /* prenvent API from deleting that image at close */
Modified: trunk/libgapvidapi/gap_vid_api.c
==============================================================================
--- trunk/libgapvidapi/gap_vid_api.c (original)
+++ trunk/libgapvidapi/gap_vid_api.c Mon May 19 20:14:47 2008
@@ -1970,7 +1970,10 @@
old_layer_id = -1;
}
- gimp_image_undo_disable(*image_id);
+ if (gimp_image_undo_is_enabled(*image_id))
+ {
+ gimp_image_undo_disable(*image_id);
+ }
if(gvahand->framerate > 0)
{
@@ -2104,8 +2107,10 @@
gimp_drawable_set_visible(l_new_layer_id, TRUE);
/* clear undo stack */
- gimp_image_undo_enable(*image_id);
- gimp_image_undo_disable(*image_id);
+ if (gimp_image_undo_is_enabled(*image_id))
+ {
+ gimp_image_undo_disable(*image_id);
+ }
/* debug code to display a copy of the image */
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]