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

Side by Side Diff: services/media/framework/metadata.h

Issue 1577953002: Motown in-proc streaming framework used to implement media services. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Addressed feedback including non-const ref parameters. Created 4 years, 11 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_MEDIA_FRAMEWORK_METADATA_H_
6 #define SERVICES_MEDIA_FRAMEWORK_METADATA_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "services/media/framework/ptr.h"
12
13 namespace mojo {
14 namespace media {
15
16 class Metadata;
17
18 typedef UniquePtr<Metadata> MetadataPtr;
19
20 class Metadata {
21 public:
22 static MetadataPtr New(
23 uint64_t duration_ns,
24 const std::string& title,
25 const std::string& artist,
26 const std::string& album,
27 const std::string& publisher,
28 const std::string& genre,
29 const std::string& composer);
30
31 Metadata(
32 uint64_t duration_ns,
33 const std::string& title,
34 const std::string& artist,
35 const std::string& album,
36 const std::string& publisher,
37 const std::string& genre,
38 const std::string& composer);
39
40 ~Metadata();
41
42 uint64_t duration_ns() const { return duration_ns_; }
43
44 const std::string& title() const { return title_; }
45
46 const std::string& artist() const { return artist_; }
47
48 const std::string& album() const { return album_; }
49
50 const std::string& publisher() const { return publisher_; }
51
52 const std::string& genre() const { return genre_; }
53
54 const std::string& composer() const { return composer_; }
55
56 MetadataPtr Clone() const {
57 return New(
58 duration_ns_,
59 title_,
60 artist_,
61 album_,
62 publisher_,
63 genre_,
64 composer_);
65 }
66
67 private:
68 uint64_t duration_ns_;
69 std::string title_;
70 std::string artist_;
71 std::string album_;
72 std::string publisher_;
73 std::string genre_;
74 std::string composer_;
75 };
76
77 } // namespace media
78 } // namespace mojo
79
80 #endif // SERVICES_MEDIA_FRAMEWORK_METADATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698