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

Unified Diff: media/base/encoded_bitstream_buffer.h

Issue 15906019: Hook up EncodedVideoSource on the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_cl_6
Patch Set: 516738a8 IPC/struct changes, courtesy hshi@ Created 7 years, 6 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/encoded_bitstream_buffer.h
diff --git a/media/base/encoded_bitstream_buffer.h b/media/base/encoded_bitstream_buffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..d50a32959c0c01e75b941d40695ea50a25c91de6
--- /dev/null
+++ b/media/base/encoded_bitstream_buffer.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
Ami GONE FROM CHROMIUM 2013/06/18 18:35:55 Ignoring file (b/c I think it's part of a differen
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_
+#define MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_
+
+#include "base/callback_forward.h"
+#include "base/memory/ref_counted.h"
+#include "base/shared_memory.h"
+#include "base/time.h"
+#include "media/base/media_export.h"
+#include "media/video/video_encode_types.h"
+
+namespace media {
+
+// General encoded video bitstream buffer.
+class EncodedBitstreamBuffer :
+ public base::RefCountedThreadSafe<EncodedBitstreamBuffer> {
+ public:
+ EncodedBitstreamBuffer(int buffer_id,
+ uint8* buffer,
+ size_t size,
+ base::SharedMemoryHandle handle,
+ const media::BufferEncodingMetadata& metadata,
+ const base::Closure& destroy_callback);
+ // Accessors for properties.
+ int buffer_id() const;
+ const uint8* buffer() const;
+ size_t size() const;
+ base::SharedMemoryHandle shared_memory_handle() const;
+ const media::BufferEncodingMetadata& metadata() const;
+
+ protected:
+ // Destructor that deallocates the buffers.
+ virtual ~EncodedBitstreamBuffer();
+ friend class base::RefCountedThreadSafe<EncodedBitstreamBuffer>;
+
+ private:
+ int buffer_id_;
+ uint8* buffer_;
+ size_t size_;
+ const base::SharedMemoryHandle shared_memory_handle_;
+ media::BufferEncodingMetadata metadata_;
+ const base::Closure destroy_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(EncodedBitstreamBuffer);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_

Powered by Google App Engine
This is Rietveld 408576698