I'm not sure to understand the problem... it looks like that the movie
plugins starts a background thread to "read" the movies, in particular one
thread per movie, and we can just start and stop movies via the ImageStream
interface, but this won't switch off the threading... my question is: a new
thread is used just to 'read' the movie or actually also to 'play' it? in
this case what happend to the thread if I use the 'pause' or 'rewind'
methods of ImageStream? will the thread stop or sleep? or the thread is
always running?

Thanks. Best regards.
Alessandro


On 7/2/07, Robert Osfield <[EMAIL PROTECTED]> wrote:

Hi Alessandro,

Sharing threads would be a nightmare to code and maintain, is
certainly not an avenue that you'd want to pursue.

With my work on Present3D I added to code to start and stop movies so
that only a few are active at any one time, with big presentations
there might be several dozen movies all loaded and we haven't seen
major problems with this approach.

Robert.

On 7/2/07, alessandro terenzi <[EMAIL PROTECTED]> wrote:
> I wonder if there can be a workaround to avoid to start a new thread for
> each movie... in my application I need to open many movies but,
actually,
> just one or two will be played at the same time, what could I do to use
the
> same thread for different movies? ... I'm not sure, maybe I could reuse
the
> same ImageStream? will this avoid new thread creation? or pheraps,
replacing
> a movie's subgraph with another subgraph for the newly requested
> movie?...maybe in this case there will be always just one thread alive
each
> time? or there is another way you could suggest?
>
> Thank you. Best regards.
> Alessandro.
>
>
>
> On 6/27/07, Robert Osfield <[EMAIL PROTECTED]> wrote:
> > The movie plugins will start a background thread to read the movies -
> > one per movie.  You can start and stop movies via the ImageStream
> > interface, this won't switch off the threading though.
> >
> > On 6/27/07, alessandro terenzi <[EMAIL PROTECTED]> wrote:
> > > Thank you very much for the quick answer...
> > >
> > > ...overall the size of the models I load (ive files) is 200MB +
180MB
> for
> > > some videos (avi, mpg, mov).
> > > ...actually I realized that performances problems arise just with
the
> videos
> > > and not with the usual geometry... I'm trying to understand the
> reason...
> > > maybe the stream is always running from the moment I load the video
> file?
> > > and maybe I have to stop each stream...
> > >
> > > ..by the way my machine's ram is 2GB
> > >
> > > Regards.
> > > Alessandro
> > >
> > >
> > > On 6/27/07, Robert Osfield <[EMAIL PROTECTED]> wrote:
> > > > Hi Alessandro,
> > > >
> > > > If the NodeMask is 0 then the intersection and cull traversals
should
> > > > all ignore those subgraphs and shouldn't affect performance on
their
> > > > own.
> > > >
> > > > Could it be that you are running out of memory? How big is each
model?
> > > > Check the overal memory consumption as the models are loaded.
> > > >
> > > > W.r.t reducing the time it takes to introduce a new subgraph in
for
> > > > the first time, the time cost is usually down to the compilation
of
> > > > display lists and texture objects.  Running the
> > > > osgUtil::GLObjectsVisitor on these new subgraphs before viewing
can be
> > > > done for each graphics context to ensure that everything is ready
when
> > > > you need it.  This will bump memory usuage though...
> > > >
> > > > Robert.
> > > >
> > > > On 6/27/07, alessandro terenzi <[EMAIL PROTECTED]> wrote:
> > > > > I'm working on OSG+osgART and I'm experiencing performances
problems
> > > when I
> > > > > load many (50) 3D models in the scene.
> > > > >
> > > > > Actually, I load every single model when the application first
> starts, I
> > > > > attach them to the scenegraph but each model is displayed only
when
> a
> > > > > fiducial marker is recognized inside a videostream that is the
scene
> > > > > background. But, actually, it looks like that every model is
taken
> into
> > > > > account for many computations (for example for mouse picking...)
> even
> > > though
> > > > > it is not visible in the scene. To figure out what is happening
I
> dumped
> > > the
> > > > > scene in a file and I realize that nodes corresponding to
> not-visible
> > > models
> > > > > have the nodeMask set to 0x0 and cullingActive to true.
> > > > >
> > > > > Can you imagine why I'm experiencig such bad perfomances? If I
just
> load
> > > one
> > > > > or few models, everything is fine...
> > > > > When I say bad performances I mean, of course, low fps and, if
there
> is
> > > a 3d
> > > > > video plane, also no smooth video playback...but the videostream
> from
> > > the
> > > > > background is always smooth.
> > > > >
> > > > > I aslo have another problem, at startup I load each model and I
> thought
> > > that
> > > > > they were put in some kind of cache, but I realize that
actually,
> maybe,
> > > > > they are not really loaded in ram until they are displayed,
because,
> at
> > > > > runtime, when a marker is recognized, it takes some time to
display
> the
> > > > > corresponding model (I guess because it is loaded in that moment
and
> not
> > > > > actually when the application started...) ... so my question is:
is
> > > there a
> > > > > way to pre-load object in a cache?
> > > > >
> > > > > Thank you.
> > > > > Best regards.
> > > > > Alessandro
> > > > > _______________________________________________
> > > > > osg-users mailing list
> > > > > osg-users@openscenegraph.net
> > > > >
> http://openscenegraph.net/mailman/listinfo/osg-users
> > > > > http://www.openscenegraph.org/
> > > > >
> > > > _______________________________________________
> > > > osg-users mailing list
> > > > osg-users@openscenegraph.net
> > > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > > http://www.openscenegraph.org/
> > > >
> > >
> > >
> > > _______________________________________________
> > > osg-users mailing list
> > > osg-users@openscenegraph.net
> > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > http://www.openscenegraph.org/
> > >
> > _______________________________________________
> > osg-users mailing list
> > osg-users@openscenegraph.net
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to