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

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: Fix compiling errors on mac and address review comments 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
Index: media/base/bitstream_buffer.h
diff --git a/media/base/bitstream_buffer.h b/media/base/bitstream_buffer.h
index fe3c8da358ab021da1255517688e3693a96b4b1e..217be7610e4684dd259918d90f20217879c3d26d 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,
@@ -36,6 +39,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_;
@@ -65,6 +70,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.
};

Powered by Google App Engine
This is Rietveld 408576698