patchGnash - The GNU Flash player - Patches: patch #8734, Patches for improving...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8734: Patches for improving `--audio-dump` support in Gnash

Submitted by:  Nutchanon Wetchasit <nachanon>
Submitted on:  Mon 07 Sep 2015 09:31:43 AM UTC  
 
Category: soundPriority: 5 - Normal
Status: In ProgressPrivacy: Public
Assigned to: Sandro Santilli <strk>Open/Closed: Open

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

Thu 26 Jan 2017 11:03:54 AM UTC, comment #10:

Patch 4/4 applied with git.savannah.gnu.org/cgit/gnash.git/commit/?id=f9db2f227e72b177854f497b72c0f9ab45b6869a

The output message change included in Patch 3/4 (pushed with //git.savannah.gnu.org/cgit/gnash.git/commit/?id=2f7d9b270b6ae90ef1af5ceb4ad6a49d5a053c04) should probably still be reverted to avoid breaking scripted usages of dump-gnash, which would use the output as a shell script setting variables (AUDIOFILE=xxxx; # comment).

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 01 Oct 2015 04:52:06 PM UTC, comment #9:

Patch 4 of 4: see the attached `0004_use-endian-neutral-wave-header-write.patch`

Original code assumes the platform is using little-endian byte order
when it writes WAVE header, which would produce an unreadable file if
the system is big-endian.

This patch switches it to an endian-neutral bit shifting. (Might need a review,
since I'm not sure if there is a less clunky way to do this)

Note: The patch does not provide a provision for audio data's byte ordering itself.

Gnash: 0.8.11dev (patched against git f0f66ce 23-Sep-2015)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #35023)

Nutchanon Wetchasit <nachanon>
Wed 09 Sep 2015 11:48:22 AM UTC, comment #8:

I think the output message was meant to be used by shell scripts, notice the comment in first line and the variable set in second line

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 09 Sep 2015 11:25:44 AM UTC, comment #7:

Patch 3: see the attached `0003_fix-audio-dump-message.patch`

This patch corrects a wrong audio dump notice message, and also change
the way it was emitted, from `cout` to a proper `log_debug()`.

(file #34839)

Nutchanon Wetchasit <nachanon>
Tue 08 Sep 2015 08:12:52 PM UTC, comment #6:

I've changed the comment as described below in c969f9d9d9a.

Bastiaan Jacques <bjacques>
Project Member
Mon 07 Sep 2015 07:30:37 PM UTC, comment #5:

both patches pushed to master

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 07 Sep 2015 07:17:21 PM UTC, comment #4:

actually, don't bother, I'm building and will push as soon as quickly tested.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 07 Sep 2015 07:14:23 PM UTC, comment #3:

Can you go ahead and commit them Bastiaan ? Or I'll try to find the time myself ...

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 07 Sep 2015 06:25:11 PM UTC, comment #2:

I think this comment should correspond to what is actually happening here, i.e. something like:

// Seeking back to the beginning, in order to rewrite the
// header with information accumulated during writing.

Aside from that, both patches look good to me.

Bastiaan Jacques <bjacques>
Project Member
Mon 07 Sep 2015 11:11:57 AM UTC, comment #1:

Patch 2 of 4: see the attahced `0002_flush-wave-metadata-on-audio-dump-end.patch`.

This patch addresses the issue of an un-updated "data" and "RIFF" chunk length,
by making `WAVWriter`'s destructor seek back and re-write WAVE header when
the dumping ended (user closed the window, clicked File > Quit, or
Gnash reached the specified frame), before closing the output stream.

Might need a review since I don't know much about Gnash's convention
regarding log message.

This completes the fix of main issue in bug #45887.

Caveat: This patch provides no provision for signal handling; terminating
Gnash with Ctrl+C, Ctrl+\, or using `kill` will still result in an incorrect
dump file (though still recoverable using FFmpeg/AVconv).

Gnash: 0.8.11dev (patched against git dc51f53 28-Aug-2015)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #34824)

Nutchanon Wetchasit <nachanon>
Mon 07 Sep 2015 09:31:43 AM UTC, original submission:

Gnash's support for `--audio-dump`/`-A` option have some problems that
rendered output file unreadable by several program. This narrowed down to
how Gnash writes RIFF WAVE metadata in `libsound/WAVWriter.cpp`.

Attached patch (patch 1 of 4: `0001_use-correct-riff-wave-chunk-size.patch`)
addresses the issue of a wrong RIFF chunk size in output WAVE file. (Which was
originally off-by-8 because "RIFF" string and its chunk size field was
erroneously included in the count).

This partially fixes bug #45887.

Gnash: 0.8.11dev (patched against git dc51f53 28-Aug-2015)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>

 

Attached Files
file #35023:  0004_use-endian-neutral-wave-header-write.patch added by nachanon (2KiB - text/x-patch - Patch make Gnash always use a correct byte order on writing WAVE header)
file #34839:  0003_fix-audio-dump-message.patch added by nachanon (686B - text/x-patch - Patch to correct audio dumping message)
file #34824:  0002_flush-wave-metadata-on-audio-dump-end.patch added by nachanon (3KiB - text/x-patch - Patch to make Gnash update WAVE header before exiting)
file #34823:  0001_use-correct-riff-wave-chunk-size.patch added by nachanon (630B - text/x-patch - Patch to correct RIFF chunk size in WAVE dump file)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by bjacques (Posted a comment)
  • -unavailable- added by nachanon (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Oct 2015 04:52:06 PM UTCnachanonAttached File-=>Added 0004_use-endian-neutral-wave-header-write.patch, #35023
    Wed 09 Sep 2015 11:25:44 AM UTCnachanonAttached File-=>Added 0003_fix-audio-dump-message.patch, #34839
    Tue 08 Sep 2015 08:12:52 PM UTCbjacquesStatusDone=>In Progress
      Open/ClosedClosed=>Open
    Mon 07 Sep 2015 07:30:37 PM UTCstrkStatusIn Progress=>Done
      Open/ClosedOpen=>Closed
    Mon 07 Sep 2015 07:17:21 PM UTCstrkStatusNone=>In Progress
      Assigned toNone=>strk
    Mon 07 Sep 2015 11:11:57 AM UTCnachanonAttached File-=>Added 0002_flush-wave-metadata-on-audio-dump-end.patch, #34824
    Mon 07 Sep 2015 09:31:44 AM UTCnachanonAttached File-=>Added 0001_use-correct-riff-wave-chunk-size.patch, #34823

    Back to the top


    Powered by Savane 3.1-cleanup1