Skip to content

Commit

Permalink
removing printfs, taking container from profile
Browse files Browse the repository at this point in the history
  • Loading branch information
benvanik committed Nov 23, 2011
1 parent c652ccf commit b7c2a35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
14 changes: 0 additions & 14 deletions src/task.cpp
Expand Up @@ -80,8 +80,6 @@ Task::~Task() {
this->target.Dispose();
this->profile.Dispose();
this->options.Dispose();

printf("task dtor\n");
}

Handle<Value> Task::GetSource(Local<String> property,
Expand Down Expand Up @@ -166,8 +164,6 @@ Handle<Value> Task::Start(const Arguments& args) {
}
task->EmitBegin(context->ictx, context->octx);

printf("pre launch\n");

// Prepare thread request
uv_work_t* req = new uv_work_t();
req->data = task;
Expand All @@ -179,8 +175,6 @@ Handle<Value> Task::Start(const Arguments& args) {
int status = uv_queue_work(uv_default_loop(), req, ThreadWorker, NULL);
assert(status == 0);

printf("post launch\n");

return scope.Close(Undefined());
}

Expand Down Expand Up @@ -257,8 +251,6 @@ void Task::EmitCompleteAsync(uv_async_t* handle, int status) {
TaskContext* context = task->context;
assert(context);

printf("complete\n");

// Always fire one last progress event
if (!context->err) {
task->progress.timestamp = task->progress.duration;
Expand Down Expand Up @@ -306,8 +298,6 @@ void Task::ThreadWorker(uv_work_t* request) {
memset(&progress, 0, sizeof(progress));
progress.duration = context->ictx->duration / (double)AV_TIME_BASE;

printf("PRE\n");

TaskAsyncRequest* asyncReq;
int ret = 0;
bool aborting = false;
Expand Down Expand Up @@ -337,12 +327,10 @@ void Task::ThreadWorker(uv_work_t* request) {
}

// Perform some work
//printf("PUMP->\n");
double oldPercent = progress.timestamp / progress.duration;
bool finished = context->Pump(&ret, &progress);
percentDelta += (progress.timestamp / progress.duration) - oldPercent;
context->err = ret;
//printf("->PUMP %g %g %g\n", progress.timestamp, progress.duration, percentDelta);

// End, if needed
if (finished && !ret) {
Expand All @@ -360,6 +348,4 @@ void Task::ThreadWorker(uv_work_t* request) {
asyncReq->progress = progress;
uv_async_init(uv_default_loop(), &asyncReq->req, EmitCompleteAsync);
uv_async_send(&asyncReq->req);

printf("POST %d\n", context->err);
}
5 changes: 2 additions & 3 deletions src/taskcontext.cpp
Expand Up @@ -24,8 +24,6 @@ TaskContext::~TaskContext() {
delete this->input;
delete this->output;
delete this->profile;

printf("taskcontext dtor\n");
}

void TaskContext::Abort() {
Expand Down Expand Up @@ -59,7 +57,8 @@ int TaskContext::Prepare() {

// Setup output container
if (!ret) {
AVOutputFormat* ofmt = av_guess_format("mov", NULL, NULL);
AVOutputFormat* ofmt = av_guess_format(
profile->container.c_str(), NULL, NULL);
if (ofmt) {
octx->oformat = ofmt;
} else {
Expand Down

0 comments on commit b7c2a35

Please sign in to comment.