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

Side by Side Diff: services/media/framework/formatting.cc

Issue 1814553002: Motown: Improvements to packet definition (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Added a comment. Created 4 years, 9 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/factory_service/media_sink_impl.cc ('k') | services/media/framework/packet.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <iostream> 5 #include <iostream>
6 6
7 #include "services/media/framework/formatting.h" 7 #include "services/media/framework/formatting.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace media { 10 namespace media {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 return os; 51 return os;
52 } 52 }
53 53
54 std::ostream& operator<<(std::ostream& os, const PacketPtr& value) { 54 std::ostream& operator<<(std::ostream& os, const PacketPtr& value) {
55 if (!value) { 55 if (!value) {
56 return os << "<nullptr>"; 56 return os << "<nullptr>";
57 } 57 }
58 58
59 os << "&" << std::hex << uint64_t(value.get()) << std::dec; 59 os << "&" << std::hex << uint64_t(value.get()) << std::dec;
60 os << "/pts:" << value->presentation_time(); 60 os << "/pts:" << value->pts();
61 os << "/dur:" << value->duration();
62 os << "/eos:" << (value->end_of_stream() ? "t" : "f"); 61 os << "/eos:" << (value->end_of_stream() ? "t" : "f");
63 os << "/size:" << value->size(); 62 os << "/size:" << value->size();
64 os << "/payload:" << std::hex << uint64_t(value->payload()) << std::dec; 63 os << "/payload:" << std::hex << uint64_t(value->payload()) << std::dec;
65 return os; 64 return os;
66 } 65 }
67 66
68 std::ostream& operator<<( 67 std::ostream& operator<<(
69 std::ostream& os, 68 std::ostream& os,
70 const std::unique_ptr<StreamType>& value) { 69 const std::unique_ptr<StreamType>& value) {
71 if (!value) { 70 if (!value) {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 return os << "true"; 403 return os << "true";
405 } else if (value.max) { 404 } else if (value.max) {
406 return os << "false..true"; 405 return os << "false..true";
407 } else { 406 } else {
408 return os << "false"; 407 return os << "false";
409 } 408 }
410 } 409 }
411 410
412 } // namespace media 411 } // namespace media
413 } // namespace mojo 412 } // namespace mojo
OLDNEW
« no previous file with comments | « services/media/factory_service/media_sink_impl.cc ('k') | services/media/framework/packet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698