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

Side by Side Diff: media/base/pipeline_status.h

Issue 2230583002: Add MediaPlayerRenderer/MediaPlayerRendererClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added MEDIA_EXPORT. Created 4 years, 4 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/base/media_url_demuxer_unittest.cc ('k') | media/blink/webmediaplayer_util.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 (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 #ifndef MEDIA_BASE_PIPELINE_STATUS_H_ 5 #ifndef MEDIA_BASE_PIPELINE_STATUS_H_
6 #define MEDIA_BASE_PIPELINE_STATUS_H_ 6 #define MEDIA_BASE_PIPELINE_STATUS_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 9
10 #include <stdint.h> 10 #include <stdint.h>
11 11
12 #include <string> 12 #include <string>
13 13
14 namespace media { 14 namespace media {
15 15
16 // Status states for pipeline. All codes except PIPELINE_OK indicate errors. 16 // Status states for pipeline. All codes except PIPELINE_OK indicate errors.
17 // Logged to UMA, so never reuse a value, always add new/greater ones! 17 // Logged to UMA, so never reuse a value, always add new/greater ones!
18 enum PipelineStatus { 18 enum PipelineStatus {
19 PIPELINE_OK = 0, 19 PIPELINE_OK = 0,
20 // Deprecated: PIPELINE_ERROR_URL_NOT_FOUND = 1, 20 // Deprecated: PIPELINE_ERROR_URL_NOT_FOUND = 1,
21 PIPELINE_ERROR_NETWORK = 2, 21 PIPELINE_ERROR_NETWORK = 2,
22 PIPELINE_ERROR_DECODE = 3, 22 PIPELINE_ERROR_DECODE = 3,
23 // Deprecated: PIPELINE_ERROR_DECRYPT = 4, 23 // Deprecated: PIPELINE_ERROR_DECRYPT = 4,
24 PIPELINE_ERROR_ABORT = 5, 24 PIPELINE_ERROR_ABORT = 5,
25 PIPELINE_ERROR_INITIALIZATION_FAILED = 6, 25 PIPELINE_ERROR_INITIALIZATION_FAILED = 6,
26 PIPELINE_ERROR_COULD_NOT_RENDER = 8, 26 PIPELINE_ERROR_COULD_NOT_RENDER = 8,
27 PIPELINE_ERROR_READ = 9, 27 PIPELINE_ERROR_READ = 9,
28 // Deprecated: PIPELINE_ERROR_OPERATION_PENDING = 10, 28 // Deprecated: PIPELINE_ERROR_OPERATION_PENDING = 10,
29 PIPELINE_ERROR_INVALID_STATE = 11, 29 PIPELINE_ERROR_INVALID_STATE = 11,
30 PIPELINE_ERROR_EXTERNAL_RENDERER_FAILED = 21,
30 31
31 // Demuxer related errors. 32 // Demuxer related errors.
32 DEMUXER_ERROR_COULD_NOT_OPEN = 12, 33 DEMUXER_ERROR_COULD_NOT_OPEN = 12,
33 DEMUXER_ERROR_COULD_NOT_PARSE = 13, 34 DEMUXER_ERROR_COULD_NOT_PARSE = 13,
34 DEMUXER_ERROR_NO_SUPPORTED_STREAMS = 14, 35 DEMUXER_ERROR_NO_SUPPORTED_STREAMS = 14,
35 36
36 // Decoder related errors. 37 // Decoder related errors.
37 DECODER_ERROR_NOT_SUPPORTED = 15, 38 DECODER_ERROR_NOT_SUPPORTED = 15,
38 39
39 // ChunkDemuxer related errors. 40 // ChunkDemuxer related errors.
40 CHUNK_DEMUXER_ERROR_APPEND_FAILED = 16, 41 CHUNK_DEMUXER_ERROR_APPEND_FAILED = 16,
41 CHUNK_DEMUXER_ERROR_EOS_STATUS_DECODE_ERROR = 17, 42 CHUNK_DEMUXER_ERROR_EOS_STATUS_DECODE_ERROR = 17,
42 CHUNK_DEMUXER_ERROR_EOS_STATUS_NETWORK_ERROR = 18, 43 CHUNK_DEMUXER_ERROR_EOS_STATUS_NETWORK_ERROR = 18,
43 44
44 // Audio rendering errors. 45 // Audio rendering errors.
45 AUDIO_RENDERER_ERROR = 19, 46 AUDIO_RENDERER_ERROR = 19,
46 AUDIO_RENDERER_ERROR_SPLICE_FAILED = 20, 47 AUDIO_RENDERER_ERROR_SPLICE_FAILED = 20,
47 48
48 // Must be equal to the largest value ever logged. 49 // Must be equal to the largest value ever logged.
49 PIPELINE_STATUS_MAX = AUDIO_RENDERER_ERROR_SPLICE_FAILED, 50 PIPELINE_STATUS_MAX = PIPELINE_ERROR_EXTERNAL_RENDERER_FAILED,
50 }; 51 };
51 52
52 typedef base::Callback<void(PipelineStatus)> PipelineStatusCB; 53 typedef base::Callback<void(PipelineStatus)> PipelineStatusCB;
53 54
54 struct PipelineStatistics { 55 struct PipelineStatistics {
55 uint64_t audio_bytes_decoded = 0; 56 uint64_t audio_bytes_decoded = 0;
56 uint64_t video_bytes_decoded = 0; 57 uint64_t video_bytes_decoded = 0;
57 uint32_t video_frames_decoded = 0; 58 uint32_t video_frames_decoded = 0;
58 uint32_t video_frames_dropped = 0; 59 uint32_t video_frames_dropped = 0;
59 int64_t audio_memory_usage = 0; 60 int64_t audio_memory_usage = 0;
60 int64_t video_memory_usage = 0; 61 int64_t video_memory_usage = 0;
61 }; 62 };
62 63
63 // Used for updating pipeline statistics; the passed value should be a delta 64 // Used for updating pipeline statistics; the passed value should be a delta
64 // of all attributes since the last update. 65 // of all attributes since the last update.
65 typedef base::Callback<void(const PipelineStatistics&)> StatisticsCB; 66 typedef base::Callback<void(const PipelineStatistics&)> StatisticsCB;
66 67
67 } // namespace media 68 } // namespace media
68 69
69 #endif // MEDIA_BASE_PIPELINE_STATUS_H_ 70 #endif // MEDIA_BASE_PIPELINE_STATUS_H_
OLDNEW
« no previous file with comments | « media/base/media_url_demuxer_unittest.cc ('k') | media/blink/webmediaplayer_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698