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

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: sync Created 4 years, 10 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 | « services/media/framework/lpcm_util.cc ('k') | services/media/framework/metadata.cc » ('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 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 "base/macros.h"
12 #include "services/media/framework/ptr.h"
13
14 namespace mojo {
15 namespace media {
16
17 class Metadata;
18
19 // TODO(dalesat): Get rid of typedefs like these.
20 typedef UniquePtr<Metadata> MetadataPtr;
21
22 // Container for content metadata.
23 // TODO(dalesat): Probably needs to be extensible. Consider using map-like.
24 class Metadata {
25 public:
26 // TODO(dalesat): Rename methods like this 'Create'.
27 static MetadataPtr Create(
28 uint64_t duration_ns,
29 const std::string& title,
30 const std::string& artist,
31 const std::string& album,
32 const std::string& publisher,
33 const std::string& genre,
34 const std::string& composer);
35
36 ~Metadata();
37
38 uint64_t duration_ns() const { return duration_ns_; }
39
40 const std::string& title() const { return title_; }
41
42 const std::string& artist() const { return artist_; }
43
44 const std::string& album() const { return album_; }
45
46 const std::string& publisher() const { return publisher_; }
47
48 const std::string& genre() const { return genre_; }
49
50 const std::string& composer() const { return composer_; }
51
52 MetadataPtr Clone() const {
53 return Create(
54 duration_ns_,
55 title_,
56 artist_,
57 album_,
58 publisher_,
59 genre_,
60 composer_);
61 }
62
63 private:
64 Metadata(
65 uint64_t duration_ns,
66 const std::string& title,
67 const std::string& artist,
68 const std::string& album,
69 const std::string& publisher,
70 const std::string& genre,
71 const std::string& composer);
72
73 uint64_t duration_ns_;
74 std::string title_;
75 std::string artist_;
76 std::string album_;
77 std::string publisher_;
78 std::string genre_;
79 std::string composer_;
80
81 DISALLOW_COPY_AND_ASSIGN(Metadata);
82 };
83
84 } // namespace media
85 } // namespace mojo
86
87 #endif // SERVICES_MEDIA_FRAMEWORK_METADATA_H_
OLDNEW
« no previous file with comments | « services/media/framework/lpcm_util.cc ('k') | services/media/framework/metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698