Index: media/mojo/services/mojo_demuxer_stream_adapter.cc |
diff --git a/media/mojo/services/mojo_demuxer_stream_adapter.cc b/media/mojo/services/mojo_demuxer_stream_adapter.cc |
index 9d540c60a3e5590c0fcd4afd75edf04f024e45dd..82c9f781a593e5fa0bb370ee8a691a88d9512498 100644 |
--- a/media/mojo/services/mojo_demuxer_stream_adapter.cc |
+++ b/media/mojo/services/mojo_demuxer_stream_adapter.cc |
@@ -70,6 +70,29 @@ VideoRotation MojoDemuxerStreamAdapter::video_rotation() { |
return VIDEO_ROTATION_0; |
} |
+#if DCHECK_IS_ON() |
+void DcheckRemoteEnabledValue(bool local_enabled_value, |
+ bool remote_enabled_value) { |
+ DCHECK_EQ(local_enabled_value, remote_enabled_value); |
+} |
+#endif |
+ |
+bool MojoDemuxerStreamAdapter::enabled() const { |
+#if DCHECK_IS_ON() |
+ // TODO(servolk): Is it worth waiting for the IPC call roundtrip, when we can |
+ // just maintain the current |enabled_| status in here. Would this cause any |
+ // problems? |
+ demuxer_stream_->enabled(base::Bind(&DcheckRemoteEnabledValue, enabled_)); |
+#endif |
+ return enabled_; |
+} |
+ |
+void MojoDemuxerStreamAdapter::set_enabled(bool enabled, |
+ base::TimeDelta timestamp) { |
+ demuxer_stream_->set_enabled(enabled, timestamp.InMicroseconds()); |
+ enabled_ = enabled; |
+} |
+ |
// TODO(xhwang): Pass liveness here. |
void MojoDemuxerStreamAdapter::OnStreamReady( |
mojom::DemuxerStream::Type type, |