Re: Images and ProgressBars
- From: Paul Davis <pjdavis engineering uiowa edu>
- To: gtkmm-list gnome org
- Subject: Re: Images and ProgressBars
- Date: Thu, 27 Apr 2006 02:46:05 -0500
Murray Cumming wrote:
On Wed, 2006-04-26 at 18:46 -0500, Paul Davis wrote:
Howdy,
I've got two questions. The first is with drawing images. I've read
quite a few of the old mailing list posts on drawing images and the
such, I just wanted to see if anyone had any pointers.
Basically my situation is that I've got a time lapse movie stored as
single frames in a non-standard format, and I'm using Gtkmm to provide a
movie playback application. I'll say that I'm not having a problem
getting things working. It works rather well. I'm getting playback
frame rates of 20-30 fps depending on hardware and network speeds (
files are accessed via NFS ).
I'm going through what I'll call the standard method of using a
Gdk::Pixbuf and rendering to a Gtk::DrawingArea. My question is, is
there a better way to do things. I've got a fairly old Motif
application that can whip through the images at upwards of 40 to 50
fps. I know most of you are probably thinking 20-30 is decent, but I'm
going to be adding some pre-processing of the images and I want to try
and keep things as fast as possible.
My first guess is that the bottle neck is all of the memory operations I
need to do to get the image from my non-standard fromat (8bpp pixel
array) to the 24bpp that Pixbuf expects. So if anyone has any ideas on
using a different set of widgets or has an idea on how to draw directly
to the screen or something, I'd like to hear.
If you don't get good replies here, I think you might get informative
advice on gtk-list. They are more likely to know about the low-level
performance of different parts of GTK+.
Will do.
You might also consider making a gstreamer plugin for your non-standard
format. Then you could reuse a lot of gstreamer/totem code.
My first thoughts are that this would be alot more work than its worth.
One of the issues with my app is that it is quite necessary to play the
animation in reverse. The app is intended for people to sit down and
analyze time lapse footage of living cell cultures. So there's a lot of
forward - reverse - pause - step forward - step forward... type of
action going on. The only reason I mention this is because this little
fact basically prohibits me from using mpeg's to write a streaming
client so people can use this app from outside our network ( An analysis
can cover a couple gigs of data). Any how it is a thought and I'll
check it out.
My second question is probably simpler to answer. In the same app, I
use a progress bar to display the percentage of the movie played. I was
wondering if its possible to connect an event handler to receive mouse
clicks that would translate into a fraction of the progress bar. I know
that a slider would be the 'appropriate' widget for this type of action,
but ProgressBars are prettier, and allow for a text label in the background.
It's probably possible, yes. It does sound like a bad idea.
After talking some more to people that actually use the program this
became a moot point. But thats generally what I expected. Possible but
not good.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]