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

Unified Diff: examples/media_test/media_test.cc

Issue 1822333002: Motown: wholesale clang-format (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: dalesat Created 4 years, 9 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
« no previous file with comments | « examples/media_test/media_test.h ('k') | examples/media_test/media_test_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/media_test/media_test.cc
diff --git a/examples/media_test/media_test.cc b/examples/media_test/media_test.cc
index 206e959d3b8a2468d576afec379cba3ac91b5441..0693a3feb95c4bffc212b6684317cebc22290c79 100644
--- a/examples/media_test/media_test.cc
+++ b/examples/media_test/media_test.cc
@@ -18,10 +18,9 @@ std::unique_ptr<MediaTest> MediaTest::Create(
return std::unique_ptr<MediaTest>(new MediaTest(app, input_file_name));
}
-MediaTest::MediaTest(
- mojo::ApplicationImpl* app,
- const std::string& input_file_name) :
- state_(MediaState::UNPREPARED) {
+MediaTest::MediaTest(mojo::ApplicationImpl* app,
+ const std::string& input_file_name)
+ : state_(MediaState::UNPREPARED) {
MediaFactoryPtr factory;
app->ConnectToService("mojo:media_factory", &factory);
@@ -55,14 +54,12 @@ MediaState MediaTest::state() const {
int64_t MediaTest::position_ns() const {
// Apply the transform to the current time.
int64_t position;
- transform_.DoForwardTransform(
- LocalClock::now().time_since_epoch().count(),
- &position);
+ transform_.DoForwardTransform(LocalClock::now().time_since_epoch().count(),
+ &position);
MOJO_DCHECK(position >= 0);
- if (metadata_ &&
- static_cast<uint64_t>(position) > metadata_->duration) {
+ if (metadata_ && static_cast<uint64_t>(position) > metadata_->duration) {
position = metadata_->duration;
}
@@ -73,9 +70,8 @@ const MediaMetadataPtr& MediaTest::metadata() const {
return metadata_;
}
-void MediaTest::HandleStatusUpdates(
- uint64_t version,
- MediaPlayerStatusPtr status) {
+void MediaTest::HandleStatusUpdates(uint64_t version,
+ MediaPlayerStatusPtr status) {
if (status) {
// Process status received from the player.
state_ = status->state;
@@ -84,11 +80,11 @@ void MediaTest::HandleStatusUpdates(
// time. Note that 'reference' here refers to the presentation time, and
// 'target' refers to the local time.
if (status->timeline_transform) {
- transform_ = LinearTransform(
- status->timeline_transform->quad->target_offset,
- status->timeline_transform->quad->reference_delta,
- status->timeline_transform->quad->target_delta,
- status->timeline_transform->quad->reference_offset);
+ transform_ =
+ LinearTransform(status->timeline_transform->quad->target_offset,
+ status->timeline_transform->quad->reference_delta,
+ status->timeline_transform->quad->target_delta,
+ status->timeline_transform->quad->reference_offset);
}
metadata_ = status->metadata.Pass();
@@ -100,8 +96,7 @@ void MediaTest::HandleStatusUpdates(
// Request a status update.
media_player_->GetStatus(
- version,
- [this](uint64_t version, MediaPlayerStatusPtr status) {
+ version, [this](uint64_t version, MediaPlayerStatusPtr status) {
HandleStatusUpdates(version, status.Pass());
});
}
« no previous file with comments | « examples/media_test/media_test.h ('k') | examples/media_test/media_test_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698