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 std::unique_ptr<Metadata> Metadata::Create( | 11 std::unique_ptr<Metadata> Metadata::Create(uint64_t duration_ns, |
12 uint64_t duration_ns, | 12 const std::string& title, |
13 const std::string& title, | 13 const std::string& artist, |
14 const std::string& artist, | 14 const std::string& album, |
15 const std::string& album, | 15 const std::string& publisher, |
16 const std::string& publisher, | 16 const std::string& genre, |
17 const std::string& genre, | 17 const std::string& composer) { |
18 const std::string& composer) { | |
19 return std::unique_ptr<Metadata>(new Metadata( | 18 return std::unique_ptr<Metadata>(new Metadata( |
20 duration_ns, | 19 duration_ns, title, artist, album, publisher, genre, composer)); |
21 title, | |
22 artist, | |
23 album, | |
24 publisher, | |
25 genre, | |
26 composer)); | |
27 } | 20 } |
28 | 21 |
29 Metadata::Metadata( | 22 Metadata::Metadata(uint64_t duration_ns, |
30 uint64_t duration_ns, | 23 const std::string& title, |
31 const std::string& title, | 24 const std::string& artist, |
32 const std::string& artist, | 25 const std::string& album, |
33 const std::string& album, | 26 const std::string& publisher, |
34 const std::string& publisher, | 27 const std::string& genre, |
35 const std::string& genre, | 28 const std::string& composer) |
36 const std::string& composer) : | 29 : duration_ns_(duration_ns), |
37 duration_ns_(duration_ns), | 30 title_(title), |
38 title_(title), | 31 artist_(artist), |
39 artist_(artist), | 32 album_(album), |
40 album_(album), | 33 publisher_(publisher), |
41 publisher_(publisher), | 34 genre_(genre), |
42 genre_(genre), | 35 composer_(composer) {} |
43 composer_(composer) {} | |
44 | 36 |
45 Metadata::~Metadata() {} | 37 Metadata::~Metadata() {} |
46 | 38 |
47 } // namespace media | 39 } // namespace media |
48 } // namespace mojo | 40 } // namespace mojo |
OLD | NEW |