MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / live_preview_seek_cb

Function live_preview_seek_cb

gtk/src/preview.c:521–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521G_MODULE_EXPORT void
522live_preview_seek_cb (GtkWidget *widget, gpointer data)
523{
524 double dval;
525 int64_t len, pos;
526 signal_user_data_t *ud = ghb_ud();
527
528 if (!live_preview_is_ready() || ud->preview->progress_lock)
529 return;
530
531 ud->preview->seek_lock = TRUE;
532
533 len = gtk_media_stream_get_duration(GTK_MEDIA_STREAM(ud->preview->video));
534 dval = gtk_range_get_value(GTK_RANGE(widget));
535 pos = (int64_t) (len * dval / 100);
536 gtk_media_stream_seek(GTK_MEDIA_STREAM(ud->preview->video), pos);
537
538 g_idle_add((GSourceFunc)unlock_seek_cb, ud);
539}
540
541G_MODULE_EXPORT void
542preview_fullscreen_action_cb(GSimpleAction *action, GVariant *param,

Callers

nothing calls this directly

Calls 2

ghb_udFunction · 0.85
live_preview_is_readyFunction · 0.85

Tested by

no test coverage detected