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

Unified Diff: media/base/bitstream_buffer.h

Issue 1645873002: Use ParamTraits for media::BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_common.gypi ('k') | media/base/bitstream_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/bitstream_buffer.h
diff --git a/media/base/bitstream_buffer.h b/media/base/bitstream_buffer.h
index 9ceeaf8967bde1c62acadec476e7e967e004a722..42451cca766886fa5cd64493be7167c2eae072ea 100644
--- a/media/base/bitstream_buffer.h
+++ b/media/base/bitstream_buffer.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/shared_memory.h"
#include "base/time/time.h"
+#include "ipc/ipc_param_traits.h"
#include "media/base/decrypt_config.h"
#include "media/base/media_export.h"
#include "media/base/timestamp_constants.h"
@@ -21,6 +22,8 @@ namespace media {
// data. This is the media-namespace equivalent of PP_VideoBitstreamBuffer_Dev.
class MEDIA_EXPORT BitstreamBuffer {
public:
+ BitstreamBuffer();
+
BitstreamBuffer(int32_t id, base::SharedMemoryHandle handle, size_t size);
BitstreamBuffer(int32_t id,
@@ -38,6 +41,8 @@ class MEDIA_EXPORT BitstreamBuffer {
base::SharedMemoryHandle handle() const { return handle_; }
size_t size() const { return size_; }
+ void set_handle(const base::SharedMemoryHandle& handle) { handle_ = handle; }
+
// The timestamp is only valid if it's not equal to |media::kNoTimestamp()|.
base::TimeDelta presentation_timestamp() const {
return presentation_timestamp_;
@@ -67,6 +72,8 @@ class MEDIA_EXPORT BitstreamBuffer {
std::string iv_; // initialization vector
std::vector<SubsampleEntry> subsamples_; // clear/cypher sizes
+ friend struct IPC::ParamTraits<media::BitstreamBuffer>;
+
// Allow compiler-generated copy & assign constructors.
};
« no previous file with comments | « content/content_common.gypi ('k') | media/base/bitstream_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698