Skip to content

Commit

Permalink
[media] Remove the deprecated shared memory
Browse files Browse the repository at this point in the history
This CL removes the last references to deprecated shared memory classes
in media/. It's a dead code that is no longer needed.

This also fixes some missing includes that used to be added
transitively.

Bug: 849207
Change-Id: I29483f5af8fe69bec69ace124e92b3aed91c6c83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919216
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716409}
  • Loading branch information
Alex Ilin authored and Commit Bot committed Nov 19, 2019
1 parent eeb0e16 commit df83d88
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 35 deletions.
1 change: 0 additions & 1 deletion media/audio/audio_device_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <stdint.h>

#include "base/macros.h"
#include "base/memory/shared_memory.h"
#include "base/sync_socket.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread_checker.h"
Expand Down
2 changes: 1 addition & 1 deletion media/audio/audio_input_device_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <utility>

#include "base/memory/ptr_util.h"
#include "base/memory/shared_memory.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/process/process_handle.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
Expand Down
2 changes: 1 addition & 1 deletion media/audio/audio_sync_reader_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <utility>

#include "base/bind.h"
#include "base/memory/shared_memory.h"
#include "base/memory/shared_memory_mapping.h"
#include "base/sync_socket.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
Expand Down
17 changes: 0 additions & 17 deletions media/base/bitstream_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ BitstreamBuffer::BitstreamBuffer(int32_t id,
offset_(offset),
presentation_timestamp_(presentation_timestamp) {}

BitstreamBuffer::BitstreamBuffer(int32_t id,
base::SharedMemoryHandle handle,
bool read_only,
size_t size,
off_t offset,
base::TimeDelta presentation_timestamp)
: id_(id),
region_(
base::subtle::PlatformSharedMemoryRegion::TakeFromSharedMemoryHandle(
handle.Duplicate(),
read_only
? base::subtle::PlatformSharedMemoryRegion::Mode::kReadOnly
: base::subtle::PlatformSharedMemoryRegion::Mode::kUnsafe)),
size_(size),
offset_(offset),
presentation_timestamp_(presentation_timestamp) {}

BitstreamBuffer::BitstreamBuffer(BitstreamBuffer&&) = default;
BitstreamBuffer& BitstreamBuffer::operator=(BitstreamBuffer&&) = default;

Expand Down
10 changes: 0 additions & 10 deletions media/base/bitstream_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ class MEDIA_EXPORT BitstreamBuffer {
off_t offset = 0,
base::TimeDelta presentation_timestamp = kNoTimestamp);

// As above, but creates by duplicating a SharedMemoryHandle.
// TODO(https://crbug.com/793446): remove once legacy shared memory has been
// converted.
BitstreamBuffer(int32_t id,
base::SharedMemoryHandle handle,
bool read_only,
size_t size,
off_t offset = 0,
base::TimeDelta presentation_timestamp = kNoTimestamp);

// Move operations are allowed.
BitstreamBuffer(BitstreamBuffer&&);
BitstreamBuffer& operator=(BitstreamBuffer&&);
Expand Down
1 change: 0 additions & 1 deletion media/base/decoder_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "base/memory/aligned_memory.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/memory/ref_counted.h"
#include "base/memory/shared_memory_handle.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "media/base/decrypt_config.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <sys/ioctl.h>

#include "base/files/file_enumerator.h"
#include "base/posix/eintr_wrapper.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/threading/thread_task_runner_handle.h"
Expand Down
1 change: 0 additions & 1 deletion media/capture/video/video_capture_buffer_pool_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "base/files/file.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/shared_memory.h"
#include "base/process/process.h"
#include "base/synchronization/lock.h"
#include "build/build_config.h"
Expand Down
1 change: 0 additions & 1 deletion media/gpu/ipc/service/gpu_video_decode_accelerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/shared_memory.h"
#include "base/synchronization/waitable_event.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "gpu/config/gpu_info.h"
Expand Down
1 change: 0 additions & 1 deletion media/gpu/ipc/service/vda_video_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "base/containers/mru_cache.h"
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/shared_memory.h"
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
Expand Down
1 change: 1 addition & 0 deletions media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/numerics/safe_conversions.h"
#include "base/posix/eintr_wrapper.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
Expand Down
1 change: 1 addition & 0 deletions media/gpu/v4l2/v4l2_video_decoder_backend_stateless.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/posix/eintr_wrapper.h"
#include "base/sequenced_task_runner.h"
#include "media/base/decode_status.h"
#include "media/base/video_codecs.h"
Expand Down
1 change: 0 additions & 1 deletion media/gpu/windows/dxva_video_decode_accelerator_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "base/files/file_path.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/shared_memory.h"
#include "base/metrics/histogram_macros.h"
#include "base/path_service.h"
#include "base/single_thread_task_runner.h"
Expand Down
4 changes: 4 additions & 0 deletions media/mojo/mojom/video_frame_mojom_traits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#include "ui/gfx/mojom/buffer_types_mojom_traits.h"
#include "ui/gfx/mojom/color_space_mojom_traits.h"

#if defined(OS_LINUX)
#include "base/posix/eintr_wrapper.h"
#endif // defined(OS_LINUX)

namespace mojo {

namespace {
Expand Down

0 comments on commit df83d88

Please sign in to comment.