[brasero] Fix video options so that for SVCD we do have a proper default for aspect ratio (set to 4:3)



commit 2af067b61a0008fd39e3d650c8f99f7a823a7894
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Thu Mar 11 08:52:42 2010 +0100

    Fix video options so that for SVCD we do have a proper default for aspect ratio (set to 4:3)

 libbrasero-burn/brasero-video-options.c |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/libbrasero-burn/brasero-video-options.c b/libbrasero-burn/brasero-video-options.c
index fe1082e..ffdcda7 100644
--- a/libbrasero-burn/brasero-video-options.c
+++ b/libbrasero-burn/brasero-video-options.c
@@ -352,8 +352,21 @@ brasero_video_options_set_session (BraseroVideoOptions *options,
 	if (session) {
 		priv->session = g_object_ref (session);
 		brasero_video_options_update (options);
-		brasero_video_options_update_from_tag (options, BRASERO_VIDEO_OUTPUT_FRAMERATE);
-		brasero_video_options_update_from_tag (options, BRASERO_VIDEO_OUTPUT_ASPECT);
+
+		if (brasero_burn_session_tag_lookup (session, BRASERO_VIDEO_OUTPUT_FRAMERATE, NULL) == BRASERO_BURN_OK)
+			brasero_video_options_update_from_tag (options, BRASERO_VIDEO_OUTPUT_FRAMERATE);
+
+		/* If session has tag update UI otherwise update _from_ UI */
+		if (brasero_burn_session_tag_lookup (session, BRASERO_VIDEO_OUTPUT_ASPECT, NULL) == BRASERO_BURN_OK)
+			brasero_video_options_update_from_tag (options, BRASERO_VIDEO_OUTPUT_ASPECT);
+		else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->button_4_3)))
+			brasero_burn_session_tag_add_int (priv->session,
+			                                  BRASERO_VIDEO_OUTPUT_ASPECT,
+	        			                  BRASERO_VIDEO_ASPECT_4_3);
+		else
+			brasero_burn_session_tag_add_int (priv->session,
+				                          BRASERO_VIDEO_OUTPUT_ASPECT,
+				                          BRASERO_VIDEO_ASPECT_16_9);
 
 		g_signal_connect (priv->session,
 		                  "output-changed",
@@ -503,8 +516,7 @@ brasero_video_options_init (BraseroVideoOptions *object)
 			  GTK_FILL,
 			  0, 0);
 
-	button1 = gtk_radio_button_new_with_mnemonic (NULL,
-						      _("_4:3"));
+	button1 = gtk_radio_button_new_with_mnemonic (NULL, _("_4:3"));
 	g_signal_connect (button1,
 			  "toggled",
 			  G_CALLBACK (brasero_video_options_4_3),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]