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

Unified Diff: media/cast/rtcp/receiver_rtcp_event_subscriber.h

Issue 270493003: Cast: Deduplicate event types in cast library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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: media/cast/rtcp/receiver_rtcp_event_subscriber.h
diff --git a/media/cast/rtcp/receiver_rtcp_event_subscriber.h b/media/cast/rtcp/receiver_rtcp_event_subscriber.h
index f2c7e5a90860deeda57d5e9db2a1839979f04cda..84af7cbaf3f204795d800ea2acb0aecb743ff8fb 100644
--- a/media/cast/rtcp/receiver_rtcp_event_subscriber.h
+++ b/media/cast/rtcp/receiver_rtcp_event_subscriber.h
@@ -12,10 +12,6 @@
#include "media/cast/logging/raw_event_subscriber.h"
#include "media/cast/rtcp/rtcp_defines.h"
-namespace base {
-class SingleThreadTaskRunner;
-}
-
namespace media {
namespace cast {
@@ -32,20 +28,14 @@ class ReceiverRtcpEventSubscriber : public RawEventSubscriber {
public:
typedef std::multimap<RtpTimestamp, RtcpEvent> RtcpEventMultiMap;
- // Identifies whether the subscriber will process audio or video related
- // frame events.
- enum Type {
- kAudioEventSubscriber, // Only processes audio events
- kVideoEventSubscriber // Only processes video events
- };
-
// |max_size_to_retain|: The object will keep up to |max_size_to_retain|
// events
// in the map. Once threshold has been reached, an event with the smallest
// RTP timestamp will be removed.
// |type|: Determines whether the subscriber will process only audio or video
// events.
- ReceiverRtcpEventSubscriber(const size_t max_size_to_retain, Type type);
+ ReceiverRtcpEventSubscriber(const size_t max_size_to_retain,
+ EventMediaType type);
virtual ~ReceiverRtcpEventSubscriber();
@@ -63,11 +53,13 @@ class ReceiverRtcpEventSubscriber : public RawEventSubscriber {
// |max_size_to_retain_|.
void TruncateMapIfNeeded();
- // Returns |true| if events of |event_type| should be processed.
- bool ShouldProcessEvent(CastLoggingEvent event_type);
+ // Returns |true| if events of |event_type| and |media_type|
+ // should be processed.
+ bool ShouldProcessEvent(CastLoggingEvent event_type,
+ EventMediaType media_type);
const size_t max_size_to_retain_;
- Type type_;
+ EventMediaType type_;
// The key should really be something more than just a RTP timestamp in order
// to differentiate between video and audio frames, but since the
« no previous file with comments | « media/cast/logging/stats_event_subscriber_unittest.cc ('k') | media/cast/rtcp/receiver_rtcp_event_subscriber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698