@@ -431,10 +431,12 @@ void ImageBox::draw_image(bool scroll)
431431 error = true ;
432432 }
433433 }
434+ #ifdef HAVE_GSTREAMER
434435 else if (!m_VideoBox->is_playing ())
435436 {
436437 std::tie (error, m_OrigWidth, m_OrigHeight) = m_VideoBox->load_file (m_Image->get_path ());
437438 }
439+ #endif // HAVE_GSTREAMER
438440
439441 if (error)
440442 {
@@ -473,6 +475,7 @@ void ImageBox::draw_image(bool scroll)
473475 m_GtkImage->set (temp_pixbuf);
474476 m_Overlay->show ();
475477 }
478+ #ifdef HAVE_GSTREAMER
476479 else
477480 {
478481 if (!m_VideoBox->is_playing ())
@@ -485,6 +488,7 @@ void ImageBox::draw_image(bool scroll)
485488 m_Fixed->move (*m_VideoBox, x, y);
486489 m_VideoBox->set_size_request (w, h);
487490 }
491+ #endif // HAVE_GSTREAMER
488492
489493 // Reset the scrollbar positions
490494 if (scroll || m_FirstDraw)
@@ -523,9 +527,11 @@ void ImageBox::draw_image(bool scroll)
523527 m_ZoomScroll = false ;
524528 }
525529
530+ #ifdef HAVE_GSTREAMER
526531 // Finally start playing the video
527532 if (!error && !m_VideoBox->is_playing () && m_Image->is_webm ())
528533 m_VideoBox->start ();
534+ #endif // HAVE_GSTREAMER
529535
530536 get_window ()->thaw_updates ();
531537 m_RedrawQueued = false ;
@@ -684,10 +690,14 @@ bool ImageBox::advance_slideshow()
684690
685691bool ImageBox::on_cursor_timeout ()
686692{
693+ #ifdef HAVE_GSTREAMER
687694 // hide_controls will return false if the cursor is over the controls widget
688695 // meaning we should not hide the cursor
689696 if (!m_VideoBox->is_playing () || m_VideoBox->hide_controls (true ))
690697 m_Fixed->get_window ()->set_cursor (m_BlankCursor);
698+ #else // !HAVE_GSTREAMER
699+ m_Fixed->get_window ()->set_cursor (m_BlankCursor);
700+ #endif // !HAVE_GSTREAMER
691701
692702 return false ;
693703}
0 commit comments