Images and ProgressBars



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.

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.

Thanks,
Paul Davis





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]