diff options
author | jstebbins <[email protected]> | 2009-04-27 15:18:05 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-04-27 15:18:05 +0000 |
commit | 6b9c017e63f06e9a7b66062d0a8cb460a02ca6b6 (patch) | |
tree | 13479caa23219b5476a4d1e534a970cd6fce29fd /gtk/src | |
parent | 3bb12e29d03f62a303c7728cd6f40c6498f2858e (diff) |
add libdvdnav support
emulates the vm of a dvd player in order to navigate the disc more reliably
it is optional and disabled by default
CLI option '--dvdnav' enables. GUI's have a new option in preferences.
When dvdnav is enabled, you can also select angles (cli '--angle')
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2355 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/Makefile.am | 4 | ||||
-rw-r--r-- | gtk/src/callbacks.c | 15 | ||||
-rw-r--r-- | gtk/src/ghb.ui | 83 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 2 | ||||
-rw-r--r-- | gtk/src/hb-backend.h | 1 | ||||
-rw-r--r-- | gtk/src/internal_defaults.xml | 4 | ||||
-rw-r--r-- | gtk/src/widgetdeps.c | 3 |
7 files changed, 102 insertions, 10 deletions
diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am index 41eb76598..71b3ac363 100644 --- a/gtk/src/Makefile.am +++ b/gtk/src/Makefile.am @@ -2,13 +2,13 @@ if MINGW HB_LIBS= \ - -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdread \ + -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdnav -ldvdread \ -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \ -lx264 -lxvidcore -lmp4v2 -lswscale -ltheora -lfaad -lz \ -lbz2 -liberty -lpthreadGC2 else HB_LIBS= \ - -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdread \ + -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdnav -ldvdread \ -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \ -lx264 -lxvidcore -lmp4v2 -lswscale -ltheora -lfaad -lz \ -lbz2 -lpthread diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index f8362a58e..00229f132 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1233,6 +1233,10 @@ show_title_info(signal_user_data_t *ud, ghb_title_info_t *tinfo) widget = GHB_WIDGET (ud->builder, "start_chapter"); gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget), 1); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 1, tinfo->num_chapters); + + widget = GHB_WIDGET (ud->builder, "angle"); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget), 1); + gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 1, tinfo->angle_count); ud->dont_clear_presets = FALSE; } @@ -1951,6 +1955,17 @@ ghb_backend_events(signal_user_data_t *ud) ghb_track_status(); ghb_get_status(&status); progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar")); + if (status.scan.state == GHB_STATE_IDLE && + status.queue.state == GHB_STATE_IDLE) + { + static gboolean prev_dvdnav; + gboolean dvdnav = ghb_settings_get_boolean(ud->settings, "use_dvdnav"); + if (dvdnav != prev_dvdnav) + { + hb_dvd_set_dvdnav(dvdnav); + prev_dvdnav = dvdnav; + } + } // First handle the status of title scans // Then handle the status of the queue if (status.scan.state & GHB_STATE_SCANNING) diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index bd9d2bb9a..489ebbb16 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -209,6 +209,14 @@ <property name="page_size">0</property> <property name="value">0</property> </object> + <object class="GtkAdjustment" id="adjustment27"> + <property name="upper">10</property> + <property name="lower">1</property> + <property name="page_increment">1</property> + <property name="step_increment">1</property> + <property name="page_size">0</property> + <property name="value">1</property> + </object> <object class="GtkAdjustment" id="preview_progress_adj"> <property name="upper">100</property> <property name="lower">0</property> @@ -683,6 +691,50 @@ </packing> </child> <child> + <object class="GtkAlignment" id="alignment47"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="xscale">0</property> + <property name="left_padding">16</property> + <child> + <object class="GtkHBox" id="hbox44"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="spacing">7</property> + <child> + <object class="GtkLabel" id="angle_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Angle:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="angle"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="adjustment">adjustment27</property> + <signal name="value_changed" handler="setting_widget_changed_cb"/> + </object> + <packing> + <property name="expand">False</property> + <property name="position">5</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="position">3</property> + </packing> + </child> + <child> <object class="GtkAlignment" id="alignment41"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -723,7 +775,7 @@ </object> <packing> <property name="expand">False</property> - <property name="position">3</property> + <property name="position">4</property> </packing> </child> </object> @@ -3404,6 +3456,21 @@ auto-generated destination name.</property> </packing> </child> <child> + <object class="GtkCheckButton" id="use_dvdnav"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip_text">Experimental dvdnav support. +Dvdnav can read some discs that dvdread can not.</property> + <property name="label" translatable="yes">Use dvdnav (Experimental)</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="pref_changed_cb"/> + </object> + <packing> + <property name="expand">False</property> + <property name="position">3</property> + </packing> + </child> + <child> <object class="GtkCheckButton" id="reduce_hd_preview"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -3416,7 +3483,7 @@ non-hidef screens. </property> </object> <packing> <property name="expand">False</property> - <property name="position">3</property> + <property name="position">4</property> </packing> </child> <child> @@ -3462,7 +3529,7 @@ increases scan duration.</property> </object> <packing> <property name="expand">False</property> - <property name="position">4</property> + <property name="position">5</property> </packing> </child> @@ -3502,7 +3569,7 @@ in the Video settings tab.</property> </object> <packing> <property name="expand">False</property> - <property name="position">5</property> + <property name="position">6</property> </packing> </child> <child> @@ -3519,7 +3586,7 @@ location as the movie.</property> </object> <packing> <property name="expand">False</property> - <property name="position">6</property> + <property name="position">7</property> </packing> </child> @@ -3557,7 +3624,7 @@ location as the movie.</property> </object> <packing> <property name="expand">False</property> - <property name="position">7</property> + <property name="position">8</property> </packing> </child> @@ -3570,7 +3637,7 @@ location as the movie.</property> </object> <packing> <property name="expand">False</property> - <property name="position">8</property> + <property name="position">9</property> </packing> </child> <child> @@ -3582,7 +3649,7 @@ location as the movie.</property> </object> <packing> <property name="expand">False</property> - <property name="position">9</property> + <property name="position">10</property> </packing> </child> </object> diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 8deac8831..140ce0e72 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -2541,6 +2541,8 @@ ghb_get_title_info(ghb_title_info_t *tinfo, gint titleindex) tinfo->minutes = title->minutes; tinfo->seconds = title->seconds; tinfo->duration = title->duration; + + tinfo->angle_count = title->angle_count; return TRUE; } diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h index b4f697707..2b27d532a 100644 --- a/gtk/src/hb-backend.h +++ b/gtk/src/hb-backend.h @@ -74,6 +74,7 @@ typedef struct gint minutes; gint seconds; gint64 duration; + gint angle_count; } ghb_title_info_t; typedef struct diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml index 986463e09..f2bc8d336 100644 --- a/gtk/src/internal_defaults.xml +++ b/gtk/src/internal_defaults.xml @@ -4,6 +4,8 @@ <dict> <key>Initialization</key> <dict> + <key>angle</key> + <integer>1</integer> <key>anamorphic</key> <true /> <key>autoscale</key> @@ -118,6 +120,8 @@ <string>1</string> <key>nocheckvquality</key> <false /> + <key>use_dvdnav</key> + <false /> <key>reduce_hd_preview</key> <true /> <key>preview_count</key> diff --git a/gtk/src/widgetdeps.c b/gtk/src/widgetdeps.c index 26bf0fbec..6a6945f1e 100644 --- a/gtk/src/widgetdeps.c +++ b/gtk/src/widgetdeps.c @@ -27,6 +27,9 @@ static dependency_t dep_map[] = {"title", "chapters_tab", "none", TRUE, FALSE}, {"title", "start_chapter", "none", TRUE, FALSE}, {"title", "end_chapter", "none", TRUE, FALSE}, + {"title", "angle", "none", TRUE, FALSE}, + {"use_dvdnav", "angle", "FALSE", TRUE, TRUE}, + {"use_dvdnav", "angle_label", "FALSE", TRUE, TRUE}, {"vquality_type_bitrate", "VideoAvgBitrate", "TRUE", FALSE, FALSE}, {"vquality_type_target", "VideoTargetSize", "TRUE", FALSE, FALSE}, {"vquality_type_constant", "VideoQualitySlider", "TRUE", FALSE, FALSE}, |