| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/numerics/safe_math.h" | 10 #include "base/numerics/safe_math.h" |
| 11 #include "content/common/gpu/media_messages.h" | 11 #include "content/common/gpu/media/media_messages.h" |
| 12 | 12 |
| 13 namespace IPC { | 13 namespace IPC { |
| 14 | 14 |
| 15 void ParamTraits<media::BitstreamBuffer>::Write(base::Pickle* m, | 15 void ParamTraits<media::BitstreamBuffer>::Write(base::Pickle* m, |
| 16 const param_type& p) { | 16 const param_type& p) { |
| 17 WriteParam(m, p.id()); | 17 WriteParam(m, p.id()); |
| 18 WriteParam(m, static_cast<uint64_t>(p.size())); | 18 WriteParam(m, static_cast<uint64_t>(p.size())); |
| 19 WriteParam(m, p.presentation_timestamp()); | 19 WriteParam(m, p.presentation_timestamp()); |
| 20 WriteParam(m, p.key_id()); | 20 WriteParam(m, p.key_id()); |
| 21 if (!p.key_id().empty()) { | 21 if (!p.key_id().empty()) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 52 | 52 |
| 53 void ParamTraits<media::BitstreamBuffer>::Log(const param_type& p, | 53 void ParamTraits<media::BitstreamBuffer>::Log(const param_type& p, |
| 54 std::string* l) { | 54 std::string* l) { |
| 55 std::ostringstream oss; | 55 std::ostringstream oss; |
| 56 oss << "id=" << p.id() << ", size=" << p.size() << ", presentation_timestamp=" | 56 oss << "id=" << p.id() << ", size=" << p.size() << ", presentation_timestamp=" |
| 57 << p.presentation_timestamp().ToInternalValue(); | 57 << p.presentation_timestamp().ToInternalValue(); |
| 58 l->append(oss.str()); | 58 l->append(oss.str()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace IPC | 61 } // namespace IPC |
| OLD | NEW |