Displaying a stream of images using GTK

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Displaying a stream of images using GTK

alok nagdev
Hello!

I'm writing an application for displaying a sequence of images. The sequence
of images is actually converted from a 30 frames/sec. video and are stored
as a single binary file containing 3 channels (RGB). Can someone give me any
idea on how to do it or give me a pointer to some tutorial? What is the
fastest way of displaying images/frames just as in a video?

Thanks much!
Alok

_________________________________________________________________
Aamir Khan is back! http://server1.msn.co.in/SP05/Mangalpandey/index.html 
See him in the ?mustached? avatar in Mangal Pandey.

_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Displaying a stream of images using GTK

Valdis.Kletnieks
On Thu, 28 Jul 2005 20:00:05 -0000, alok nagdev said:
> I'm writing an application for displaying a sequence of images. The sequence
> of images is actually converted from a 30 frames/sec. video and are stored
> as a single binary file containing 3 channels (RGB). Can someone give me any
> idea on how to do it or give me a pointer to some tutorial? What is the
> fastest way of displaying images/frames just as in a video?

The single biggest question is "Do you have enough memory or a small enough
video clip that it fits in RAM easily?".  If not, you'll need to do some sort
of pre-buffering and/or readahead from disk (think threads here....)

The second question is "Do you need to be able to start displaying the instant
Frame 1 shows up, or are you allowed some amount of pre-buffering"?  (If you're
allowed to run 5-6 frames behind, your timing constraints get a *lot* easier.. ;)

The third question is "How do you define 'fastest way'?".  I've had to deal
with applications that had inbound data at around 30fps, but had to actually
output 96fps (stereo 48fps for a VR system), and handling the stereo, the 3D
imaging, interpolating from 30 to 48fps, and a lot of really messy mathematical
modelling, and suddenly the time budget gets *really* tight.  I've had to deal
with applications where "30fps is good enough, but we need a minimum-CPU-usage
solution because other things are going on".  And then there's always the
question of "how much trouble are you in if you drop a frame on the floor" (a
fatal error for broadcast TV, a nuisance if you're just playing a DVD for
yourself...).


_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list

attachment0 (234 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Displaying a stream of images using GTK

alok nagdev
Hi Vladis,

>From: [hidden email]
>To: alok nagdev <[hidden email]>
>CC: [hidden email]
>Subject: Re: Displaying a stream of images using GTK Date: Thu, 28 Jul 2005
>17:53:30 -0400
>
>The single biggest question is "Do you have enough memory or a small enough
>video clip that it fits in RAM easily?".  If not, you'll need to do some
>sort
>of pre-buffering and/or readahead from disk (think threads here....)
>
>The second question is "Do you need to be able to start displaying the
>instant
>Frame 1 shows up, or are you allowed some amount of pre-buffering"?  (If
>you're
>allowed to run 5-6 frames behind, your timing constraints get a *lot*
>easier.. ;)
>
>The third question is "How do you define 'fastest way'?".  I've had to deal
>with applications that had inbound data at around 30fps, but had to
>actually
>output 96fps (stereo 48fps for a VR system), and handling the stereo, the
>3D
>imaging, interpolating from 30 to 48fps, and a lot of really messy
>mathematical
>modelling, and suddenly the time budget gets *really* tight.  I've had to
>deal
>with applications where "30fps is good enough, but we need a
>minimum-CPU-usage
>solution because other things are going on".  And then there's always the
>question of "how much trouble are you in if you drop a frame on the floor"
>(a
>fatal error for broadcast TV, a nuisance if you're just playing a DVD for
>yourself...).

Clips are quite big and so they would not fit in RAM. I dont need to be able
to start displaying instantly, so a lag of a couple of frames should not be
a problem. By fastest I meant that although I'm okay with dropping a couple
of frames for timing constraints but the least frames I drop works better
for me and in the meanwhile gives me more time for image processing stuff,
which I'm thinking of avoiding implementing before I get the display thing
to work. In that sense I agree on having something like minimum CPU usage
solution.

Alok

_________________________________________________________________
NRIs, Send money FREE.
http://creative.mediaturf.net/creatives/icicibank/ICICI_NRI_SM30.htm To over
30 banks across India.

_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Displaying a stream of images using GTK

jcupitt
On 7/29/05, alok nagdev <[hidden email]> wrote:
> a problem. By fastest I meant that although I'm okay with dropping a couple
> of frames for timing constraints but the least frames I drop works better
> for me and in the meanwhile gives me more time for image processing stuff,
> which I'm thinking of avoiding implementing before I get the display thing
> to work. In that sense I agree on having something like minimum CPU usage
> solution.

Something to try (if you've not looked at it yet) would be testrgb,
from the gtk+-2.x.x/tests directory. It reports (about) the best fps
you can expect for video from your graphics card / x server / cpu
combination.

John
_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Displaying a stream of images using GTK

Tim-Philipp Müller
In reply to this post by alok nagdev
On Thursday 28 July 2005 21:00, alok nagdev wrote:

> I'm writing an application for displaying a sequence of images. The
> sequence of images is actually converted from a 30 frames/sec. video and
> are stored as a single binary file containing 3 channels (RGB). Can someone
> give me any idea on how to do it or give me a pointer to some tutorial?
> What is the fastest way of displaying images/frames just as in a video?

Had a look at GStreamer? (http://gstreamer.freedesktop.org)

 Cheers
  -Tim
_______________________________________________
gtk-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-list