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

Unified Diff: media/cast/logging/encoding_event_subscriber.h

Issue 241833002: Cast: Limit number of events/packets in EncodingEventSubscriber protos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: media/cast/logging/encoding_event_subscriber.h
diff --git a/media/cast/logging/encoding_event_subscriber.h b/media/cast/logging/encoding_event_subscriber.h
index ba9969bd2c986e245a20a2e55829465db6e250f5..e4d19c76af3d5afc64f31dc66b0f91d5b6a6ec17 100644
--- a/media/cast/logging/encoding_event_subscriber.h
+++ b/media/cast/logging/encoding_event_subscriber.h
@@ -23,6 +23,15 @@ typedef std::map<RtpTimestamp,
linked_ptr<media::cast::proto::AggregatedPacketEvent> >
PacketEventMap;
+// Number of packets per frame recorded by the subscriber.
+// Once the max number of packets has been reached, incoming events will be
+// discarded.
+const int kMaxPacketsPerFrame = 64;
Alpha Left Google 2014/04/17 22:59:00 This number seems small. Why is this 64? Instead o
imcheng 2014/04/18 00:05:31 How often will we have more than 64 packets per fr
Alpha Left Google 2014/04/21 18:14:04 Sometimes this can happen. A scene change frame ca
imcheng 2014/04/22 01:17:39 ACK. On 2014/04/21 18:14:04, Alpha wrote:
+// Number of events per proto recorded by the subscriber.
+// Once the max number of events has been reached, incoming events will be
+// discarded.
+const int kMaxEventsPerProto = 16;
Alpha Left Google 2014/04/17 22:59:00 Why is this 16? It seems small..
imcheng 2014/04/18 00:05:31 How about 32? Normally a proto will rarely have mo
Alpha Left Google 2014/04/21 18:14:04 I don't see much value in this limit. This limits
imcheng 2014/04/22 01:17:39 This limits the number of events, this helps keep
+
// A RawEventSubscriber implementation that subscribes to events,
// encodes them in protocol buffer format, and aggregates them into a more
// compact structure.
« no previous file with comments | « no previous file | media/cast/logging/encoding_event_subscriber.cc » ('j') | media/cast/logging/encoding_event_subscriber.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698