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: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1646-g953e044
Date: Tue, 09 Jul 2013 13:05:21 +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  953e044ebe92c80406f7fc655dd45dceef6f1ae4 (commit)
      from  4542f369ae640c1abf06281067001802a5ea3ab0 (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=953e044ebe92c80406f7fc655dd45dceef6f1ae4


commit 953e044ebe92c80406f7fc655dd45dceef6f1ae4
Author: Bastiaan Jacques <address@hidden>
Date:   Tue Jul 9 15:00:50 2013 +0200

    Savannah #33760: Don't insist that the sound is completely parsed before 
starting to consume audio.
    
    This is necessary because parsing is limited by the maximum buffer
    size. Instead, consider the sound loaded when either parsing has
    finished or the buffer is full.

diff --git a/libcore/asobj/Sound_as.cpp b/libcore/asobj/Sound_as.cpp
index 0ffe7d0..d749402 100644
--- a/libcore/asobj/Sound_as.cpp
+++ b/libcore/asobj/Sound_as.cpp
@@ -372,7 +372,7 @@ Sound_as::probeAudio()
 #ifdef GNASH_DEBUG_SOUND_AS
         log_debug("Probing audio for load");
 #endif
-        if (_mediaParser->parsingCompleted()) {
+        if (_mediaParser->parsingCompleted() || _mediaParser->bufferFull()) {
 
             _soundLoaded = true;
 
diff --git a/libmedia/FLVParser.cpp b/libmedia/FLVParser.cpp
index 8210e34..8ffe0c1 100644
--- a/libmedia/FLVParser.cpp
+++ b/libmedia/FLVParser.cpp
@@ -124,7 +124,7 @@ FLVParser::seek(boost::uint32_t& time)
 bool
 FLVParser::parseNextChunk()
 {
-       bool indexOnly = bufferFull(); // won't lock, but our caller locked...
+       bool indexOnly = bufferFullInternal(); // won't lock, but our caller 
locked...
        return parseNextTag(indexOnly);
 }
 
diff --git a/libmedia/MediaParser.cpp b/libmedia/MediaParser.cpp
index 77eb5d6..fbba4f1 100644
--- a/libmedia/MediaParser.cpp
+++ b/libmedia/MediaParser.cpp
@@ -407,7 +407,7 @@ MediaParser::waitIfNeeded(boost::mutex::scoped_lock& lock)
        //  We hold a lock on the queue here...
        bool pc=parsingCompleted();
        bool ic=indexingCompleted();
-       bool bf=bufferFull();
+       bool bf=bufferFullInternal();
        if (( pc || (bf && ic)) && !parserThreadKillRequested()) // TODO: or 
seekRequested ?
        {
 #ifdef GNASH_DEBUG_MEDIAPARSER
@@ -421,13 +421,13 @@ MediaParser::waitIfNeeded(boost::mutex::scoped_lock& lock)
 }
 
 bool
-MediaParser::bufferFull() const
+MediaParser::bufferFullInternal() const
 {
        // Callers are expected to hold a lock on _qMutex
        int bl = getBufferLengthNoLock();
        int bt = getBufferTime();
 #ifdef GNASH_DEBUG_MEDIAPARSER
-       log_debug("MediaParser::bufferFull: %d/%d", bl, bt);
+       log_debug("MediaParser::bufferFullInternal: %d/%d", bl, bt);
 #endif // GNASH_DEBUG_MEDIAPARSER
        return bl > bt;
 }
diff --git a/libmedia/MediaParser.h b/libmedia/MediaParser.h
index 535dd78..473b5ae 100644
--- a/libmedia/MediaParser.h
+++ b/libmedia/MediaParser.h
@@ -567,6 +567,12 @@ public:
        ///
        bool parsingCompleted() const { return _parsingComplete; }
 
+       /// @ret true if the buffer (configured by setBufferTime) is full.
+       bool bufferFull() {
+           boost::mutex::scoped_lock lock(_qMutex);
+           return bufferFullInternal();
+       }
+
        /// Return true of indexing is completed
        //
        /// If this function returns false, parseNextChunk will
@@ -714,7 +720,7 @@ protected:
        /// is passed a locked lock on _qMutex, and by parseNextChunk
        /// to determine whether to index-only or also push on queue.
        ///
-       bool bufferFull() const;
+       bool bufferFullInternal() const;
 
        /// On seek, this flag will be set, while holding a lock on 
_streamMutex.
        /// The parser, when obtained a lock on _streamMutex, will check this
diff --git a/testsuite/actionscript.all/Sound.as 
b/testsuite/actionscript.all/Sound.as
index f50e645..bd9f412 100644
--- a/testsuite/actionscript.all/Sound.as
+++ b/testsuite/actionscript.all/Sound.as
@@ -28,7 +28,7 @@ rcsid="Sound.as";
 endOfTest = function()
 {
 #if OUTPUT_VERSION > 5
-    xcheck_totals(112);
+    check_totals(112);
 #else
     check_totals(94);
 #endif

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

Summary of changes:
 libcore/asobj/Sound_as.cpp          |    2 +-
 libmedia/FLVParser.cpp              |    2 +-
 libmedia/MediaParser.cpp            |    6 +++---
 libmedia/MediaParser.h              |    8 +++++++-
 testsuite/actionscript.all/Sound.as |    2 +-
 5 files changed, 13 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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