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

Unified Diff: services/media/factory_service/media_sink_impl.cc

Issue 1923763002: Motown: Ffmpeg video decoder (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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/factory_service/media_sink_impl.cc
diff --git a/services/media/factory_service/media_sink_impl.cc b/services/media/factory_service/media_sink_impl.cc
index e840767cf9a0716983ded111839c70cd310aa905..0e427692694900c1e94134bb16a27fd1d2c7cd94 100644
--- a/services/media/factory_service/media_sink_impl.cc
+++ b/services/media/factory_service/media_sink_impl.cc
@@ -74,6 +74,15 @@ MediaSinkImpl::MediaSinkImpl(const String& destination_url,
}
});
+ // TODO(dalesat): Temporary, remove.
+ if (destination_url == "nowhere") {
+ // Throwing away the content.
+ graph_.ConnectParts(consumer_ref, producer_ref);
+ graph_.Prepare();
+ ready_.Occur();
+ return;
+ }
+
if (destination_url != "mojo:audio_server") {
LOG(ERROR) << "mojo:audio_server is the only supported destination";
if (binding_.is_bound()) {
@@ -161,7 +170,11 @@ void MediaSinkImpl::MaybeSetRate() {
return;
}
- DCHECK(rate_control_);
+ if (!rate_control_) {
+ rate_ = target_rate_;
+ status_publisher_.SendUpdates();
+ return;
+ }
// Desired rate in frames per second.
LinearTransform::Ratio rate_frames_per_second(

Powered by Google App Engine
This is Rietveld 408576698