Re: libmng data-push mechanism(s)

Alexander Opitz <opitz-MXccdyw32Q/[email protected]> Thu, 15 Apr 2004 18:45:12 +0200
Newsgroups gmane.comp.graphics.mng.general
Message-ID <[email protected]>
Hi,

> Are you still calling mng_readdisplay() ?

Yes. One time on start.

> pushdata() doesn't do anything. It just stores data. The normal processing
> should remain. The only difference with your old code is that you always
> return "0 bytes read" in the readdata() callback, and during "breaks" (eg.
> libmng has return MNG_NEEDTIMERWAIT or MNG_NEEDMOREDATA) you call
> mng_read_pushdata() to push the just received data into libmng.

> Are you also sure that the call to your gluecode that data has arrived is
> appearing in the same thread as the one that's called readdisplay() ?

normally yes.


I've done now following

imgContainerMNG::WriteMNG(const char* rawData, PRUint32 count, PRUint32* 
writeCount)
{
fprintf(stderr, "Push %d Data to MNG\n",count);
  int error = mng_read_pushdata(mHandle, NS_CONST_CAST(char *, rawData), 
count, MNG_FALSE);
fprintf(stderr, "Push error %d\n",error);
  *writeCount=count;

--> I've now added this 2 lines

  int ret = mng_display_resume(mHandle);
fprintf(stderr, "Resume error %d\n",ret);

--> Above lines added.

  return NS_OK;
}


And now it works. The programming is not how I'd expected it ... but OK it 
works.  :-)

Greetings Alex//

--
Send the message body "help" to [email protected]