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_start-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-169-g059f309
Date: Wed, 02 Mar 2011 11:26:38 +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  059f30926c987f0ddfb69377fd53a23aee638c13 (commit)
      from  2931bbd36503ff3f56364274f35bed63bb910b9b (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=059f30926c987f0ddfb69377fd53a23aee638c13


commit 059f30926c987f0ddfb69377fd53a23aee638c13
Author: Sandro Santilli <address@hidden>
Date:   Wed Mar 2 12:17:08 2011 +0100

    Expose a MediaParser::isBufferEmpty method, hopefully useful from NetStream 
to simplify "stop" conditions detection.

diff --git a/libmedia/MediaParser.cpp b/libmedia/MediaParser.cpp
index 0068963..4748018 100644
--- a/libmedia/MediaParser.cpp
+++ b/libmedia/MediaParser.cpp
@@ -64,6 +64,17 @@ MediaParser::getBufferLength() const
        return getBufferLengthNoLock();
 }
 
+/* public */
+bool
+MediaParser::isBufferEmpty() const
+{
+#ifdef LOAD_MEDIA_IN_A_SEPARATE_THREAD
+       boost::mutex::scoped_lock lock(_qMutex);
+#endif
+       return _videoFrames.empty() && _audioFrames.empty();
+}
+
+
 boost::uint64_t
 MediaParser::getBufferLengthNoLock() const
 {
diff --git a/libmedia/MediaParser.h b/libmedia/MediaParser.h
index a4cb2c1..bed1c6e 100644
--- a/libmedia/MediaParser.h
+++ b/libmedia/MediaParser.h
@@ -471,6 +471,11 @@ public:
        ///
        DSOEXPORT boost::uint64_t getBufferLength() const;
 
+       /// Return true if both audio and video buffers are empty
+       //
+       /// NOTE: locks _qMutex
+       DSOEXPORT bool isBufferEmpty() const;
+
        /// Return the time we want the parser thread to maintain in the buffer
        DSOEXPORT boost::uint64_t getBufferTime() const
        {

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

Summary of changes:
 libmedia/MediaParser.cpp |   11 +++++++++++
 libmedia/MediaParser.h   |    5 +++++
 2 files changed, 16 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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