[osg-users] osgText on Android

2015-10-23 Thread Akhtar Shamim
Dear All

I am trying to display a simple text on Android device using osgText. No
matter what I  do I can't get to display the text out on the screen.

I am using GLES2 build.

Attached is the code. I have debugged and verified that the font is loaded.
The text would just not appear.


In the following function i create some 2D text and add that to the
scenegraph. text <- _overlayGeode <- _overlayCamera <- _rootNode.


namespace
{

static const char gTextVertexShader[] =
"varying vec4 VertexColor; \n"
"varying mediump vec2 TexCoord0; \n"
"uniform vec4 MaterialColor; \n"
"void main() \n"
"{ \n"
"gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; \n"
"VertexColor = MaterialColor; \n"
"TexCoord0 = gl_MultiTexCoord0.xy; \n"
"} \n";

static const char gTextFragmentShader[] =
"varying vec4 VertexColor; \n"
"varying mediump vec2 TexCoord0; \n"
"uniform sampler2D GlyphTexture; \n"
"void main() { \n"
" gl_FragColor = texture2D(GlyphTexture,TexCoord0); \n"
"} \n";
} // end of unnamed namespace


void TerrainApp::initTextOverlays()
{
_overlayCamera = new osg::Camera;
_rootNode->addChild(_overlayCamera.get());

_overlayCamera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_overlayCamera->setProjectionMatrixAsOrtho2D(
0, vfui::Global::instance()->getTrueWidth(),
0, vfui::Global::instance()->getTrueHeight()
);

_overlayCamera->setViewMatrix(osg::Matrix::identity());
_overlayCamera->setClearMask(GL_DEPTH_BUFFER_BIT);

_overlayCamera->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF);
_overlayCamera->setCullingActive(false);
_overlayCamera->getOrCreateStateSet()->setAttribute(new
osg::Depth(osg::Depth::LESS, 0.0f, .0001f));

_overlayGeode = new osg::Geode;
_overlayCamera->addChild(_overlayGeode.get());

osg::Shader * vshader = new osg::Shader(osg::Shader::VERTEX,
gTextVertexShader );
osg::Shader * fshader = new osg::Shader(osg::Shader::FRAGMENT,
gTextFragmentShader );

osg::Program * prog = new osg::Program;
prog->addShader ( vshader );
prog->addShader ( fshader );

osg::ref_ptr textColor = new
osg::Uniform("MaterialColor",osg::Vec4(0,1,1,1));
osg::ref_ptr textTexture = new
osg::Uniform("GlyphTexture",0);

//set a sample text overlay.
osg::ref_ptr text =
TerrainApp::s_createText(osgText::String("Testing"), _datapath);

osg::StateSet *ss = text->getOrCreateStateSet();
ss->addUniform(textColor);
ss->addUniform(textTexture);
ss->setAttributeAndModes(prog, osg::StateAttribute::ON);

_overlayGeode->addDrawable(text.get());
}

osgText::Text* TerrainApp::s_createText(const osgText::String& str, const
std::string& datapath)
{
// text geometry
std::string textStr("Hello World"); // replace this with str.
osgText::Text* myText = new osgText::Text;

std::string font_filename = datapath + "/fonts/androidnation.ttf";
osgText::Font* font = osgText::readFontFile(font_filename);

myText->setFont(font);
myText->setCharacterSize(100.0f);
myText->setText(textStr);

myText->setPosition(osg::Vec3(500.0f, 500.0f, 0.0f));
return myText;

}

Any thing that I have done that is not correct? I am cracking my head. I
 found a couple of  examples / tutorials of osgText on Android using GLES2.
All of them dont seem to work. By right setting up text should be very
simple. Any help or advice will be greatly appreciated.

regards
Shamim
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgAndroid - Deploying and Debugging

2015-10-14 Thread Akhtar Shamim
Hi Rafa

I am sorry that I couldnt reply to this email earlier.
I was away and couldnt check my emails for a couple of weeks.

Yes, I could do that. I will reply to your email next week after going
through the changes again.

I started working on the Android example. I have made a few changes to the
working sample osgAndroidExampleGLES1 for my convenience. I have made the
sample to be in fullscreen and added some overlay nodes for user interfaces.

Strangely i found another issue. For all PUSH events when i get -1 for
getXmin as well as getYmin where as +1 for getXmax and getYmax. However
getX returns a value which which is correct coordinate. Hence all the
getXnormalized and getYnormalized values returned are wrong.

This is what i did:

Create a simple event handler and added this to using
osgViewer::Viewer::addEventHandler method.

class LayerManagerEventHandler : public osgGA::GUIEventHandler
{
public:
LayerManagerEventHandler(LayerManager& layer) :
osgGA::GUIEventHandler(), _layerManager(layer) {}
virtual ~LayerManagerEventHandler() {}

bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&
aa)
{
// *** here ea.getXmin, ea.getYmin, getXmax and getYmax return
-1,-1,1,1 respectively.
// however getX return 897 and getY return 324 which is correct.
}

LayerManager& _layerManager;
};

//

This causes all the manipulators to fail. Did anyone observe this behavior?
Am i doing something wrong?

regards
Shamim

On Thu, Oct 1, 2015 at 2:48 PM, Rafa Gaitan <rafa.gai...@gmail.com> wrote:

> Hi Shamim,
>
> I'm glad you made it work, but I'm concerned about the osgsimple sample in
> osgAndroid not working for you. Could you tell me if the logcat says
> something?, maybe the model you tried to load is not in the expected path?
>
> If you have any improvements to the OSG sample you can send a submission
> using the osg-submissions list. If you have any modification to osgAndroid,
> just send a pull request in github and I'll review the changes and merge
> them.
>
> Regards,
> Rafa
>
> El mié., 30 sept. 2015 a las 12:24, Akhtar Shamim (<sham...@gmail.com>)
> escribió:
>
>> Hi
>>
>> Just an update.
>>
>> I managed to make osgAndroidExampleGLES1 work based on the Android.mk
>> settings for osgSimple and am able to load cessna.osg or any other osg
>> models. However, i am still not able to make osgSimple work based on the
>> predefined setting.
>>
>> If anyone is interested then I can provide a complete step by step guide
>> for making osgAndroid compile and run the osgAndroidExampleGLES1 example on
>> an Android device (with development environment on both Windows 10 and
>> Ubuntu 14.0.4)
>>
>> regards
>> Shamim
>>
>> On Tue, Sep 29, 2015 at 3:12 PM, Akhtar Shamim <sham...@gmail.com> wrote:
>>
>>> Hi Rafa
>>>
>>> Thank you for the pointer. I managed to compile and run the application
>>> in an Android device successfully.
>>> I have also managed to compile and run the osgAndroidExampleGLES1 on my
>>> mobile device. I can see the blue background for the example together with
>>> three buttons.
>>>
>>> However, now when i try to load a model (cessna.osg) it shows error:
>>> dlopen failed: library osgPlugins-3.4.0/osgdb_osg.so" not found.
>>> DynamicLibrary::failed loading "osgPlugins-3.4.0/osgdb_osg.so". It is
>>> strange because the build is static build yet it is looking for .so file.
>>>
>>> I am not too sure why this is happening. Any pointer will be very
>>> helpful.
>>>
>>> regards
>>> Shamim
>>>
>>>
>>> On Mon, Sep 28, 2015 at 5:08 PM, Rafa Gaitan <rafa.gai...@gmail.com>
>>> wrote:
>>>
>>>> Hi Shamim,
>>>>
>>>> I added glustl_shared to be loaded dynamically before loading any
>>>> osgAndroid jni library, because linking it statically was giving a lot of
>>>> problems.
>>>>
>>>> I don't recall having problems before, but I usually work on linux or
>>>> mac when I have to develop in android and OSG. Maybe is something related
>>>> to the r10e NDK?.
>>>>
>>>> Anyway, could you check if you have in your
>>>> org.openscenegraph.android/libs/armeabi/ the library libgnustd_shared.so?,
>>>> if not, probably you need to copy it there from the NDK.
>>>>
>>>> I don't recall if I copied it by myself that or it's automated somehow
>>>> by the NDK build system. But if you have it there along the
>>>> libjni-osggles*.so libraries it will be 

Re: [osg-users] osgAndroid - Deploying and Debugging

2015-09-30 Thread Akhtar Shamim
Hi

Just an update.

I managed to make osgAndroidExampleGLES1 work based on the Android.mk
settings for osgSimple and am able to load cessna.osg or any other osg
models. However, i am still not able to make osgSimple work based on the
predefined setting.

If anyone is interested then I can provide a complete step by step guide
for making osgAndroid compile and run the osgAndroidExampleGLES1 example on
an Android device (with development environment on both Windows 10 and
Ubuntu 14.0.4)

regards
Shamim

On Tue, Sep 29, 2015 at 3:12 PM, Akhtar Shamim <sham...@gmail.com> wrote:

> Hi Rafa
>
> Thank you for the pointer. I managed to compile and run the application in
> an Android device successfully.
> I have also managed to compile and run the osgAndroidExampleGLES1 on my
> mobile device. I can see the blue background for the example together with
> three buttons.
>
> However, now when i try to load a model (cessna.osg) it shows error:
> dlopen failed: library osgPlugins-3.4.0/osgdb_osg.so" not found.
> DynamicLibrary::failed loading "osgPlugins-3.4.0/osgdb_osg.so". It is
> strange because the build is static build yet it is looking for .so file.
>
> I am not too sure why this is happening. Any pointer will be very helpful.
>
> regards
> Shamim
>
>
> On Mon, Sep 28, 2015 at 5:08 PM, Rafa Gaitan <rafa.gai...@gmail.com>
> wrote:
>
>> Hi Shamim,
>>
>> I added glustl_shared to be loaded dynamically before loading any
>> osgAndroid jni library, because linking it statically was giving a lot of
>> problems.
>>
>> I don't recall having problems before, but I usually work on linux or mac
>> when I have to develop in android and OSG. Maybe is something related to
>> the r10e NDK?.
>>
>> Anyway, could you check if you have in your
>> org.openscenegraph.android/libs/armeabi/ the library libgnustd_shared.so?,
>> if not, probably you need to copy it there from the NDK.
>>
>> I don't recall if I copied it by myself that or it's automated somehow by
>> the NDK build system. But if you have it there along the libjni-osggles*.so
>> libraries it will be deployed within the apk.
>>
>> Regards,
>> Rafa.
>>
>>
>> El lun., 28 sept. 2015 a las 9:34, Akhtar Shamim (<sham...@gmail.com>)
>> escribió:
>>
>>> Hi
>>>
>>> Recently we had a requirement to build OSG for Android and load a
>>> OpenFlight MetaFight file. This is what I did:
>>>
>>> - Checkout the 3.4.0 stable release of OSG
>>> - Installed Android NDK, SDK and Eclipse.
>>> - Used the toolchain to compile OSG for GLES1
>>> - Downloaded OSGAndroid from GitHub
>>> - Imported to Eclipse
>>> - Build all the four projects
>>>
>>> So far there is no problem at all. Everything went smooth.
>>>
>>> However, when I am trying to deploy the osgsimple application using
>>> eclipse or trying to debug the application it throws an error saying:
>>>
>>> "Couldn't load gnustl_shared from loader dalvik.system.PathClassLoader".
>>>
>>> This is what I did:
>>> - Modified Android.mk to have the correct OSG_SDK path
>>> - Modified Android.mk to have the correct plugins (osgPlugins-3.4.0)
>>>
>>> Note:
>>>
>>> (a) No other changes made to any files downloaded from GitHub for
>>> osgAndroid.
>>> (b) The command used to configure cmake is <<<
>>>
>>> > set ANDROID_NDK=C:\Android\android-ndk-r10e
>>> > "c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" .. -G"MinGW
>>> Makefiles" -DANDROID_NDK=C:/Android/android-ndk-r10e
>>> -DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake
>>> -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows-x86_64\bin\make.exe"
>>> -DOPENGL_PROFILE="GLES1" -DDYNAMIC_OPENTHREADS=OFF
>>> -DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NATIVE_API_LEVEL=15
>>> -DANDROID_ABI=armeabi -DCMAKE_INSTALL_PREFIX=C:/Android/OSG_ES1-3.4.0
>>>
>>> > make  -j 8
>>> > make install
>>>
>>> >>>>
>>>
>>> I tried the above in Windows 10.
>>>
>>> Any help to get this resolved will be greatly appreciated.
>>>
>>> regards
>>> Shamim
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgAndroid - Deploying and Debugging

2015-09-29 Thread Akhtar Shamim
Hi Rafa

Thank you for the pointer. I managed to compile and run the application in
an Android device successfully.
I have also managed to compile and run the osgAndroidExampleGLES1 on my
mobile device. I can see the blue background for the example together with
three buttons.

However, now when i try to load a model (cessna.osg) it shows error: dlopen
failed: library osgPlugins-3.4.0/osgdb_osg.so" not found.
DynamicLibrary::failed loading "osgPlugins-3.4.0/osgdb_osg.so". It is
strange because the build is static build yet it is looking for .so file.

I am not too sure why this is happening. Any pointer will be very helpful.

regards
Shamim


On Mon, Sep 28, 2015 at 5:08 PM, Rafa Gaitan <rafa.gai...@gmail.com> wrote:

> Hi Shamim,
>
> I added glustl_shared to be loaded dynamically before loading any
> osgAndroid jni library, because linking it statically was giving a lot of
> problems.
>
> I don't recall having problems before, but I usually work on linux or mac
> when I have to develop in android and OSG. Maybe is something related to
> the r10e NDK?.
>
> Anyway, could you check if you have in your
> org.openscenegraph.android/libs/armeabi/ the library libgnustd_shared.so?,
> if not, probably you need to copy it there from the NDK.
>
> I don't recall if I copied it by myself that or it's automated somehow by
> the NDK build system. But if you have it there along the libjni-osggles*.so
> libraries it will be deployed within the apk.
>
> Regards,
> Rafa.
>
>
> El lun., 28 sept. 2015 a las 9:34, Akhtar Shamim (<sham...@gmail.com>)
> escribió:
>
>> Hi
>>
>> Recently we had a requirement to build OSG for Android and load a
>> OpenFlight MetaFight file. This is what I did:
>>
>> - Checkout the 3.4.0 stable release of OSG
>> - Installed Android NDK, SDK and Eclipse.
>> - Used the toolchain to compile OSG for GLES1
>> - Downloaded OSGAndroid from GitHub
>> - Imported to Eclipse
>> - Build all the four projects
>>
>> So far there is no problem at all. Everything went smooth.
>>
>> However, when I am trying to deploy the osgsimple application using
>> eclipse or trying to debug the application it throws an error saying:
>>
>> "Couldn't load gnustl_shared from loader dalvik.system.PathClassLoader".
>>
>> This is what I did:
>> - Modified Android.mk to have the correct OSG_SDK path
>> - Modified Android.mk to have the correct plugins (osgPlugins-3.4.0)
>>
>> Note:
>>
>> (a) No other changes made to any files downloaded from GitHub for
>> osgAndroid.
>> (b) The command used to configure cmake is <<<
>>
>> > set ANDROID_NDK=C:\Android\android-ndk-r10e
>> > "c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" .. -G"MinGW Makefiles"
>> -DANDROID_NDK=C:/Android/android-ndk-r10e
>> -DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake
>> -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows-x86_64\bin\make.exe"
>> -DOPENGL_PROFILE="GLES1" -DDYNAMIC_OPENTHREADS=OFF
>> -DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NATIVE_API_LEVEL=15
>> -DANDROID_ABI=armeabi -DCMAKE_INSTALL_PREFIX=C:/Android/OSG_ES1-3.4.0
>>
>> > make  -j 8
>> > make install
>>
>> >>>>
>>
>> I tried the above in Windows 10.
>>
>> Any help to get this resolved will be greatly appreciated.
>>
>> regards
>> Shamim
>>
>>
>>
>>
>>
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgAndroid - Deploying and Debugging

2015-09-28 Thread Akhtar Shamim
Hi

Recently we had a requirement to build OSG for Android and load a
OpenFlight MetaFight file. This is what I did:

- Checkout the 3.4.0 stable release of OSG
- Installed Android NDK, SDK and Eclipse.
- Used the toolchain to compile OSG for GLES1
- Downloaded OSGAndroid from GitHub
- Imported to Eclipse
- Build all the four projects

So far there is no problem at all. Everything went smooth.

However, when I am trying to deploy the osgsimple application using eclipse
or trying to debug the application it throws an error saying:

"Couldn't load gnustl_shared from loader dalvik.system.PathClassLoader".

This is what I did:
- Modified Android.mk to have the correct OSG_SDK path
- Modified Android.mk to have the correct plugins (osgPlugins-3.4.0)

Note:

(a) No other changes made to any files downloaded from GitHub for
osgAndroid.
(b) The command used to configure cmake is <<<

> set ANDROID_NDK=C:\Android\android-ndk-r10e
> "c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" .. -G"MinGW Makefiles"
-DANDROID_NDK=C:/Android/android-ndk-r10e
-DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake
-DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows-x86_64\bin\make.exe"
-DOPENGL_PROFILE="GLES1" -DDYNAMIC_OPENTHREADS=OFF
-DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NATIVE_API_LEVEL=15
-DANDROID_ABI=armeabi -DCMAKE_INSTALL_PREFIX=C:/Android/OSG_ES1-3.4.0

> make  -j 8
> make install



I tried the above in Windows 10.

Any help to get this resolved will be greatly appreciated.

regards
Shamim
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Need help with OSG Image.

2010-06-30 Thread Akhtar Shamim
Hi,

I am facing a problem with OSG Image and would like to seek some advice from
the community.

I have a model exported in IVE format. This model is just a quad with a
texture mapped onto it. I want to retrieve the original image from
osg::Image object and convert it to JPG/PNG or any other format. Seems
simple, but I am not sure what is causing the problem.

The image when loaded using osgviewer looks perfectly fine. But when I debug
and look at the contents of the osg::Image object I find that both the
InternalTextureFormat and the PixelFormat are invalid.

_internalTextureFormat33776int
_pixelFormat33776unsigned int

The pixel size is 4 bits per pixel. I tried using osg::writeImageFile with
extension as JPG, TGA and PNG. Nothing works. With extension as RGB the
image is saved but is incorrect. I think it is because of the fact that the
image is 4 bits per pixel.

So, what I did is to use ImageMagick to convert the image data buffer to a
common format (JPG, PNG or TGA). However I am unable to do the conversion
from the 4 bit per pixel to a 24 bit per pixel. Any help here would be
greatly appreciated.


My mechanism for conversion from a 4 BPP to a 24 BPP is as follows:



unsigned int total_size_in_bytes = image-getTotalSizeInBytes();
unsigned int row_size_in_bytes = image-getRowSizeInBytes();
unsigned int image_size_in_bytes = image-getImageSizeInBytes();
unsigned char* ptr = image-data();

unsigned int size = w*h;
unsigned char* writePtr = new unsigned char[size];
memset(writePtr, 0, size);

// i convert to byte array (not sure if this is the correct way to
do)
for(unsigned int i = 0; i  size; i+=2)
{
writePtr[i]   = (ptr[i/2]  4);
writePtr[i+1] = (ptr[i/2]  0x0F);
}

// now i have the byte array and i set to imagemagick

for (unsigned int y = 0; y  h; y++)
{
for (unsigned int x = 0; x  w; x++)
{
unsigned char c = writePtr[x+y*w];
Magick::PixelPacket* curMagickPix = 0;
curMagickPix = magickPixels + (y*w + x);

curMagickPix-red = c;
curMagickPix-green = c;
curMagickPix-blue = c;
}
}
delete [] writePtr;


I tried to attach the IVE file but the email bounced. So I am putting it up
for download. The URL is:
http://68.168.137.66/osguser/Ceiling_1LightingMap.ive


Regards,
Shamim
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Static OSG compilation

2010-06-30 Thread Akhtar Shamim
Hi All,

I am trying to compile OSG as a static library. I am using the latest
updates (as of 29th June, 2010) from SVN. I used CMAKE to create the Visual
Studio solution file. I think all the setups are fine. However, I am unable
to compile one file which is GLStaticLibrary.cpp.

It can't find any of the function declarations, like glActiveTexture and the
rest. Did anyone else face this problem? If yes, how do I solve it?

Regards,
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG and streamed video

2009-12-21 Thread Akhtar Shamim
Hi Stephen,

I am using Darwin Video Streamer instead of QuickTime. I think both should
work fine. I created a playlist and started streaming. Using QuickTime i can
view the stream by accessing the URL
(rtsp://127.0.0.1/sample.sdphttp://127.0.0.1/mystream.sdp
).

However, i am not able to use osgmovie to load the video. I am a bit
confused. The extension support for the ReaderWriterQT doesnt show *sdp* as
a supported extension. I am also confused with *.live* and devices as
extension and filename. How to test the .live extension?

Any pointers to make my osgmovie play the streamed file will be much
appreciated.

Regards
Shamim

On Fri, Dec 18, 2009 at 2:49 AM, Akhtar Shamim sham...@gmail.com wrote:

 Hi Stephen,

 Thanks for your reply.I will try the broadcaster.
 By the way VLC should work just fine. Isnt it?

 Regards,


 On Thu, Dec 17, 2009 at 7:48 PM, Stephan Maximilian Huber 
 ratzf...@digitalmind.de wrote:

 Hi,

 I haven't tried streaming from VLC, I tried only the QT-Broadcaster
 (available here: http://www.apple.com/quicktime/broadcaster/ ) which
 worked fine.

 osgmovie rtsp://127.0.0.1/mystream.sdp

 cheers,
 Stephan



 Akhtar Shamim schrieb:

  I am using QuickTime plugin with OpenSceneGraph. Compiled and tested.
 Works
  fine with standard mov files. However, I am not able to make the live
  streamed video to work out. I have problems in the following two areas:
  1. Streaming the video: For testing, I am using VLC to stream out the
 video.
  The settings that i am using are:
(a) Encapsulation:MP4/MOV
(b) Video Codec: MPEG-4 with bitrate 800kb/s
(c) Audio Codec: MPEG-4 Audio with 128kb/s
(d) Protocol: HTTP
 
  I have also tried few other settings and tried playing the streamed
 video
  using VLC itself.
 
  2. Running the osgmovie example with the file extension as
  http://127.0.0.1:8080. Nothing seems to play. I also tried
  http://127.0.0.1:8080.live (as I saw that the plugin checks for .live
  extension). I am not sure what the input to the command line should be.
 
  It will be very helpful if anyone could explain to me how to get the
 live
  video streaming work with OSG.
 
  Best regards,
  Shamim Akhtar
 
 
 
  
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

 ^
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG and streamed video

2009-12-17 Thread Akhtar Shamim
Hi,

I am using QuickTime plugin with OpenSceneGraph. Compiled and tested. Works
fine with standard mov files. However, I am not able to make the live
streamed video to work out. I have problems in the following two areas:
1. Streaming the video: For testing, I am using VLC to stream out the video.
The settings that i am using are:
  (a) Encapsulation:MP4/MOV
  (b) Video Codec: MPEG-4 with bitrate 800kb/s
  (c) Audio Codec: MPEG-4 Audio with 128kb/s
  (d) Protocol: HTTP

I have also tried few other settings and tried playing the streamed video
using VLC itself.

2. Running the osgmovie example with the file extension as
http://127.0.0.1:8080. Nothing seems to play. I also tried
http://127.0.0.1:8080.live (as I saw that the plugin checks for .live
extension). I am not sure what the input to the command line should be.

It will be very helpful if anyone could explain to me how to get the live
video streaming work with OSG.

Best regards,
Shamim Akhtar
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG and streamed video

2009-12-17 Thread Akhtar Shamim
Hi Stephen,

Thanks for your reply.I will try the broadcaster.
By the way VLC should work just fine. Isnt it?

Regards,

On Thu, Dec 17, 2009 at 7:48 PM, Stephan Maximilian Huber 
ratzf...@digitalmind.de wrote:

 Hi,

 I haven't tried streaming from VLC, I tried only the QT-Broadcaster
 (available here: http://www.apple.com/quicktime/broadcaster/ ) which
 worked fine.

 osgmovie rtsp://127.0.0.1/mystream.sdp

 cheers,
 Stephan



 Akhtar Shamim schrieb:

  I am using QuickTime plugin with OpenSceneGraph. Compiled and tested.
 Works
  fine with standard mov files. However, I am not able to make the live
  streamed video to work out. I have problems in the following two areas:
  1. Streaming the video: For testing, I am using VLC to stream out the
 video.
  The settings that i am using are:
(a) Encapsulation:MP4/MOV
(b) Video Codec: MPEG-4 with bitrate 800kb/s
(c) Audio Codec: MPEG-4 Audio with 128kb/s
(d) Protocol: HTTP
 
  I have also tried few other settings and tried playing the streamed video
  using VLC itself.
 
  2. Running the osgmovie example with the file extension as
  http://127.0.0.1:8080. Nothing seems to play. I also tried
  http://127.0.0.1:8080.live (as I saw that the plugin checks for .live
  extension). I am not sure what the input to the command line should be.
 
  It will be very helpful if anyone could explain to me how to get the live
  video streaming work with OSG.
 
  Best regards,
  Shamim Akhtar
 
 
 
  
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

 ^
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Performance issue with Database Pager Terra Vista Files

2007-11-14 Thread Akhtar Shamim
Hi Will,

Thank you very much for the suggestion. I will try this out ASAP and will
let you know if it works. By the way, is NVidia aware of this problem? If
they are then they should be fixing this problem.

Best regards, Shamim

On Nov 14, 2007 1:09 PM, Will Dicharry [EMAIL PROTECTED] wrote:

 Hi,

 For the 7900 card, the driver version that fixed the slow down was 83.91.

 For the 8800 GTX card, I have not been able to find a driver version to
 fix it.  However, after hearing that it happened on another dual core
 machine, I was able to find others with the problem.  It appears that it is
 an Nvidia bug. There are a couple of possible solutions.  In the Nvidia
 control panel you may have a setting called Threaded Optimization.  One of
 our computers has that setting available, but for some reason it doesn't
 appear on another.  If you do have that setting, turning it off appears to
 fix the problem.  If you don't have the setting, you can still turn it on or
 off in the registry.  The path to the value is

 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\[your GUID
 here]\

 if you have the value OGL_ThreadControl, set it to DWORD:0002.  If you
 don't have it, you can add it.  I did this on my dual core machine and that
 seemed to fix the problem.  This setting apparently controls the driver
 threading, and there are a number of people that have reported the problem
 on dual core machines.  This site:
 http://forums.nvidia.com/lofiversion/index.php?t9875.html has some
 information about the problem.  I hope this works for you, let me know how
 it turns out.

 Good luck,
 Will



 On Nov 12, 2007 10:59 PM, Akhtar Shamim [EMAIL PROTECTED] wrote:
  Thanks very much Charles and Will for your support. Very much
 appreciated.
 
  Best regards, Shamim
 
 
 
  On Nov 13, 2007 12:52 AM, Will Dicharry [EMAIL PROTECTED]  wrote:
   I don't have access to the machine that I was able to fix it on right
   now, so I don't know the exact version of the drivers.  For the 7900
   card, all I had to do was install the vendor drivers that came with
   the card.  I believe the vendor on that one was EVGA.  I will be able
   to check the version tomorrow.
  
   I've had the problem on two 8800 GTX cards, one an Asus, the other an
   Evga.  I have not been able to fix it on the Evga card yet.  On the
   Asus card, there is an option in the Nvidia control panel under the 3d

   settings about threading that doesn't appear on the Evga machine.  I
   have no idea why that is.  That option fixed the problem on the Asus
   card.  I will be able to check the exact name and setting of that
   option tomorrow.
  
   I will send another email tomorrow after I check the driver version
   and the extra setting to give you more information.
  
   Will
  
  
  
  
   On Nov 11, 2007 7:36 PM, Akhtar Shamim [EMAIL PROTECTED] wrote:
Hi Will,
   
Is it possible for you to link me to the driver which solves the
  problem?
That will be very helpful to me.
   
Regards, Shamim
   
   
   
On Nov 12, 2007 9:02 AM, Akhtar Shamim  [EMAIL PROTECTED] wrote:
 Thanks for your replies. Robert, I am using windows XP Pro with
  service
pack 2. The problem happens with GeForce 8800 GTX cards.

 Will, is there any solution to this or do I need to change my
 graphics
cards?

 Regards, Shamim





 On Nov 12, 2007 5:53 AM, Will Dicharry  [EMAIL PROTECTED] 
 wrote:

  Hi, I am not sure if this is the same problem, but I have an
  application that uses large paged databases and have seen a slow

  down
  on a higher end machine with a GeForce 7900  The slow down was
 only
  on
  Windows, Linux ran fine.  After tracking it down, I found out
 that
  the
  bottleneck was actually in the graphics drivers.  After
 installing
  an
  older version of the drivers, the performance went back up
 again.
  I've also seen the same behavior on a machine with a GeForce
 8800
  GTX.
   Unfortunately, I cannot find an older version of the drivers
 for
  that
  card.  Again, I don't know if this is the same problem, but the
  performance loss on a higher end machine rang a bell in my head.
 
  Will
 
 
 
 
  On Nov 10, 2007 12:31 AM, Akhtar Shamim  [EMAIL PROTECTED]
 wrote:
   Dear All,
  
   Lately I had been seeing a very obscure problem with our OSG
application.
  
   The application uses a very large Terra Vista paged terrain. I
 see
  the
   following two phenomena:
  
   1. With all our old computers ( i.e. computers having a single
  core
CPU, 1 GB
   or less RAM and with graphics card  NVidia 6600) the
 application
gives a
   constant update rate of 60 Hz. No problem with any refresh
 rate
issues.
  
   2. However, when I try the same application on a high end
 machine
(Dual Core
   CPU or Quad Core CPU and with graphics card 7800 GT

Re: [osg-users] Performance issue with Database Pager Terra Vista Files

2007-11-12 Thread Akhtar Shamim
Thanks very much Charles and Will for your support. Very much appreciated.

Best regards, Shamim

On Nov 13, 2007 12:52 AM, Will Dicharry [EMAIL PROTECTED] wrote:

 I don't have access to the machine that I was able to fix it on right
 now, so I don't know the exact version of the drivers.  For the 7900
 card, all I had to do was install the vendor drivers that came with
 the card.  I believe the vendor on that one was EVGA.  I will be able
 to check the version tomorrow.

 I've had the problem on two 8800 GTX cards, one an Asus, the other an
 Evga.  I have not been able to fix it on the Evga card yet.  On the
 Asus card, there is an option in the Nvidia control panel under the 3d
 settings about threading that doesn't appear on the Evga machine.  I
 have no idea why that is.  That option fixed the problem on the Asus
 card.  I will be able to check the exact name and setting of that
 option tomorrow.

 I will send another email tomorrow after I check the driver version
 and the extra setting to give you more information.

 Will

 On Nov 11, 2007 7:36 PM, Akhtar Shamim [EMAIL PROTECTED] wrote:
  Hi Will,
 
  Is it possible for you to link me to the driver which solves the
 problem?
  That will be very helpful to me.
 
  Regards, Shamim
 
 
 
  On Nov 12, 2007 9:02 AM, Akhtar Shamim  [EMAIL PROTECTED] wrote:
   Thanks for your replies. Robert, I am using windows XP Pro with
 service
  pack 2. The problem happens with GeForce 8800 GTX cards.
  
   Will, is there any solution to this or do I need to change my graphics
  cards?
  
   Regards, Shamim
  
  
  
  
  
   On Nov 12, 2007 5:53 AM, Will Dicharry [EMAIL PROTECTED] wrote:
  
Hi, I am not sure if this is the same problem, but I have an
application that uses large paged databases and have seen a slow
 down
on a higher end machine with a GeForce 7900  The slow down was only
 on
Windows, Linux ran fine.  After tracking it down, I found out that
 the
bottleneck was actually in the graphics drivers.  After installing
 an
older version of the drivers, the performance went back up again.
I've also seen the same behavior on a machine with a GeForce 8800
 GTX.
 Unfortunately, I cannot find an older version of the drivers for
 that
card.  Again, I don't know if this is the same problem, but the
performance loss on a higher end machine rang a bell in my head.
   
Will
   
   
   
   
On Nov 10, 2007 12:31 AM, Akhtar Shamim [EMAIL PROTECTED] wrote:
 Dear All,

 Lately I had been seeing a very obscure problem with our OSG
  application.

 The application uses a very large Terra Vista paged terrain. I see
 the
 following two phenomena:

 1. With all our old computers (i.e. computers having a single core
  CPU, 1 GB
 or less RAM and with graphics card  NVidia 6600) the application
  gives a
 constant update rate of 60 Hz. No problem with any refresh rate
  issues.

 2. However, when I try the same application on a high end machine
  (Dual Core
 CPU or Quad Core CPU and with graphics card 7800 GT++) the
 performance
  is
 very poor and quite unpredictable. I looked at the CPU usages and
  found that
 the CPU usage is below 20 % for most of the CPUs. The application
  crawls at
 less than 6-7 Hz. However, if I change the BIOS setting to use
 only
  one CPU
 the application is back to normal and runs at constant 60 Hz.

 It seems to me that the database pager isnt working perfectly with
  multiple
 CPUs and gets deadlocked. I am very confused with this situation.
 For
  our
 deployment we have all new machines with dual and quad core CPUs
 and
  latest
 graphics cards.

 I would be very happy to hear suggestion/advice on how to solve
 this
 performance issue. To be honest I am quite stuck with the problem.
 I
  have
 tried compiling our application with OSG 1.2 and OSG 2.0. The
  phenomenon is
 the same.

  Best regards.

   
   
   
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
   
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
   
  
  
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Performance issue with Database Pager Terra Vista Files

2007-11-11 Thread Akhtar Shamim
Thanks for your replies. Robert, I am using windows XP Pro with service pack
2. The problem happens with GeForce 8800 GTX cards.

Will, is there any solution to this or do I need to change my graphics
cards?

Regards, Shamim

On Nov 12, 2007 5:53 AM, Will Dicharry [EMAIL PROTECTED] wrote:

 Hi, I am not sure if this is the same problem, but I have an
 application that uses large paged databases and have seen a slow down
 on a higher end machine with a GeForce 7900  The slow down was only on
 Windows, Linux ran fine.  After tracking it down, I found out that the
 bottleneck was actually in the graphics drivers.  After installing an
 older version of the drivers, the performance went back up again.
 I've also seen the same behavior on a machine with a GeForce 8800 GTX.
  Unfortunately, I cannot find an older version of the drivers for that
 card.  Again, I don't know if this is the same problem, but the
 performance loss on a higher end machine rang a bell in my head.

 Will

 On Nov 10, 2007 12:31 AM, Akhtar Shamim [EMAIL PROTECTED] wrote:
  Dear All,
 
  Lately I had been seeing a very obscure problem with our OSG
 application.
 
  The application uses a very large Terra Vista paged terrain. I see the
  following two phenomena:
 
  1. With all our old computers (i.e. computers having a single core CPU,
 1 GB
  or less RAM and with graphics card  NVidia 6600) the application gives
 a
  constant update rate of 60 Hz. No problem with any refresh rate issues.
 
  2. However, when I try the same application on a high end machine (Dual
 Core
  CPU or Quad Core CPU and with graphics card 7800 GT++) the performance
 is
  very poor and quite unpredictable. I looked at the CPU usages and found
 that
  the CPU usage is below 20 % for most of the CPUs. The application crawls
 at
  less than 6-7 Hz. However, if I change the BIOS setting to use only one
 CPU
  the application is back to normal and runs at constant 60 Hz.
 
  It seems to me that the database pager isnt working perfectly with
 multiple
  CPUs and gets deadlocked. I am very confused with this situation. For
 our
  deployment we have all new machines with dual and quad core CPUs and
 latest
  graphics cards.
 
  I would be very happy to hear suggestion/advice on how to solve this
  performance issue. To be honest I am quite stuck with the problem. I
 have
  tried compiling our application with OSG 1.2 and OSG 2.0. The phenomenon
 is
  the same.
 
   Best regards.
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Performance issue with Database Pager Terra Vista in multi CPU machines.

2007-11-10 Thread Akhtar Shamim
Dear All,

Lately I had been seeing a very obscure problem with our OSG application.

The application uses a very large Terra Vista paged terrain. I see the
following two phenomena:

1. With all our old computers (i.e. computers having a single core CPU, 1 GB
or less RAM and with graphics card  NVidia 6600) the application gives a
constant update rate of 60 Hz. No problem with any refresh rate issues.

2. However, when I try the same application on a high end machine (Dual Core
CPU or Quad Core CPU and with graphics card 7800 GT++) the performance is
very poor and quite unpredictable. I looked at the CPU usages and found that
the CPU usage is below 20 % for most of the CPUs. The application crawls at
less than 6-7 Hz. However, if I change the BIOS setting to use only one CPU
the application is back to normal and runs at constant 60 Hz.

It seems to me that the database pager isnt working perfectly with multiple
CPUs and gets deadlocked. I am very confused with this situation. For our
deployment we have all new machines with dual and quad core CPUs and latest
graphics cards.

I would be very happy to hear suggestion/advice on how to solve this
performance issue. To be honest I am quite stuck with the problem. I have
tried compiling our application with OSG 1.2 and OSG 2.0. The phenomenon is
the same.

Best regards.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Performance issue with Database Pager Terra Vista Files

2007-11-09 Thread Akhtar Shamim
Dear All,

Lately I had been seeing a very obscure problem with our OSG application.

The application uses a very large Terra Vista paged terrain. I see the
following two phenomena:

1. With all our old computers (i.e. computers having a single core CPU, 1 GB
or less RAM and with graphics card  NVidia 6600) the application gives a
constant update rate of 60 Hz. No problem with any refresh rate issues.

2. However, when I try the same application on a high end machine (Dual Core
CPU or Quad Core CPU and with graphics card 7800 GT++) the performance is
very poor and quite unpredictable. I looked at the CPU usages and found that
the CPU usage is below 20 % for most of the CPUs. The application crawls at
less than 6-7 Hz. However, if I change the BIOS setting to use only one CPU
the application is back to normal and runs at constant 60 Hz.

It seems to me that the database pager isnt working perfectly with multiple
CPUs and gets deadlocked. I am very confused with this situation. For our
deployment we have all new machines with dual and quad core CPUs and latest
graphics cards.

I would be very happy to hear suggestion/advice on how to solve this
performance issue. To be honest I am quite stuck with the problem. I have
tried compiling our application with OSG 1.2 and OSG 2.0. The phenomenon is
the same.

Best regards.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org