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

Side by Side Diff: services/media/framework_mojo/mojo_pull_mode_producer.h

Issue 1814553002: Motown: Improvements to packet definition (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Added a comment. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_PULL_MODE_PRODUCER_H_ 5 #ifndef SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_PULL_MODE_PRODUCER_H_
6 #define SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_PULL_MODE_PRODUCER_H_ 6 #define SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_PULL_MODE_PRODUCER_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 DemandCallback demand_callback_; 72 DemandCallback demand_callback_;
73 73
74 // Allocates from the shared buffer. 74 // Allocates from the shared buffer.
75 MojoAllocator mojo_allocator_; 75 MojoAllocator mojo_allocator_;
76 76
77 mutable base::Lock lock_; 77 mutable base::Lock lock_;
78 // THE FIELDS BELOW SHOULD ONLY BE ACCESSED WITH lock_ TAKEN. 78 // THE FIELDS BELOW SHOULD ONLY BE ACCESSED WITH lock_ TAKEN.
79 MediaState state_; 79 MediaState state_;
80 Demand demand_; 80 Demand demand_;
81 int64_t presentation_time_; 81 int64_t pts_;
82 82
83 // pending_pulls_ contains the callbacks for the pull requests that have yet 83 // pending_pulls_ contains the callbacks for the pull requests that have yet
84 // to be satisfied. unreleased_packets_ contains the packets that have been 84 // to be satisfied. unreleased_packets_ contains the packets that have been
85 // delivered via pull but have not yet been released. cached_packet_ is a 85 // delivered via pull but have not yet been released. cached_packet_ is a
86 // packet waiting for a pull (we keep one ready so we can be preparing a 86 // packet waiting for a pull (we keep one ready so we can be preparing a
87 // packet between pulls). If cached_packet_ isn't nullptr, pending_pulls_ 87 // packet between pulls). If cached_packet_ isn't nullptr, pending_pulls_
88 // should be empty. We signal positive demand when cached_packet_ is nullptr 88 // should be empty. We signal positive demand when cached_packet_ is nullptr
89 // and negative demand when it isn't. 89 // and negative demand when it isn't.
90 std::deque<PullPacketCallback> pending_pulls_; 90 std::deque<PullPacketCallback> pending_pulls_;
91 std::deque<PacketPtr> unreleased_packets_; 91 std::deque<PacketPtr> unreleased_packets_;
92 PacketPtr cached_packet_; 92 PacketPtr cached_packet_;
93 // THE FIELDS ABOVE SHOULD ONLY BE ACCESSED WITH lock_ TAKEN. 93 // THE FIELDS ABOVE SHOULD ONLY BE ACCESSED WITH lock_ TAKEN.
94 }; 94 };
95 95
96 } // namespace media 96 } // namespace media
97 } // namespace mojo 97 } // namespace mojo
98 98
99 #endif // SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_PULL_MODE_PRODUCER_H_ 99 #endif // SERVICES_MEDIA_FRAMEWORK_MOJO_MOJO_PULL_MODE_PRODUCER_H_
OLDNEW
« no previous file with comments | « services/media/framework_mojo/mojo_producer.cc ('k') | services/media/framework_mojo/mojo_pull_mode_producer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698