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

Side by Side Diff: media/filters/ffmpeg_demuxer.cc

Issue 394373002: Add VideoRotation UMA Logging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/filters/ffmpeg_demuxer.h" 5 #include "media/filters/ffmpeg_demuxer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/callback_helpers.h" 13 #include "base/callback_helpers.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/message_loop/message_loop_proxy.h" 15 #include "base/message_loop/message_loop_proxy.h"
16 #include "base/metrics/histogram.h"
16 #include "base/metrics/sparse_histogram.h" 17 #include "base/metrics/sparse_histogram.h"
17 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
18 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
19 #include "base/strings/stringprintf.h" 20 #include "base/strings/stringprintf.h"
20 #include "base/sys_byteorder.h" 21 #include "base/sys_byteorder.h"
21 #include "base/task_runner_util.h" 22 #include "base/task_runner_util.h"
22 #include "base/time/time.h" 23 #include "base/time/time.h"
23 #include "media/base/audio_decoder_config.h" 24 #include "media/base/audio_decoder_config.h"
24 #include "media/base/bind_to_current_loop.h" 25 #include "media/base/bind_to_current_loop.h"
25 #include "media/base/decoder_buffer.h" 26 #include "media/base/decoder_buffer.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 case 180: 128 case 180:
128 video_rotation_ = VIDEO_ROTATION_180; 129 video_rotation_ = VIDEO_ROTATION_180;
129 break; 130 break;
130 case 270: 131 case 270:
131 video_rotation_ = VIDEO_ROTATION_270; 132 video_rotation_ = VIDEO_ROTATION_270;
132 break; 133 break;
133 default: 134 default:
134 LOG(ERROR) << "Unsupported video rotation metadata: " << rotation; 135 LOG(ERROR) << "Unsupported video rotation metadata: " << rotation;
135 break; 136 break;
136 } 137 }
138 UMA_HISTOGRAM_ENUMERATION(
139 "Media.VideoRotation", video_rotation_, VIDEO_ROTATION_MAX + 1);
scherkus (not reviewing) 2014/07/17 01:26:18 I believe we'll want this logged inside of webmedi
137 140
138 break; 141 break;
139 case AVMEDIA_TYPE_SUBTITLE: 142 case AVMEDIA_TYPE_SUBTITLE:
140 type_ = TEXT; 143 type_ = TEXT;
141 break; 144 break;
142 default: 145 default:
143 NOTREACHED(); 146 NOTREACHED();
144 break; 147 break;
145 } 148 }
146 149
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 } 1200 }
1198 for (size_t i = 0; i < buffered.size(); ++i) 1201 for (size_t i = 0; i < buffered.size(); ++i)
1199 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); 1202 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i));
1200 } 1203 }
1201 1204
1202 void FFmpegDemuxer::OnDataSourceError() { 1205 void FFmpegDemuxer::OnDataSourceError() {
1203 host_->OnDemuxerError(PIPELINE_ERROR_READ); 1206 host_->OnDemuxerError(PIPELINE_ERROR_READ);
1204 } 1207 }
1205 1208
1206 } // namespace media 1209 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698