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

Function ghb_cache_volnames

gtk/src/callbacks.c:657–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655}
656
657gpointer
658ghb_cache_volnames(signal_user_data_t *ud)
659{
660 GList *link, *drives;
661
662 ghb_log_func();
663 link = drives = dvd_device_list();
664 if (drives == NULL)
665 return NULL;
666
667 g_mutex_lock(volname_mutex);
668 g_hash_table_remove_all(volname_hash);
669 while (link != NULL)
670 {
671 gchar *name, *drive;
672
673#if !defined(_WIN32)
674 if (!g_drive_has_media (link->data))
675 {
676 g_object_unref(link->data);
677 link = link->next;
678 continue;
679 }
680#endif
681 drive = get_dvd_device_name(link->data);
682 name = get_direct_dvd_volume_name(drive);
683
684 if (drive != NULL && name != NULL)
685 {
686 g_hash_table_insert(volname_hash, drive, name);
687 }
688 else
689 {
690 if (drive != NULL)
691 g_free(drive);
692 if (name != NULL)
693 g_free(name);
694 }
695
696 free_drive(link->data);
697 link = link->next;
698 }
699 g_mutex_unlock(volname_mutex);
700
701 g_list_free(drives);
702
703 g_idle_add((GSourceFunc)ghb_file_menu_add_dvd, ud);
704
705 return NULL;
706}
707
708static const gchar*
709get_extension(signal_user_data_t *ud, GhbValue *settings)

Callers

nothing calls this directly

Calls 4

dvd_device_listFunction · 0.85
get_dvd_device_nameFunction · 0.85
free_driveFunction · 0.85

Tested by

no test coverage detected