[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, release_0_8_9, updated. release_0_8_9
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, release_0_8_9, updated. release_0_8_9_start-208-g97970af |
Date: |
Wed, 02 Mar 2011 11:18:55 +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, release_0_8_9 has been updated
via 97970aff80a0a92a6d6ceccb973e3b1080d48a7a (commit)
from ef61e4981c22a5704a498147cf687a152e63107a (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=97970aff80a0a92a6d6ceccb973e3b1080d48a7a
commit 97970aff80a0a92a6d6ceccb973e3b1080d48a7a
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 bdee34d..cb1ff69 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 9fb2f7f..05d5e1b 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, release_0_8_9, updated. release_0_8_9_start-208-g97970af,
Sandro Santilli <=