info: handle video area expose also if we have no video
This commit is contained in:
parent
0075cf007f
commit
ab8087fa1b
@ -45,6 +45,7 @@ public class MediaInfo.Info : VBox
|
|||||||
// gstreamer objects
|
// gstreamer objects
|
||||||
private Discoverer dc;
|
private Discoverer dc;
|
||||||
private Pipeline pb;
|
private Pipeline pb;
|
||||||
|
private bool have_video = false;
|
||||||
|
|
||||||
public Info ()
|
public Info ()
|
||||||
{
|
{
|
||||||
@ -206,6 +207,7 @@ public class MediaInfo.Info : VBox
|
|||||||
video_streams.remove_page (-1);
|
video_streams.remove_page (-1);
|
||||||
}
|
}
|
||||||
l = info.get_video_streams ();
|
l = info.get_video_streams ();
|
||||||
|
have_video = (l.length () > 0);
|
||||||
for (int i = 0; i < l.length (); i++) {
|
for (int i = 0; i < l.length (); i++) {
|
||||||
sinfo = l.nth_data (i);
|
sinfo = l.nth_data (i);
|
||||||
|
|
||||||
@ -361,7 +363,8 @@ public class MediaInfo.Info : VBox
|
|||||||
|
|
||||||
private bool on_drawing_area_expose (Widget widget, Gdk.EventExpose event)
|
private bool on_drawing_area_expose (Widget widget, Gdk.EventExpose event)
|
||||||
{
|
{
|
||||||
if (pb.current_state < State.PAUSED) {
|
// redraw if not playing and if there is no video
|
||||||
|
if (pb.current_state < State.PAUSED || !have_video) {
|
||||||
Gdk.Window w = widget.get_window();
|
Gdk.Window w = widget.get_window();
|
||||||
Gtk.Allocation a;
|
Gtk.Allocation a;
|
||||||
widget.get_allocation(out a);
|
widget.get_allocation(out a);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user