Re: Strange 'regression' in gtk+/gstreamer app

2016-12-09 Thread Eric Cashon via gtk-app-devel-list

It could be a problem with the double buffering.

gtk_widget_set_double_buffered()

Try to set that to false and see if that makes any difference. This is on 
Linux? Usually you don't need this function any more and it is deprecated but 
it can sometimes still be useful. I know to get gnuplot pictures to redraw 
without flickering or a white background, it needs to be false.

I did a little gstreamer experimentation a little while back with the webcam 
video. It works without gtk_widget_set_double_buffered() using Ubuntu 16.04, 
GTK3.18 and gstreamer1.0. No flickering that I can see. I don't have a 
scrollbar in there though. It might be helpful.

https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/Sound/webcam3.c
 

Eric
 

 


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Strange 'regression' in gtk+/gstreamer app

2016-12-09 Thread Nathanael D. Noblet
Hello,

  So many years ago we wrote a custom app for a client. It does video
recording from either network cameras or optionally built in webcams.
Its worked well for a long time. Originally built against gstreamer
0.10. Recently we've replaced some of the hardware and have noticed an
issue that I can't for the life of me track down.

  It was first observed on playback. When updating the position of the
scrollbar, the video would flash, as if drawn over in white if you
will. It happens each time the scrollbar position moved. For example
the callback to update it is called every 200ms, but only when it moves
does the flash occur. In digging into it some more, I also realized I
could cause it to occur while recording. We have a number of Notebooks
in the UI. Mousing over an inactive one where it then gets a little
'highlight' if you will prior to clicking also causes the video to then
flicker.

  Originally to debug this I went into the code that was updating the
scrollbar. 


if (ret && position != GST_CLOCK_TIME_NONE) {
   g_signal_handler_block (GTK_RANGE(playbackScale), updateId);

   gtk_range_set_value (GTK_RANGE(playbackScale), positionInSeconds);

   g_signal_handler_unblock (GTK_RANGE(playbackScale), updateId);
}

Simply commenting out the gtk_range_set_value stops playback on
flicker. Obviously that's less desirable. 

I wondered if part of the issue was gstreamer 0.10 as its quite old. So
started porting it to gstreamer-1.x. Made it far enough that I could
test and confirm that I still have flickering when the mouse moves over
notebook panels etc.

I'm at a complete loss. I looked at Cheese and Totem to see if I could
figure out what was going on. It seems they use clutter for quite a
bit. I don't know if I want to port it over to that as well if I don't
have to. However I would really like some pointers as to what could be
causing the issue. I can even take a screencast if anyone wants to see
the actual behaviour.

Hoping someone has some good ideas,
-- 
Nathanael


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list