Re[2]: mng_display_gotime() and large files

Evgeniy Rigkov <[email protected]> Sun, 25 Jul 2004 13:30:16 +0400
Newsgroups gmane.comp.graphics.mng.general
Message-ID <[email protected]>
>> I  want to use libmng for playing own large files (rezolution up to
>> 1024x768  and  playtime  up  to  30-50 min). File structure is much
>> IHDR, IDAT, IEND sections.

> I would suggest sticking to mpeg or the likes, as that's much more suited for
> this kind of thing.

Yes, but i choose MNG format, because it's:

   a) patent free;
   b) simple;
   c) free open-source library available  (thanks for it!).

The MNG format don't have restriction on the file size, is it?

>> Whether  there  is  a  way  to  limit  a memory allocation, but to use
>> mng_display_gotime()?

> This is just not possible currently.

In future this may be?

> (may not even need SAVE, if you keep track of IHDR's).
> Then wheneveer the user wants to jump to a specific time, just reset your
> input-stream to the right IHDR, and start feeding libmng from that point, making
> sure the last chunk read before doing this is always the IEND.

Yes, I tried this method earlier (before i wrote first message).
But i have error "incorrect chunk". Probably it is my mistake.

This is correct sequence? :

1.  Play.

    mng_readdisplay();
    while (mymng->delay)
    {
        ...
        mng_read_resume(mng);
    }

2.  Rewind request.

    mng_display_reset();
    seek(required_IHDR_chunk_pos_in_file);

3.  Play again.

    mng_readdisplay();
    while (mymng->delay)
    {
        ...
        mng_read_resume(mng);
    }


Whether will be mistake because of different frames quantity
in MHDR chunk and really is read (with seek() operation) ?






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