Skip to content
Browse files

cleanup

  • Loading branch information...
1 parent 61eba25 commit 64617c0991c0c8a9df7f3887cc1e28781a5278e2 @benvanik committed Nov 27, 2011
Showing with 9 additions and 11 deletions.
  1. +0 −2 src/io/streamreader.cpp
  2. +9 −9 src/io/streamreader.h
View
2 src/io/streamreader.cpp
@@ -28,15 +28,13 @@ StreamReader::StreamReader(Handle<Object> source, size_t maxBufferedBytes) :
// TODO: support seeking?
this->canSeek = false;
-
// Pull out methods we will use frequently
this->sourcePause = Persistent<Function>::New(
this->source->Get(String::New("pause")).As<Function>());
this->sourceResume = Persistent<Function>::New(
this->source->Get(String::New("resume")).As<Function>());
// Add events to stream
- // TODO: keep self alive somehow?
NODE_ON_EVENT(source, "data", onData, OnData, this);
NODE_ON_EVENT(source, "end", onEnd, OnEnd, this);
NODE_ON_EVENT(source, "close", onClose, OnClose, this);
View
18 src/io/streamreader.h
@@ -14,7 +14,7 @@ namespace transcoding {
namespace io {
#define STREAMREADER_BUFFER_SIZE (64 * 1024)
-#define STREAMREADER_MAX_SIZE (64 * 1024 * 1024)
+#define STREAMREADER_MAX_SIZE (1 * 1024 * 1024)
class ReadBuffer {
public:
@@ -62,15 +62,15 @@ class StreamReader : public IOReader {
Persistent<Function> onClose;
Persistent<Function> onError;
- uv_async_t* asyncReq;
+ uv_async_t* asyncReq;
- pthread_mutex_t lock;
- pthread_cond_t cond;
- bool paused;
- int err;
- bool eof;
- int64_t maxBufferedBytes;
- int64_t totalBufferredBytes;
+ pthread_mutex_t lock;
+ pthread_cond_t cond;
+ bool paused;
+ int err;
+ bool eof;
+ int64_t maxBufferedBytes;
+ int64_t totalBufferredBytes;
std::vector<ReadBuffer*> buffers;
};

0 comments on commit 64617c0

Please sign in to comment.
Something went wrong with that request. Please try again.