gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-358-g838bfb8
Date: Fri, 27 May 2011 08:49:37 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  838bfb83f974d78152c198b6f0bc9a6f45f043f7 (commit)
       via  d022137a18f9443b5d80f486656b51645725a4f6 (commit)
       via  eddf90fc4bd9547b8a0cef602bc517c907f3ec36 (commit)
       via  003dcf22003760223b48604d22c18dca9fc45692 (commit)
      from  0688c3274802591588a6e7c324ff63bfb59390d9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=838bfb83f974d78152c198b6f0bc9a6f45f043f7


commit 838bfb83f974d78152c198b6f0bc9a6f45f043f7
Author: Benjamin Wolsey <address@hidden>
Date:   Thu May 26 10:21:37 2011 +0200

    Log only once.

diff --git a/libcore/swf/StreamSoundBlockTag.cpp 
b/libcore/swf/StreamSoundBlockTag.cpp
index 608fa95..b4dd7d0 100644
--- a/libcore/swf/StreamSoundBlockTag.cpp
+++ b/libcore/swf/StreamSoundBlockTag.cpp
@@ -82,12 +82,12 @@ StreamSoundBlockTag::loader(SWFStream& in, TagType tag, 
movie_definition& m,
         const boost::uint16_t seekSamples = in.read_u16();
 
         if (samplesCount) {
-            log_unimpl(_("MP3 soundblock samples count (%s)"),
-                        samplesCount);
+            LOG_ONCE(log_unimpl(_("MP3 soundblock samples count (%s)"),
+                        samplesCount));
         }
         if (seekSamples) {
-            log_unimpl(_("MP3 soundblock seek samples (%s)"),
-                        seekSamples);
+            LOG_ONCE(log_unimpl(_("MP3 soundblock seek samples (%s)"),
+                        seekSamples));
         }
     }
 

http://git.savannah.gnu.org/cgit//commit/?id=d022137a18f9443b5d80f486656b51645725a4f6


commit d022137a18f9443b5d80f486656b51645725a4f6
Author: Benjamin Wolsey <address@hidden>
Date:   Thu May 26 10:09:17 2011 +0200

    Use legal identifier.

diff --git a/libmedia/SoundInfo.h b/libmedia/SoundInfo.h
index 5020208..147911d 100644
--- a/libmedia/SoundInfo.h
+++ b/libmedia/SoundInfo.h
@@ -15,12 +15,8 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-// 
-//
-
-
-#ifndef __SOUNDINFO_H__
-#define __SOUNDINFO_H__
+#ifndef GNASH_LIBMEDIA_SOUNDINFO_H
+#define GNASH_LIBMEDIA_SOUNDINFO_H
 
 #include "MediaParser.h" // for audioCodecType enum and AudioInfo
 

http://git.savannah.gnu.org/cgit//commit/?id=eddf90fc4bd9547b8a0cef602bc517c907f3ec36


commit eddf90fc4bd9547b8a0cef602bc517c907f3ec36
Author: Benjamin Wolsey <address@hidden>
Date:   Thu May 26 10:03:33 2011 +0200

    Handle StreamSoundHead tags in their own file.

diff --git a/libcore/Makefile.am b/libcore/Makefile.am
index 5731f00..936829a 100644
--- a/libcore/Makefile.am
+++ b/libcore/Makefile.am
@@ -107,6 +107,7 @@ libgnashcore_la_SOURCES = \
        swf/CSMTextSettingsTag.cpp \
        swf/PlaceObject2Tag.cpp \
        swf/RemoveObjectTag.cpp \
+       swf/SoundStreamHeadTag.cpp      \
        swf/StartSoundTag.cpp \
        swf/SetTabIndexTag.cpp \
        swf/StreamSoundBlockTag.cpp \
@@ -177,6 +178,7 @@ noinst_HEADERS = \
        swf/DefineShapeTag.h \
        swf/DefineScalingGridTag.h \
        swf/DefineMorphShapeTag.h \
+       swf/SoundStreamHeadTag.h \
        swf/SoundInfoRecord.h \
        swf/TextRecord.h \
        swf/DefineButtonSoundTag.h \
diff --git a/libcore/swf/DefaultTagLoaders.cpp 
b/libcore/swf/DefaultTagLoaders.cpp
index 80ebea7..bb54cec 100644
--- a/libcore/swf/DefaultTagLoaders.cpp
+++ b/libcore/swf/DefaultTagLoaders.cpp
@@ -54,6 +54,7 @@
 #include "VideoFrameTag.h"
 #include "ImportAssetsTag.h"
 #include "ExportAssetsTag.h"
+#include "SoundStreamHeadTag.h"
 #ifdef ENABLE_AVM2
 # include "SymbolClassTag.h"
 # include "DoABCTag.h"
@@ -134,7 +135,7 @@ addDefaultLoaders(TagLoadersTable& table)
         // 17
         (TagPair(SWF::DEFINEBUTTONSOUND, DefineButtonSoundTag::loader))
         // 18
-        (TagPair(SWF::SOUNDSTREAMHEAD, sound_stream_head_loader))
+        (TagPair(SWF::SOUNDSTREAMHEAD, SoundStreamHeadTag::loader))
         // 19
         (TagPair(SWF::SOUNDSTREAMBLOCK, StreamSoundBlockTag::loader))
         (TagPair(SWF::DEFINELOSSLESS, DefineBitsTag::loader))
@@ -163,7 +164,7 @@ addDefaultLoaders(TagLoadersTable& table)
         (TagPair(SWF::FRAMELABEL, frame_label_loader)) // 43
         (TagPair(SWF::DEFINEBEHAVIOR, unexpected)) // 44
         // 45
-        (TagPair(SWF::SOUNDSTREAMHEAD2, sound_stream_head_loader))
+        (TagPair(SWF::SOUNDSTREAMHEAD2, SoundStreamHeadTag::loader))
         // 46
         (TagPair(SWF::DEFINEMORPHSHAPE, DefineMorphShapeTag::loader))
         // 47
diff --git a/libcore/swf/SoundStreamHeadTag.cpp 
b/libcore/swf/SoundStreamHeadTag.cpp
new file mode 100644
index 0000000..9673163
--- /dev/null
+++ b/libcore/swf/SoundStreamHeadTag.cpp
@@ -0,0 +1,170 @@
+// 
+//   Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#include "SoundStreamHeadTag.h"
+
+#include <boost/cstdint.hpp>
+#include <memory>
+
+#include "SWF.h"
+#include "SWFStream.h"
+#include "movie_definition.h"
+#include "RunResources.h"
+#include "sound_handler.h"
+#include "GnashAlgorithm.h"
+#include "SoundInfo.h"
+#include "utility.h"
+
+namespace gnash {
+namespace SWF {
+
+// Load a SoundStreamHead(2) tag.
+void
+SoundStreamHeadTag::loader(SWFStream& in, TagType tag, movie_definition& m,
+               const RunResources& r)
+{
+    // 18 || 45
+    assert(tag == SWF::SOUNDSTREAMHEAD || tag == SWF::SOUNDSTREAMHEAD2);
+
+    sound::sound_handler* handler = r.soundHandler();
+
+    // If we don't have a sound_handler registered stop here
+    if (!handler) return;
+
+    // FIXME:
+    // no DisplayObject id for soundstreams... so we make one up...
+    // This only works if there is only one SWFStream in the movie...
+    // The right way to do it is to make seperate structures for streams
+    // in SWFMovieDefinition.
+
+    // 1 byte for playback info, 1 for SWFStream info, 2 for sample count
+    in.ensureBytes(4);
+
+    // These are all unused by current implementation
+    int reserved = in.read_uint(4); UNUSED(reserved);
+
+    const boost::uint32_t samplerates[] = { 5512, 11025, 22050, 44100 };
+
+    boost::uint8_t pbSoundRate = in.read_uint(2);
+    if (pbSoundRate >= arraySize(samplerates)) {
+        IF_VERBOSE_MALFORMED_SWF(
+            log_swferror("SOUNDSTREAMHEAD: playback sound rate %d (expected "
+                "0 to %d)", +pbSoundRate, arraySize(samplerates));
+        );
+        pbSoundRate=0;
+    }
+    const boost::uint32_t playbackSoundRate = samplerates[pbSoundRate];
+    const bool playbackSound16bit = in.read_bit();
+    const bool playbackSoundStereo = in.read_bit();
+
+    // These are the used ones
+    media::audioCodecType format =
+        static_cast<media::audioCodecType>(in.read_uint(4)); // TODO: check 
input !
+    boost::uint8_t stSoundRate = in.read_uint(2);
+
+    if (stSoundRate >= arraySize(samplerates)) {
+        IF_VERBOSE_MALFORMED_SWF(
+            log_swferror(_("SOUNDSTREAMHEAD: stream sample rate %d (expected "
+                "0 to %u)"), +stSoundRate, arraySize(samplerates));
+        );
+        stSoundRate=0;
+    }
+    const boost::uint32_t streamSoundRate = samplerates[stSoundRate];
+    const bool streamSound16bit = in.read_bit(); 
+    const bool streamSoundStereo = in.read_bit(); 
+
+    if (playbackSoundRate != streamSoundRate) {
+        LOG_ONCE(log_unimpl(_("Different stream/playback sound rate (%d/%d). "
+                "This seems common in SWF files, so we'll warn only once."),
+                streamSoundRate, playbackSoundRate)
+        );
+    }
+
+    if (playbackSound16bit != streamSound16bit) {
+        LOG_ONCE(log_unimpl(_("Different stream/playback sample size (%d/%d). "
+            "This seems common in SWF files, so we'll warn only once."),
+            streamSound16bit ? 16 : 32, playbackSound16bit ? 16 : 32 )
+        );
+    }
+    if (playbackSoundStereo != streamSoundStereo) {
+        LOG_ONCE(log_unimpl(_("Different stream/playback channels (%s/%s). "
+            "This seems common in SWF files, so we'll warn only once."),
+            streamSoundStereo ? "stereo" : "mono",
+            playbackSoundStereo ? "stereo" : "mono")
+        );
+    }
+
+    // checks if this is a new streams header or just one in the row
+    if (format == 0 && streamSoundRate == 0 &&
+            !streamSound16bit && !streamSoundStereo) {
+        return;
+    }
+
+    // 2 bytes here
+    const boost::uint16_t sampleCount = in.read_u16();
+
+    if (!sampleCount) {
+        // this seems common too, we'd need to reproduce with a custom
+        // testcase to really tell if it's a problem or not...
+        IF_VERBOSE_MALFORMED_SWF(
+            LOG_ONCE(log_swferror(_("No samples advertised for sound stream, "
+                        "pretty common so will warn only once")));
+        );
+    }
+
+    boost::int16_t latency = 0;
+    if (format == media::AUDIO_CODEC_MP3) {
+        try {
+            in.ensureBytes(2);
+            latency = in.read_s16(); 
+        }
+        catch (const ParserException&) {
+            // See https://savannah.gnu.org/bugs/?21729 for an example 
+            // triggering this.
+            IF_VERBOSE_MALFORMED_SWF(
+                log_swferror("MP3 sound stream lacks a 'latency' field");
+            );
+        }
+    }
+
+    // Check if we did read everything in this tag...
+    unsigned long curPos = in.tell(), endTag=in.get_tag_end_position();
+    if (curPos < endTag) {
+        log_unimpl("SOUNDSTREAMHEAD contains %d unparsed bytes", 
endTag-curPos);
+    }
+
+    IF_VERBOSE_PARSE(
+        log_parse(_("sound stream head: format=%s, rate=%d, 16=%d, "
+            "stereo=%d, ct=%d, latency=%d"), format, streamSoundRate,
+            +streamSound16bit, +streamSoundStereo, +sampleCount, +latency);
+    );
+
+    // Store all the data in a SoundInfo object
+    std::auto_ptr<media::SoundInfo> sinfo;
+    sinfo.reset(new media::SoundInfo(format, streamSoundStereo,
+                streamSoundRate, sampleCount, streamSound16bit, latency));
+
+    // Stores the sounddata in the soundhandler, and the ID returned
+    // can be used to starting, stopping and deleting that sound
+    const int handler_id =
+        handler->create_sound(std::auto_ptr<SimpleBuffer>(0), sinfo);
+
+    m.set_loading_sound_stream_id(handler_id);
+}
+
+} // namespace SWF
+} // namespace gnash
diff --git a/libcore/swf/SoundStreamHeadTag.h b/libcore/swf/SoundStreamHeadTag.h
new file mode 100644
index 0000000..ee4e974
--- /dev/null
+++ b/libcore/swf/SoundStreamHeadTag.h
@@ -0,0 +1,53 @@
+// 
+//   Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#ifndef GNASH_SWF_SOUNDSTREAMHEAD_TAG_H
+#define GNASH_SWF_SOUNDSTREAMHEAD_TAG_H
+
+
+#include <boost/cstdint.hpp> 
+ 
+#include "SWF.h"
+
+// Forward declarations
+namespace gnash {
+    class SWFStream;
+    class movie_definition;
+    class RunResources;
+}
+
+namespace gnash {
+namespace SWF {
+
+class SoundStreamHeadTag
+{
+public:
+    static void loader(SWFStream& in, TagType tag, movie_definition& m,
+            const RunResources& r);
+};
+
+} // namespace SWF
+} // namespace gnash
+
+
+#endif 
+
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:
diff --git a/libcore/swf/tag_loaders.cpp b/libcore/swf/tag_loaders.cpp
index 1a0cd90..e132d24 100644
--- a/libcore/swf/tag_loaders.cpp
+++ b/libcore/swf/tag_loaders.cpp
@@ -240,138 +240,6 @@ define_sound_loader(SWFStream& in, TagType tag, 
movie_definition& m,
     }
 }
 
-// Load a SoundStreamHead(2) tag.
-void
-sound_stream_head_loader(SWFStream& in, TagType tag, movie_definition& m,
-               const RunResources& r)
-{
-    // 18 || 45
-    assert(tag == SWF::SOUNDSTREAMHEAD || tag == SWF::SOUNDSTREAMHEAD2);
-
-    sound::sound_handler* handler = r.soundHandler();
-
-    // If we don't have a sound_handler registered stop here
-    if (!handler) return;
-
-    // FIXME:
-    // no DisplayObject id for soundstreams... so we make one up...
-    // This only works if there is only one SWFStream in the movie...
-    // The right way to do it is to make seperate structures for streams
-    // in SWFMovieDefinition.
-
-    // 1 byte for playback info, 1 for SWFStream info, 2 for sample count
-    in.ensureBytes(4);
-
-    // These are all unused by current implementation
-    int reserved = in.read_uint(4); UNUSED(reserved);
-
-    boost::uint8_t pbSoundRate = in.read_uint(2);
-    if (pbSoundRate >= arraySize(samplerates)) {
-        IF_VERBOSE_MALFORMED_SWF(
-            log_swferror("SOUNDSTREAMHEAD: playback sound rate %d (expected "
-                "0 to %d)", +pbSoundRate, arraySize(samplerates));
-        );
-        pbSoundRate=0;
-    }
-    const boost::uint32_t playbackSoundRate = samplerates[pbSoundRate];
-    const bool playbackSound16bit = in.read_bit();
-    const bool playbackSoundStereo = in.read_bit();
-
-    // These are the used ones
-    media::audioCodecType format =
-        static_cast<media::audioCodecType>(in.read_uint(4)); // TODO: check 
input !
-    boost::uint8_t stSoundRate = in.read_uint(2);
-
-    if (stSoundRate >= arraySize(samplerates)) {
-        IF_VERBOSE_MALFORMED_SWF(
-            log_swferror(_("SOUNDSTREAMHEAD: stream sample rate %d (expected "
-                "0 to %u)"), +stSoundRate, arraySize(samplerates));
-        );
-        stSoundRate=0;
-    }
-    const boost::uint32_t streamSoundRate = samplerates[stSoundRate];
-    const bool streamSound16bit = in.read_bit(); 
-    const bool streamSoundStereo = in.read_bit(); 
-
-    if (playbackSoundRate != streamSoundRate) {
-        LOG_ONCE(log_unimpl(_("Different stream/playback sound rate (%d/%d). "
-                "This seems common in SWF files, so we'll warn only once."),
-                streamSoundRate, playbackSoundRate)
-        );
-    }
-
-    if (playbackSound16bit != streamSound16bit) {
-        LOG_ONCE(log_unimpl(_("Different stream/playback sample size (%d/%d). "
-            "This seems common in SWF files, so we'll warn only once."),
-            streamSound16bit ? 16 : 32, playbackSound16bit ? 16 : 32 )
-        );
-    }
-    if (playbackSoundStereo != streamSoundStereo) {
-        LOG_ONCE(log_unimpl(_("Different stream/playback channels (%s/%s). "
-            "This seems common in SWF files, so we'll warn only once."),
-            streamSoundStereo ? "stereo" : "mono",
-            playbackSoundStereo ? "stereo" : "mono")
-        );
-    }
-
-    // checks if this is a new streams header or just one in the row
-    if (format == 0 && streamSoundRate == 0 &&
-            !streamSound16bit && !streamSoundStereo) {
-        return;
-    }
-
-    // 2 bytes here
-    const boost::uint16_t sampleCount = in.read_u16();
-
-    if (!sampleCount) {
-        // this seems common too, we'd need to reproduce with a custom
-        // testcase to really tell if it's a problem or not...
-        IF_VERBOSE_MALFORMED_SWF(
-            LOG_ONCE(log_swferror(_("No samples advertised for sound stream, "
-                        "pretty common so will warn only once")));
-        );
-    }
-
-    boost::int16_t latency = 0;
-    if (format == media::AUDIO_CODEC_MP3) {
-        try {
-            in.ensureBytes(2);
-            latency = in.read_s16(); 
-        }
-        catch (const ParserException&) {
-            // See https://savannah.gnu.org/bugs/?21729 for an example 
-            // triggering this.
-            IF_VERBOSE_MALFORMED_SWF(
-                log_swferror("MP3 sound stream lacks a 'latency' field");
-            );
-        }
-    }
-
-    // Check if we did read everything in this tag...
-    unsigned long curPos = in.tell(), endTag=in.get_tag_end_position();
-    if (curPos < endTag) {
-        log_unimpl("SOUNDSTREAMHEAD contains %d unparsed bytes", 
endTag-curPos);
-    }
-
-    IF_VERBOSE_PARSE(
-        log_parse(_("sound stream head: format=%s, rate=%d, 16=%d, "
-            "stereo=%d, ct=%d, latency=%d"), format, streamSoundRate,
-            +streamSound16bit, +streamSoundStereo, +sampleCount, +latency);
-    );
-
-    // Store all the data in a SoundInfo object
-    std::auto_ptr<media::SoundInfo> sinfo;
-    sinfo.reset(new media::SoundInfo(format, streamSoundStereo,
-                streamSoundRate, sampleCount, streamSound16bit, latency));
-
-    // Stores the sounddata in the soundhandler, and the ID returned
-    // can be used to starting, stopping and deleting that sound
-    const int handler_id =
-        handler->create_sound(std::auto_ptr<SimpleBuffer>(0), sinfo);
-
-    m.set_loading_sound_stream_id(handler_id);
-}
-
 
 void
 file_attributes_loader(SWFStream& in, TagType tag, movie_definition& m,
diff --git a/libcore/swf/tag_loaders.h b/libcore/swf/tag_loaders.h
index 3f3a43b..e3d909d 100644
--- a/libcore/swf/tag_loaders.h
+++ b/libcore/swf/tag_loaders.h
@@ -51,10 +51,6 @@ void frame_label_loader(SWFStream&, TagType, 
movie_definition&,
 void define_sound_loader(SWFStream&, TagType, movie_definition&,
                const RunResources&);
 
-/// Load SWF::SOUNDSTREAMHEAD or SWF::SOUNDSTREAMHEAD2 tag.
-void sound_stream_head_loader(SWFStream&, TagType, movie_definition&,
-               const RunResources&);
-
 void
 file_attributes_loader(SWFStream& in, TagType tag, movie_definition& m,
                const RunResources& r);

http://git.savannah.gnu.org/cgit//commit/?id=003dcf22003760223b48604d22c18dca9fc45692


commit 003dcf22003760223b48604d22c18dca9fc45692
Author: Benjamin Wolsey <address@hidden>
Date:   Thu May 26 10:02:44 2011 +0200

    Clean up StreamSoundBlockTag.
    
    Use Gnash style, drop unused function, use int type consistently.

diff --git a/libcore/swf/StreamSoundBlockTag.cpp 
b/libcore/swf/StreamSoundBlockTag.cpp
index 1ab0900..608fa95 100644
--- a/libcore/swf/StreamSoundBlockTag.cpp
+++ b/libcore/swf/StreamSoundBlockTag.cpp
@@ -38,27 +38,21 @@ StreamSoundBlockTag::executeActions(MovieClip* m, 
DisplayList& /*dlist*/) const
 
     if (handler) {
         // This makes it possible to stop only the stream when framejumping.
-        m->setStreamSoundId(m_handler_id);
-
-        handler->playStream(m_handler_id, _blockId);
+        m->setStreamSoundId(_handler_id);
+        handler->playStream(_handler_id, _blockId);
     }
 }
 
-/* public static */
 void
 StreamSoundBlockTag::loader(SWFStream& in, TagType tag, movie_definition& m,
         const RunResources& r)
 {
-    assert(tag == SWF::SOUNDSTREAMBLOCK); // 19
+    assert(tag == SWF::SOUNDSTREAMBLOCK); 
 
     sound::sound_handler* handler = r.soundHandler(); 
 
     // If we don't have a sound_handler registered stop here
-    if (!handler)
-    {
-        // log_debug ?
-        return;
-    }
+    if (!handler) return;
 
     // Get the ID of the sound stream currently being loaded
     const int sId = m.get_loading_sound_stream_id();
@@ -83,9 +77,18 @@ StreamSoundBlockTag::loader(SWFStream& in, TagType tag, 
movie_definition& m,
     if (format == media::AUDIO_CODEC_MP3) {
         in.ensureBytes(4);
         // FIXME: use these values !
-        unsigned int samplesCount = in.read_u16(); UNUSED(samplesCount);
-        unsigned int seekSamples = in.read_u16();
-        if (seekSamples) LOG_ONCE(log_unimpl(_("MP3 soundblock seek 
samples")));
+        const boost::uint16_t samplesCount = in.read_u16();
+        UNUSED(samplesCount);
+        const boost::uint16_t seekSamples = in.read_u16();
+
+        if (samplesCount) {
+            log_unimpl(_("MP3 soundblock samples count (%s)"),
+                        samplesCount);
+        }
+        if (seekSamples) {
+            log_unimpl(_("MP3 soundblock seek samples (%s)"),
+                        seekSamples);
+        }
     }
 
     const unsigned int dataLength = in.get_tag_end_position() - in.tell();
diff --git a/libcore/swf/StreamSoundBlockTag.h 
b/libcore/swf/StreamSoundBlockTag.h
index 0597154..07014d6 100644
--- a/libcore/swf/StreamSoundBlockTag.h
+++ b/libcore/swf/StreamSoundBlockTag.h
@@ -49,24 +49,8 @@ namespace SWF {
 ///
 class StreamSoundBlockTag : public ControlTag
 {
-
-    /// Id of the stream this tag should play
-    boost::uint16_t m_handler_id;
-
-    /// Offset in the stream buffer to play
-    sound::sound_handler::StreamBlockId _blockId;
-
-    //int       latency;
-
 public:
 
-    /// Get the identifier of the sound stream this block belongs to
-    //
-    /// TODO: why is this an uint16_t if sound_handler::create_sound
-    ///       returns an int ? I vote for a sound_handler::SoundId typedef
-    ///
-    boost::uint16_t getStreamId() const { return m_handler_id; }
-
     /// Start the associated block of sound
     void executeActions(MovieClip* m, DisplayList& dlist) const;
 
@@ -78,19 +62,23 @@ private:
 
     /// Create a ControlTag playing the given sample when executed.
     //
-    /// @param streamId
-    /// Identifier of the stream to play.
-    ///
-    /// @param blockId
-    /// Identifier of the stream block to play.
+    /// @param streamId     identifier of the stream to play.
+    /// @param blockId      identifier of the stream block to play.
     ///
     /// This should only be constructed using the loader() function.
-    StreamSoundBlockTag(int streamId,
+    StreamSoundBlockTag(boost::uint16_t streamId,
                         sound::sound_handler::StreamBlockId blockId)
         :
-        m_handler_id(streamId),
+        _handler_id(streamId),
         _blockId(blockId)
     {}
+
+    /// Id of the stream this tag should play
+    const boost::uint16_t _handler_id;
+
+    /// Offset in the stream buffer to play
+    const sound::sound_handler::StreamBlockId _blockId;
+
 };
 
 

-----------------------------------------------------------------------

Summary of changes:
 libcore/Makefile.am                                |    2 +
 libcore/swf/DefaultTagLoaders.cpp                  |    5 +-
 libcore/swf/SoundStreamHeadTag.cpp                 |  170 ++++++++++++++++++++
 .../swf/{SetTabIndexTag.h => SoundStreamHeadTag.h} |   41 +++---
 libcore/swf/StreamSoundBlockTag.cpp                |   29 ++--
 libcore/swf/StreamSoundBlockTag.h                  |   34 ++---
 libcore/swf/tag_loaders.cpp                        |  132 ---------------
 libcore/swf/tag_loaders.h                          |    4 -
 libmedia/SoundInfo.h                               |    8 +-
 9 files changed, 224 insertions(+), 201 deletions(-)
 create mode 100644 libcore/swf/SoundStreamHeadTag.cpp
 copy libcore/swf/{SetTabIndexTag.h => SoundStreamHeadTag.h} (72%)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]