Hi,
I don't know ARTK, i would just use plain osg and its quicktime-plugin
for video playback: (make sure osg's quicktime-plugin gets compiled)
osg::ImageStream* image_stream =
dynamic_cast<osg::ImageStream*>(osgDB::readImageFile("my_movie.mov"));
if (image_stream) {
image_stream->play();
// do something with the imagestream
}
cheers,
Stephan
Am 29.07.11 17:58, schrieb Elliott D'Alvarez:
> Hi Stephan,
>
> I'm not sure if it's a quicktime issue or simply the fact I am trying to load
> the video through ARTK loader, but the video stream always returns null when
> I try and load the file.
>
> When using the ar2VideoOpen from ARTK I try the following:
>
> (Where config is my video name)
> COsgVideoStreamBase::CreateStream(config, hflip, vflip, deinter);
>
> char* arConfig = new char[512];// = "-devNum=1 -flipH -flipV";
> sprintf(arConfig, "-device=QUICKTIME -movie=\"%s\"", config.c_str());
>
> // Open the video path.
> m_video = ar2VideoOpen(arConfig);
>
> if(!m_video){
> osg::notify(osg::WARN) << "ARTKVidStream::CreateStream: ERROR: Opening file
> '" << config << "'." << std::endl;
> }
>
>
>
>
>
> If I'm loading videos in windows I do the following (this works):
>
> bool COsgVideoStreamBase::CreateStream(const std::string& config, bool hflip,
> bool vflip, bool deinter)
> {
> this->m_hFlip = hflip;
> this->m_vFlip = vflip;
> this->m_isInter = deinter;
>
> //use file name as images file name
> this->setFileName(config);
>
> //set image as upside down if required
> if(m_vFlip)
> {osg::Image::setOrigin(osg::Image::TOP_LEFT);}
>
> return true;
> }
>
>
> I was under the impression that the bottom code would only work on windows,
> and you needed to declare the quicktime player for mac?
>
> Sorry about the messy code!
>
> Thank you!
>
> Cheers,
> Elliott
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=41735#41735
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org