OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/media/framework/metadata.h" | 5 #include "services/media/framework/metadata.h" |
6 | 6 |
7 namespace mojo { | 7 namespace mojo { |
8 namespace media { | 8 namespace media { |
9 | 9 |
10 // static | 10 // static |
11 MetadataPtr Metadata::Create( | 11 std::unique_ptr<Metadata> Metadata::Create( |
12 uint64_t duration_ns, | 12 uint64_t duration_ns, |
13 const std::string& title, | 13 const std::string& title, |
14 const std::string& artist, | 14 const std::string& artist, |
15 const std::string& album, | 15 const std::string& album, |
16 const std::string& publisher, | 16 const std::string& publisher, |
17 const std::string& genre, | 17 const std::string& genre, |
18 const std::string& composer) { | 18 const std::string& composer) { |
19 return MetadataPtr(new Metadata( | 19 return std::unique_ptr<Metadata>(new Metadata( |
20 duration_ns, | 20 duration_ns, |
21 title, | 21 title, |
22 artist, | 22 artist, |
23 album, | 23 album, |
24 publisher, | 24 publisher, |
25 genre, | 25 genre, |
26 composer)); | 26 composer)); |
27 } | 27 } |
28 | 28 |
29 Metadata::Metadata( | 29 Metadata::Metadata( |
30 uint64_t duration_ns, | 30 uint64_t duration_ns, |
31 const std::string& title, | 31 const std::string& title, |
32 const std::string& artist, | 32 const std::string& artist, |
33 const std::string& album, | 33 const std::string& album, |
34 const std::string& publisher, | 34 const std::string& publisher, |
35 const std::string& genre, | 35 const std::string& genre, |
36 const std::string& composer) : | 36 const std::string& composer) : |
37 duration_ns_(duration_ns), | 37 duration_ns_(duration_ns), |
38 title_(title), | 38 title_(title), |
39 artist_(artist), | 39 artist_(artist), |
40 album_(album), | 40 album_(album), |
41 publisher_(publisher), | 41 publisher_(publisher), |
42 genre_(genre), | 42 genre_(genre), |
43 composer_(composer) {} | 43 composer_(composer) {} |
44 | 44 |
45 Metadata::~Metadata() {} | 45 Metadata::~Metadata() {} |
46 | 46 |
47 } // namespace media | 47 } // namespace media |
48 } // namespace mojo | 48 } // namespace mojo |
OLD | NEW |