Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guido Gunther
livi
Commits
9eb01a5a
Commit
9eb01a5a
authored
Jul 08, 2021
by
Guido Gunther
💤
Browse files
window: Set title based on media info or uri
parent
4dde6d54
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/livi-window.c
View file @
9eb01a5a
...
...
@@ -48,7 +48,6 @@ struct _LiviWindow
guint64
duration
;
guint64
position
;
gboolean
updating
;
};
G_DEFINE_TYPE
(
LiviWindow
,
livi_window
,
GTK_TYPE_APPLICATION_WINDOW
)
...
...
@@ -254,6 +253,12 @@ on_media_info_updated (GstPlayer *player, GstPlayerMediaInfo * info, gpointer us
show
=
gst_player_media_info_get_number_of_audio_streams
(
info
);
gtk_widget_set_visible
(
GTK_WIDGET
(
self
->
btn_mute
),
!!
show
);
title
=
gst_player_media_info_get_title
(
info
);
if
(
!
title
)
title
=
gst_player_media_info_get_uri
(
info
);
gtk_label_set_text
(
self
->
lbl_title
,
title
);
}
...
...
@@ -366,7 +371,6 @@ void
livi_window_set_uri
(
LiviWindow
*
self
,
const
char
*
uri
)
{
gst_player_set_uri
(
self
->
player
,
uri
);
gtk_label_set_text
(
self
->
lbl_title
,
uri
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment