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

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

Issue 2006093004: Motown: Convert MediaSink to expose MediaTimelineControlSite (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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.h
diff --git a/services/media/framework_mojo/mojo_producer.h b/services/media/framework_mojo/mojo_producer.h
index 16865d1d78e5a480f2424b39e5fd244cac56e51d..fb8b12a0e9d07404a4851ec0c0780843fa546761 100644
--- a/services/media/framework_mojo/mojo_producer.h
+++ b/services/media/framework_mojo/mojo_producer.h
@@ -19,7 +19,6 @@ namespace media {
// Implements MediaProducer to forward a stream across mojo.
class MojoProducer : public MediaProducer, public ActiveSink {
public:
- using StatusCallback = std::function<void(MediaState)>;
using PrimeConnectionCallback = mojo::Callback<void()>;
using FlushConnectionCallback = mojo::Callback<void()>;
@@ -39,13 +38,6 @@ class MojoProducer : public MediaProducer, public ActiveSink {
// Unprimes and tells the connected consumer to flush.
void FlushConnection(const FlushConnectionCallback& callback);
- // Sets a callback for reporting status updates.
- void SetStatusCallback(const StatusCallback& callback);
-
- // Gets the first presentation time seen on any packet after the most recent
- // flush or, if there has never been a flush, the first packet supplied.
- int64_t GetFirstPtsSinceFlush();
-
// ActiveSink implementation.
PayloadAllocator* allocator() override;
@@ -66,9 +58,6 @@ class MojoProducer : public MediaProducer, public ActiveSink {
// TODO(dalesat): Don't use a raw pointer, if possible.
void SendPacket(Packet* packet_raw_ptr, MediaPacketPtr media_packet);
- // Sets the current state and calls the registered callback, if there is one.
- void SetState(MediaState state);
-
// Creates a MediaPacket from a Packet.
MediaPacketPtr CreateMediaPacket(const PacketPtr& packet);
@@ -77,15 +66,11 @@ class MojoProducer : public MediaProducer, public ActiveSink {
BindingSet<MediaProducer> bindings_;
MediaConsumerPtr consumer_;
- StatusCallback status_callback_;
mutable base::Lock lock_;
// THE FIELDS BELOW SHOULD ONLY BE ACCESSED WITH lock_ TAKEN.
- MediaState state_ = MediaState::UNPREPARED;
- bool end_of_stream_ = false;
DemandCallback demand_callback_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
- int64_t first_pts_since_flush_ = Packet::kUnknownPts;
// TODO(dalesat): Base this logic on presentation time or duration.
uint32_t max_pushes_outstanding_ = 0;
uint32_t current_pushes_outstanding_ = 0;

Powered by Google App Engine
This is Rietveld 408576698