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

Side by Side Diff: media/cast/logging/logging_impl.cc

Issue 228603006: Cast: Log whether the video frame is a key frame in kVideoFrameEncoded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win x64 compile 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 unified diff | Download patch
« no previous file with comments | « media/cast/logging/logging_impl.h ('k') | media/cast/logging/logging_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "base/big_endian.h" 5 #include "base/big_endian.h"
6 #include "base/debug/trace_event.h" 6 #include "base/debug/trace_event.h"
7 #include "media/cast/logging/logging_impl.h" 7 #include "media/cast/logging/logging_impl.h"
8 8
9 namespace media { 9 namespace media {
10 namespace cast { 10 namespace cast {
11 11
12 // TODO(imcheng): Collapse LoggingRaw onto LoggingImpl. 12 // TODO(imcheng): Collapse LoggingRaw onto LoggingImpl.
13 LoggingImpl::LoggingImpl() { 13 LoggingImpl::LoggingImpl() {
14 // LoggingImpl can be constructed on any thread, but its methods should all be 14 // LoggingImpl can be constructed on any thread, but its methods should all be
15 // called on the same thread. 15 // called on the same thread.
16 thread_checker_.DetachFromThread(); 16 thread_checker_.DetachFromThread();
17 } 17 }
18 18
19 LoggingImpl::~LoggingImpl() {} 19 LoggingImpl::~LoggingImpl() {}
20 20
21 void LoggingImpl::InsertFrameEvent(const base::TimeTicks& time_of_event, 21 void LoggingImpl::InsertFrameEvent(const base::TimeTicks& time_of_event,
22 CastLoggingEvent event, uint32 rtp_timestamp, 22 CastLoggingEvent event, uint32 rtp_timestamp,
23 uint32 frame_id) { 23 uint32 frame_id) {
24 DCHECK(thread_checker_.CalledOnValidThread()); 24 DCHECK(thread_checker_.CalledOnValidThread());
25 raw_.InsertFrameEvent(time_of_event, event, rtp_timestamp, frame_id); 25 raw_.InsertFrameEvent(time_of_event, event, rtp_timestamp, frame_id);
26 } 26 }
27 27
28 void LoggingImpl::InsertFrameEventWithSize(const base::TimeTicks& time_of_event, 28 void LoggingImpl::InsertEncodedFrameEvent(const base::TimeTicks& time_of_event,
29 CastLoggingEvent event, 29 CastLoggingEvent event,
30 uint32 rtp_timestamp, 30 uint32 rtp_timestamp,
31 uint32 frame_id, int frame_size) { 31 uint32 frame_id, int frame_size,
32 bool key_frame) {
32 DCHECK(thread_checker_.CalledOnValidThread()); 33 DCHECK(thread_checker_.CalledOnValidThread());
33 raw_.InsertFrameEventWithSize(time_of_event, event, rtp_timestamp, frame_id, 34 raw_.InsertEncodedFrameEvent(time_of_event, event, rtp_timestamp, frame_id,
34 frame_size); 35 frame_size, key_frame);
35 } 36 }
36 37
37 void LoggingImpl::InsertFrameEventWithDelay( 38 void LoggingImpl::InsertFrameEventWithDelay(
38 const base::TimeTicks& time_of_event, CastLoggingEvent event, 39 const base::TimeTicks& time_of_event, CastLoggingEvent event,
39 uint32 rtp_timestamp, uint32 frame_id, base::TimeDelta delay) { 40 uint32 rtp_timestamp, uint32 frame_id, base::TimeDelta delay) {
40 DCHECK(thread_checker_.CalledOnValidThread()); 41 DCHECK(thread_checker_.CalledOnValidThread());
41 raw_.InsertFrameEventWithDelay(time_of_event, event, rtp_timestamp, 42 raw_.InsertFrameEventWithDelay(time_of_event, event, rtp_timestamp,
42 frame_id, delay); 43 frame_id, delay);
43 } 44 }
44 45
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 raw_.AddSubscriber(subscriber); 101 raw_.AddSubscriber(subscriber);
101 } 102 }
102 103
103 void LoggingImpl::RemoveRawEventSubscriber(RawEventSubscriber* subscriber) { 104 void LoggingImpl::RemoveRawEventSubscriber(RawEventSubscriber* subscriber) {
104 DCHECK(thread_checker_.CalledOnValidThread()); 105 DCHECK(thread_checker_.CalledOnValidThread());
105 raw_.RemoveSubscriber(subscriber); 106 raw_.RemoveSubscriber(subscriber);
106 } 107 }
107 108
108 } // namespace cast 109 } // namespace cast
109 } // namespace media 110 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/logging/logging_impl.h ('k') | media/cast/logging/logging_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698