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

Implements DefaultDataSink dynamic queue #7

Merged
merged 1 commit into from
Jan 30, 2022

Conversation

jumperson
Copy link

@jumperson jumperson commented Jan 27, 2022

see https://github.com/natario1/Transcoder/pull/166

動作確認しないよう

10秒の動画で確認したところ34Bufferがキューに貯まりました。
10分の動画で確認したところ35Bufferがキューに貯まりました。

動画の長さ(≒サイズ)によって線形にキューが増える(=メモリ使用量が増える)ではなさそうなのでこの実装で問題ないと判断しています。

@jumperson jumperson requested review from kseito and rinon2238 January 27, 2022 12:32
@jumperson jumperson self-assigned this Jan 27, 2022
bufferInfo.set(offset, sample.mSize, sample.mTimeUs, sample.mFlags);
writeTrack(sample.mType, mQueueBuffer, bufferInfo);
offset += sample.mSize;
bufferInfo.set(0, sample.mSize, sample.mTimeUs, sample.mFlags);
Copy link

Choose a reason for hiding this comment

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

offsetが常に0が入るようになっていますが問題ないですか?(内部で使われていない?)

Copy link
Author

Choose a reason for hiding this comment

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

1つのBufferに1回しか書き込まないので常に0で問題なしです!

Copy link

Choose a reason for hiding this comment

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

そうか。QueuedSampleにBufferを持たせるように変えたからBufferの参照方法も変わりますね。
良さそう。

Copy link

@kseito kseito left a comment

Choose a reason for hiding this comment

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

LGTM!!

bufferInfo.set(offset, sample.mSize, sample.mTimeUs, sample.mFlags);
writeTrack(sample.mType, mQueueBuffer, bufferInfo);
offset += sample.mSize;
bufferInfo.set(0, sample.mSize, sample.mTimeUs, sample.mFlags);
Copy link

Choose a reason for hiding this comment

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

そうか。QueuedSampleにBufferを持たせるように変えたからBufferの参照方法も変わりますね。
良さそう。

Copy link

@rinon2238 rinon2238 left a comment

Choose a reason for hiding this comment

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

LGTM!!

@jumperson jumperson merged commit 3cb0b2e into main Jan 30, 2022
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.

3 participants