bugGnash - The GNU Flash player - Bugs: bug #24638, AudioDecoder should permit...

 
 

bug #24638: AudioDecoder should permit incremental decoding

Submitter:  Bastiaan Jacques <bjacques>
Submitted:  Thu 23 Oct 2008 03:37:24 PM UTC
   
 
Category:  None Severity:  3 - Normal
Release:  trunk Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 03 Nov 2013 09:36:59 PM UTC, comment #13: 

Yes, it will be in 0.8.11

Sandro Santilli <strk>
Group Member
Sun 03 Nov 2013 06:38:43 PM UTC, comment #12: 

Sandro, would it be possible that the patch would be released with next 0.8.11 version?

Many thanks for your help.

Pablo Rodríguez <ousia>
Sun 03 Nov 2013 05:28:37 PM UTC, comment #11: 

Pablo, I'd like to test my patch some more, just in case any decoder needs more than 65535 bytes of encoded data to do anything useful. After testing more I'll apply and ping you back.

About the start/stop and next/previous please file a new ticket.
Thank you.

Sandro Santilli <strk>
Group Member
Sun 03 Nov 2013 04:22:13 PM UTC, comment #10: 

Sandro,

the patch you posted in bug #25456 seems to work fine. Could it be applied to master?

the testcase (http://archive.org/download/Lessig-Free_Culture/lessig-freeculture.swf) has ActionScript code allowing sound start/stop and going to next/previous slide that doesn’t work.

Which is the best way to report this?

Many thanks for your help,


Pablo


Pablo Rodríguez <ousia>
Sat 09 Jul 2011 07:53:02 AM UTC, comment #9: 

I'm afraid that bug 25456 isn't fixed and that might be the testcase to check whether incremental audio decoding has been implemented or not.

Thanks for your help,

Pablo

Pablo Rodríguez <ousia>
Mon 09 May 2011 07:33:56 AM UTC, comment #8: 

Bug #25456 seems fixed to me.
This ticket isn't really a bug (there's no testcase proving anything is wrong) but more of a task.

Sandro Santilli <strk>
Group Member
Sun 08 May 2011 05:46:50 PM UTC, comment #7: 

Sorry, but I wonder whether bug 25456 may be a duplicate of this bug?

Just in case it is, could you mark bug 25456 as a duplicate?

Thanks for your help,

Pablo

Pablo Rodríguez <ousia>
Thu 27 Nov 2008 10:42:38 AM UTC, comment #6: 

+1 to go with the push/pop model.
Sounds the cleanest.

Eventually, we'll also want a method to check
if any input data didn't result in a set of samples
(for error logging and the like).
So the caller, to follow the current design, would
push blocks, pop as many resulting samples buffers
(tipically one for each decoded frame)
and then check if any partial buffer remained unbuffered.

I'd return sampls by auto pointers to SimpleBuffer from pop().

Sandro Santilli <strk>
Group Member
Tue 04 Nov 2008 05:47:14 PM UTC, comment #5: 

Just for the record: I might have found a case
in which a DEFINESOUND block doesn't contain full
frames. Can't confirm yet, anyway it's reported in bug #23047

Sandro Santilli <strk>
Group Member
Wed 29 Oct 2008 04:00:53 PM UTC, comment #4: 

FYI: the AudioDecoder interface already allows a form of progressive decoding in the second ::decode interface (the one
NOT taking EncodedAudioFrame).

Only, state keeping is not done internally but left to caller.

See:
http://www.gnashdev.org/doc/apidoc/classgnash_1_1media_1_1AudioDecoder.html#e29075a2a2ca9a6ef7a266c545559b24

The decodedData output parameter expresses how much of the data
was used, then it's up to caller to keep the rest for next
call. This is how sound_handler_SDL uses that interface currently,
for embedded sounds.


Sandro Santilli <strk>
Group Member
Fri 24 Oct 2008 07:18:28 PM UTC, comment #3: 

It will help proving the assumptions, or the design might take the wrong direction.

Sandro Santilli <strk>
Group Member
Fri 24 Oct 2008 06:57:16 PM UTC, comment #2: 

Presumably, but it won't help in fixing this bug.

Bastiaan Jacques <bjacques>
Group Member
Fri 24 Oct 2008 02:05:25 PM UTC, comment #1: 


> Indeed, a SWF Or FLV frame might contain less than a single frame of encoded audio data


Can you back this up with a testcase ?

Sandro Santilli <strk>
Group Member
Thu 23 Oct 2008 03:37:24 PM UTC, original submission:  

Currently, AudioDecoder requires implementation of at least one decode() method. The decode() method requires that the decoder decode the encoded data passed and return all decoded information.

However, this is not how most decoding libraries operate. In practice, libraries expect to receive an unspecified amount of data, which will be split into frames and returned on a frame-by-frame basis. It is then up to the AudioDecoder to reallocate a buffer large enough to contain all the decoded frames so as to comply with the AudioDecoder::decode() requirements. It is important to realize that a SWF or FLV frame does not necessarily correspond to a single frame of decoded audio. Indeed, a SWF Or FLV frame might contain less than a single frame of encoded audio data.

This is a huge overhead in unnecessary reallocation and CPU time. Instead, AudioDecoder should specify a push/pop/pull interface similar to VideoDecoder, so that decoders can return decoded data frame by frame.

Bastiaan Jacques <bjacques>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sortie (Updated the item)
  • -email is unavailable- added by ousia (Posted a comment)
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by bjacques (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-03 strk Assigned tosortie None
    2011-07-24 sortie Assigned tobjacques sortie

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code