Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Unified Diff: services/media/framework_mojo/mojo_producer.cc

Issue 1823833003: Take advantage of MojoGetBufferInformation (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/media/framework_mojo/mojo_producer.cc
diff --git a/services/media/framework_mojo/mojo_producer.cc b/services/media/framework_mojo/mojo_producer.cc
index 4554ae510517dad25fd81e1b0f2b2d7015d1a383..8b7c63b4d300d6b4da6f05eb042b1ed72a158491 100644
--- a/services/media/framework_mojo/mojo_producer.cc
+++ b/services/media/framework_mojo/mojo_producer.cc
@@ -29,7 +29,7 @@ void MojoProducer::PrimeConnection(const FlushConnectionCallback& callback) {
{
base::AutoLock lock(lock_);
- max_pushes_outstanding_ = 10; // TODO(dalesat): Made up!
+ max_pushes_outstanding_ = 10; // TODO(dalesat): Made up!
demand = current_pushes_outstanding_ < max_pushes_outstanding_ ?
Demand::kPositive :
Demand::kNegative;
@@ -57,7 +57,7 @@ void MojoProducer::FlushConnection(const FlushConnectionCallback& callback) {
DCHECK(consumer_.is_bound());
consumer_->Flush(callback);
first_presentation_time_since_flush_ = Packet::kUnknownPresentationTime;
- end_of_stream_= false;
+ end_of_stream_ = false;
}
void MojoProducer::SetStatusCallback(
@@ -130,12 +130,11 @@ void MojoProducer::Connect(
consumer_ = MediaConsumerPtr::Create(std::move(consumer));
if (!mojo_allocator_.initialized()) {
- mojo_allocator_.InitNew(256 * 1024); // TODO(dalesat): Made up!
+ mojo_allocator_.InitNew(256 * 1024); // TODO(dalesat): Made up!
}
consumer_->SetBuffer(
mojo_allocator_.GetDuplicateHandle(),
- mojo_allocator_.size(),
[callback]() {
callback.Run();
});
@@ -200,5 +199,5 @@ MediaPacketPtr MojoProducer::CreateMediaPacket(
return media_packet.Pass();
}
-} // namespace media
-} // namespace mojo
+} // namespace media
+} // namespace mojo
« services/media/common/media_pipe_base.cc ('K') | « services/media/framework_mojo/mojo_consumer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698