Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement cancel support #12

Merged
merged 4 commits into from
Dec 7, 2015
Merged

Conversation

MaiKambayashi
Copy link
Contributor

add method to cancel

@ypresto ypresto changed the title キャンセルの実装 Implement cancel support Dec 4, 2015
@@ -153,7 +162,7 @@ public void transcodeVideo(final FileDescriptor inFileDescriptor, final String o
Looper looper = Looper.myLooper();
if (looper == null) looper = Looper.getMainLooper();
final Handler handler = new Handler(looper);
mExecutor.execute(new Runnable() {
mFuture = mExecutor.submit(new Runnable() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this you cannot cancel other than the latest transcoding session (if you keep Future in field).
Future should be returned to caller to give control around cancelation and timeout.

@ypresto
Copy link
Owner

ypresto commented Dec 7, 2015

nice feature!

LGTM

🎉 🎉

ypresto added a commit that referenced this pull request Dec 7, 2015
@ypresto ypresto merged commit 38a9fe5 into ypresto:master Dec 7, 2015
@ypresto ypresto mentioned this pull request Dec 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants