~mfisch/brasero/update-to-3.8.0

« back to all changes in this revision

Viewing changes to plugins/transcode/burn-vob.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Moog
  • Date: 2009-07-28 01:12:27 UTC
  • mto: (1.4.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 46.
  • Revision ID: james.westby@ubuntu.com-20090728011227-tiva9yorc5d1r5hs
Tags: upstream-2.27.5
ImportĀ upstreamĀ versionĀ 2.27.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
890
890
 
891
891
                        aspect = g_value_get_int (value);
892
892
                        if (aspect == BRASERO_VIDEO_ASPECT_4_3) {
893
 
                                BRASERO_JOB_LOG (vob, "Setting ratio 4:3");
 
893
                                BRASERO_JOB_LOG (vob, "Setting ration 4:3");
894
894
                                g_object_set (encode,
895
895
                                              "aspect", 2,
896
896
                                              NULL);
897
897
                        }
898
898
                        else if (aspect == BRASERO_VIDEO_ASPECT_16_9) {
899
 
                                BRASERO_JOB_LOG (vob, "Setting ratio 16:9");
 
899
                                BRASERO_JOB_LOG (vob, "Setting ration 16:9");
900
900
                                g_object_set (encode,
901
901
                                              "aspect", 3,
902
902
                                              NULL);    
905
905
        }
906
906
        else {
907
907
                /* VCDs only support 4:3 */
908
 
                BRASERO_JOB_LOG (vob, "Setting ratio 4:3");
 
908
                BRASERO_JOB_LOG (vob, "Setting ration 4:3");
909
909
                g_object_set (encode,
910
910
                              "aspect", 2,
911
911
                              NULL);
1127
1127
static BraseroBurnResult
1128
1128
brasero_vob_clock_tick (BraseroJob *job)
1129
1129
{
1130
 
        gint64 position = 0;
1131
 
        gint64 duration = 0;
 
1130
        gint64 position = 0.0;
 
1131
        gint64 duration = 0.0;
1132
1132
        BraseroVobPrivate *priv;
1133
1133
        GstFormat format = GST_FORMAT_TIME;
1134
1134
 
1136
1136
 
1137
1137
        gst_element_query_duration (priv->pipeline, &format, &duration);
1138
1138
        gst_element_query_position (priv->pipeline, &format, &position);
1139
 
        if (duration <= 0 || position <= 0) {
 
1139
 
 
1140
        if (duration <= 0.0 || position <= 0.0) {
1140
1141
                format = GST_FORMAT_BYTES;
1141
 
                duration = 0;
1142
 
                position = 0;
1143
1142
                gst_element_query_duration (priv->pipeline, &format, &duration);
1144
1143
                gst_element_query_position (priv->pipeline, &format, &position);
1145
1144
        }
1146
1145
 
1147
 
        if (duration > 0 && position > 0) {
 
1146
        if (duration > 0.0 && position > 0.0) {
1148
1147
                gdouble progress;
1149
1148
 
1150
1149
                progress = (gdouble) position / (gdouble) duration;