forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plumb callbacks from mojo media service to client.
Add OnStatisticsUpdate and OnWaitingForDecryptionKey to mojom::RendererClient, and call these callbacks from MojoRendererService. These are needed for Cast Apps like Netflix that depend on decoding statistics from the media pipeline. BUG=585287 BUG= internal b/29390639 Review-Url: https://codereview.chromium.org/2101043003 Cr-Commit-Position: refs/heads/master@{#404486}
- Loading branch information
slan
authored and
Commit bot
committed
Jul 8, 2016
1 parent
d75fb6b
commit 267e463
Showing
11 changed files
with
104 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
per-file *_struct_traits*.*=set noparent | ||
per-file *_struct_traits*.*=file://ipc/SECURITY_OWNERS | ||
per-file *_type_converter*.*=set noparent | ||
per-file *_type_converter*.*=file://ipc/SECURITY_OWNERS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_ | ||
#define MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_ | ||
|
||
#include "media/base/pipeline_status.h" | ||
#include "media/mojo/interfaces/media_types.mojom.h" | ||
|
||
namespace mojo { | ||
|
||
template <> | ||
struct StructTraits<media::mojom::PipelineStatistics, | ||
media::PipelineStatistics> { | ||
static uint64_t audio_bytes_decoded(const media::PipelineStatistics& input) { | ||
return input.audio_bytes_decoded; | ||
} | ||
static uint64_t video_bytes_decoded(const media::PipelineStatistics& input) { | ||
return input.video_bytes_decoded; | ||
} | ||
static uint32_t video_frames_decoded(const media::PipelineStatistics& input) { | ||
return input.video_frames_decoded; | ||
} | ||
static uint32_t video_frames_dropped(const media::PipelineStatistics& input) { | ||
return input.video_frames_dropped; | ||
} | ||
static int64_t audio_memory_usage(const media::PipelineStatistics& input) { | ||
return input.audio_memory_usage; | ||
} | ||
static int64_t video_memory_usage(const media::PipelineStatistics& input) { | ||
return input.video_memory_usage; | ||
} | ||
|
||
static bool Read(media::mojom::PipelineStatisticsDataView data, | ||
media::PipelineStatistics* output) { | ||
output->audio_bytes_decoded = data.audio_bytes_decoded(); | ||
output->video_bytes_decoded = data.video_bytes_decoded(); | ||
output->video_frames_decoded = data.video_frames_decoded(); | ||
output->video_frames_dropped = data.video_frames_dropped(); | ||
output->audio_memory_usage = data.audio_memory_usage(); | ||
output->video_memory_usage = data.video_memory_usage(); | ||
return true; | ||
} | ||
}; | ||
|
||
} // namespace mojo | ||
|
||
#endif // MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright 2016 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
mojom = "//media/mojo/interfaces/media_types.mojom" | ||
public_headers = [ "//media/base/pipeline_status.h" ] | ||
traits_headers = [ "//media/mojo/common/pipeline_statistics_struct_traits.h" ] | ||
type_mappings = [ "media.mojom.PipelineStatistics=media::PipelineStatistics" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters