[Pkg-javascript-commits] [node-groove] 04/10: Drop 001-fix-emitting-buffer-event-too-often, applied upstream

Felipe Sateler fsateler at moszumanska.debian.org
Tue Dec 15 00:15:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

fsateler pushed a commit to branch master
in repository node-groove.

commit 80d0fcfc281fe490ab076239e92a9a5ede5cd5f2
Author: Felipe Sateler <fsateler at debian.org>
Date:   Mon Dec 14 20:46:25 2015 -0300

    Drop 001-fix-emitting-buffer-event-too-often, applied upstream
---
 .../0001-fix-emitting-buffer-event-too-often.patch | 62 ----------------------
 debian/patches/series                              |  1 -
 2 files changed, 63 deletions(-)

diff --git a/debian/patches/0001-fix-emitting-buffer-event-too-often.patch b/debian/patches/0001-fix-emitting-buffer-event-too-often.patch
deleted file mode 100644
index bbc5cb6..0000000
--- a/debian/patches/0001-fix-emitting-buffer-event-too-often.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From: Andrew Kelley <superjoe30 at gmail.com>
-Date: Thu, 14 May 2015 09:28:25 -0700
-Subject: fix emitting 'buffer' event too often
-
-no longer burns the CPU
----
- src/gn_encoder.cc | 15 +++++++++++++--
- src/gn_encoder.h  |  1 +
- 2 files changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/src/gn_encoder.cc b/src/gn_encoder.cc
-index 0791292..474141f 100644
---- a/src/gn_encoder.cc
-+++ b/src/gn_encoder.cc
-@@ -93,7 +93,10 @@ static void EventThreadEntry(void *arg) {
-     GNEncoder::EventContext *context = reinterpret_cast<GNEncoder::EventContext *>(arg);
-     while (groove_encoder_buffer_peek(context->encoder, 1) > 0) {
-         uv_mutex_lock(&context->mutex);
--        uv_async_send(&context->event_async);
-+        if (context->emit_buffer_ok) {
-+            context->emit_buffer_ok = false;
-+            uv_async_send(&context->event_async);
-+        }
-         uv_cond_wait(&context->cond, &context->mutex);
-         uv_mutex_unlock(&context->mutex);
-     }
-@@ -180,6 +183,7 @@ Handle<Value> GNEncoder::Create(const Arguments& args) {
-     GNEncoder *gn_encoder = node::ObjectWrap::Unwrap<GNEncoder>(instance);
-     EventContext *context = new EventContext;
-     gn_encoder->event_context = context;
-+    context->emit_buffer_ok = true;
-     context->event_cb = Persistent<Function>::New(Local<Function>::Cast(args[0]));
-     context->encoder = encoder;
- 
-@@ -372,7 +376,14 @@ Handle<Value> GNEncoder::GetBuffer(const Arguments& args) {
-     GrooveEncoder *encoder = gn_encoder->encoder;
- 
-     GrooveBuffer *buffer;
--    switch (groove_encoder_buffer_get(encoder, &buffer, 0)) {
-+    int buf_result = groove_encoder_buffer_get(encoder, &buffer, 0);
-+
-+    uv_mutex_lock(&gn_encoder->event_context->mutex);
-+    gn_encoder->event_context->emit_buffer_ok = true;
-+    uv_cond_signal(&gn_encoder->event_context->cond);
-+    uv_mutex_unlock(&gn_encoder->event_context->mutex);
-+
-+    switch (buf_result) {
-         case GROOVE_BUFFER_YES: {
-             Local<Object> object = Object::New();
- 
-diff --git a/src/gn_encoder.h b/src/gn_encoder.h
-index 063bf60..958815e 100644
---- a/src/gn_encoder.h
-+++ b/src/gn_encoder.h
-@@ -19,6 +19,7 @@ class GNEncoder : public node::ObjectWrap {
-             uv_mutex_t mutex;
-             GrooveEncoder *encoder;
-             v8::Persistent<v8::Function> event_cb;
-+            bool emit_buffer_ok;
-         };
- 
-         GrooveEncoder *encoder;
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 3040e56..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-0001-fix-emitting-buffer-event-too-often.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-groove.git



More information about the Pkg-javascript-commits mailing list