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

Side by Side Diff: media/mojo/clients/mojo_media_log_service.cc

Issue 2966643002: media: Plumb MediaLog to MojoVideoDecoderService. (Closed)
Patch Set: Swap client/service directory. Created 3 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
« no previous file with comments | « media/mojo/clients/mojo_media_log_service.h ('k') | media/mojo/clients/mojo_video_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/mojo/clients/mojo_media_log_service.h"
6
7 #include <memory>
8
9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h"
11 #include "media/base/media_log_event.h"
12
13 namespace media {
14
15 MojoMediaLogService::MojoMediaLogService(media::MediaLog* media_log)
16 : media_log_(media_log) {
17 DVLOG(1) << __func__;
18 DCHECK(media_log_);
19 }
20
21 MojoMediaLogService::~MojoMediaLogService() {
22 DVLOG(1) << __func__;
23 }
24
25 void MojoMediaLogService::AddEvent(const media::MediaLogEvent& event) {
26 DVLOG(1) << __func__;
27
28 // Make a copy so that we can transfer ownership to |media_log_|.
29 std::unique_ptr<media::MediaLogEvent> modified_event =
30 base::MakeUnique<media::MediaLogEvent>(event);
31
32 // |id| is player-unique per-process, but the remote side does not know the
33 // correct value (nor would we necessarily trust it). Overwrite with the
34 // correct value.
35 modified_event->id = media_log_->id();
36
37 media_log_->AddEvent(std::move(modified_event));
38 }
39
40 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/clients/mojo_media_log_service.h ('k') | media/mojo/clients/mojo_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698