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

 
 

bug #24638: AudioDecoder should permit incremental decoding

Submitted by:  Bastiaan Jacques <bjacques>
Submitted on:  Thu Oct 23 15:37:24 2008  
 
Category: NoneSeverity: 3 - Normal
Release: trunkStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun Nov 3 21:36:59 2013, comment #13:

Yes, it will be in 0.8.11

Sandro Santilli <strk>
Project Member
Sun Nov 3 18:38:43 2013, 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 Nov 3 17:28:37 2013, 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>
Project Member
Sun Nov 3 16:22:13 2013, 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 Jul 9 07:53:02 2011, 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 May 9 07:33:56 2011, 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>
Project Member
Sun May 8 17:46:50 2011, 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 Nov 27 10:42:38 2008, 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>
Project Member
Tue Nov 4 17:47:14 2008, 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>
Project Member
Wed Oct 29 16:00:53 2008, 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>
Project Member
Fri Oct 24 19:18:28 2008, comment #3:

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

Sandro Santilli <strk>
Project Member
Fri Oct 24 18:57:16 2008, comment #2:

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

Bastiaan Jacques <bjacques>
Project Member
Fri Oct 24 14:05:25 2008, 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>
Project Member
Thu Oct 23 15:37:24 2008, 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>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Nov 3 17:28:37 2013strkAssigned tosortie=>None
    Sun Jul 24 17:01:35 2011sortieAssigned tobjacques=>sortie

    Back to the top


    Powered by Savane 3.1-cleanup