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

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: rebase and fix a type mismatch which the android build caught 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
« no previous file with comments | « services/media/framework_mojo/mojo_consumer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 744feedf1ae5c8481aabf3d384d13f5ac850bf2f..a8763958ebab1c1f1f4f561b22ccdbba3ad6a608 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_pts_since_flush_ = Packet::kUnknownPts;
- end_of_stream_= false;
+ end_of_stream_ = false;
}
void MojoProducer::SetStatusCallback(
@@ -129,12 +129,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();
});
@@ -198,5 +197,5 @@ MediaPacketPtr MojoProducer::CreateMediaPacket(
return media_packet.Pass();
}
-} // namespace media
-} // namespace mojo
+} // namespace media
+} // namespace mojo
« no previous file with comments | « 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