Commit c28e6727 authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

media:: Remove media::mf:: namespace

This is a one-off namespace that's only used in mf_helpers.h. Remove it
to be consistent with other media code.

Change-Id: I08478a3bf644fbbf695b5fb0b6d6e92a5c4fb29f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2068306
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743777}
parent 551f23e6
...@@ -73,17 +73,17 @@ TEST_F(DXGIDeviceScopedHandleTest, UseDXGIDeviceScopedHandle) { ...@@ -73,17 +73,17 @@ TEST_F(DXGIDeviceScopedHandleTest, UseDXGIDeviceScopedHandle) {
{ {
// Create DXGIDeviceScopedHandle in an inner scope without LockDevice // Create DXGIDeviceScopedHandle in an inner scope without LockDevice
// call. // call.
mf::DXGIDeviceScopedHandle device_handle_1(dxgi_device_man_.Get()); DXGIDeviceScopedHandle device_handle_1(dxgi_device_man_.Get());
} }
{ {
// Create DXGIDeviceScopedHandle in an inner scope with LockDevice call. // Create DXGIDeviceScopedHandle in an inner scope with LockDevice call.
mf::DXGIDeviceScopedHandle device_handle_2(dxgi_device_man_.Get()); DXGIDeviceScopedHandle device_handle_2(dxgi_device_man_.Get());
ComPtr<ID3D11Device> device2; ComPtr<ID3D11Device> device2;
ASSERT_HRESULT_SUCCEEDED( ASSERT_HRESULT_SUCCEEDED(
device_handle_2.LockDevice(IID_PPV_ARGS(&device2))); device_handle_2.LockDevice(IID_PPV_ARGS(&device2)));
} }
// Use the device in an outer scope. // Use the device in an outer scope.
mf::DXGIDeviceScopedHandle device_handle_3(dxgi_device_man_.Get()); DXGIDeviceScopedHandle device_handle_3(dxgi_device_man_.Get());
ComPtr<ID3D11Device> device3; ComPtr<ID3D11Device> device3;
ASSERT_HRESULT_SUCCEEDED(device_handle_3.LockDevice(IID_PPV_ARGS(&device3))); ASSERT_HRESULT_SUCCEEDED(device_handle_3.LockDevice(IID_PPV_ARGS(&device3)));
} }
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
namespace media { namespace media {
namespace mf {
Microsoft::WRL::ComPtr<IMFSample> CreateEmptySampleWithBuffer( Microsoft::WRL::ComPtr<IMFSample> CreateEmptySampleWithBuffer(
uint32_t buffer_length, uint32_t buffer_length,
int align) { int align) {
...@@ -79,6 +77,4 @@ HRESULT DXGIDeviceScopedHandle::LockDevice(REFIID riid, void** device_out) { ...@@ -79,6 +77,4 @@ HRESULT DXGIDeviceScopedHandle::LockDevice(REFIID riid, void** device_out) {
return hr; return hr;
} }
} // namespace mf
} // namespace media } // namespace media
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
namespace media { namespace media {
namespace mf {
// Macros that contain return statements can make code harder to read. Only use // Macros that contain return statements can make code harder to read. Only use
// these when necessary, e.g. in places where we deal with a lot of Windows API // these when necessary, e.g. in places where we deal with a lot of Windows API
// calls, for each of which we have to check the returned HRESULT. // calls, for each of which we have to check the returned HRESULT.
...@@ -83,8 +81,6 @@ class MF_INITIALIZER_EXPORT DXGIDeviceScopedHandle { ...@@ -83,8 +81,6 @@ class MF_INITIALIZER_EXPORT DXGIDeviceScopedHandle {
HANDLE device_handle_ = INVALID_HANDLE_VALUE; HANDLE device_handle_ = INVALID_HANDLE_VALUE;
}; };
} // namespace mf
} // namespace media } // namespace media
#endif // MEDIA_BASE_WIN_MF_HELPERS_H_ #endif // MEDIA_BASE_WIN_MF_HELPERS_H_
...@@ -196,7 +196,7 @@ static Microsoft::WRL::ComPtr<IMFSample> CreateInputSample( ...@@ -196,7 +196,7 @@ static Microsoft::WRL::ComPtr<IMFSample> CreateInputSample(
CHECK(stream); CHECK(stream);
CHECK_GT(size, 0U); CHECK_GT(size, 0U);
Microsoft::WRL::ComPtr<IMFSample> sample; Microsoft::WRL::ComPtr<IMFSample> sample;
sample = mf::CreateEmptySampleWithBuffer(std::max(min_size, size), alignment); sample = CreateEmptySampleWithBuffer(std::max(min_size, size), alignment);
RETURN_ON_FAILURE(sample.Get(), "Failed to create empty sample", RETURN_ON_FAILURE(sample.Get(), "Failed to create empty sample",
Microsoft::WRL::ComPtr<IMFSample>()); Microsoft::WRL::ComPtr<IMFSample>());
...@@ -2964,7 +2964,7 @@ HRESULT DXVAVideoDecodeAccelerator::CheckConfigChanged(IMFSample* sample, ...@@ -2964,7 +2964,7 @@ HRESULT DXVAVideoDecodeAccelerator::CheckConfigChanged(IMFSample* sample,
HRESULT hr = sample->GetBufferByIndex(0, &buffer); HRESULT hr = sample->GetBufferByIndex(0, &buffer);
RETURN_ON_HR_FAILURE(hr, "Failed to get buffer from input sample", hr); RETURN_ON_HR_FAILURE(hr, "Failed to get buffer from input sample", hr);
mf::MediaBufferScopedPointer scoped_media_buffer(buffer.Get()); MediaBufferScopedPointer scoped_media_buffer(buffer.Get());
if (!config_change_detector_->DetectConfig( if (!config_change_detector_->DetectConfig(
scoped_media_buffer.get(), scoped_media_buffer.current_length())) { scoped_media_buffer.get(), scoped_media_buffer.current_length())) {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "media/base/win/mf_initializer.h" #include "media/base/win/mf_initializer.h"
#include "third_party/libyuv/include/libyuv.h" #include "third_party/libyuv/include/libyuv.h"
using media::mf::MediaBufferScopedPointer; using media::MediaBufferScopedPointer;
namespace media { namespace media {
...@@ -229,7 +229,7 @@ bool MediaFoundationVideoEncodeAccelerator::Initialize(const Config& config, ...@@ -229,7 +229,7 @@ bool MediaFoundationVideoEncodeAccelerator::Initialize(const Config& config,
HRESULT hr = HRESULT hr =
encoder_->GetInputStreamInfo(input_stream_id_, &input_stream_info); encoder_->GetInputStreamInfo(input_stream_id_, &input_stream_info);
RETURN_ON_HR_FAILURE(hr, "Couldn't get input stream info", false); RETURN_ON_HR_FAILURE(hr, "Couldn't get input stream info", false);
input_sample_ = mf::CreateEmptySampleWithBuffer( input_sample_ = CreateEmptySampleWithBuffer(
input_stream_info.cbSize input_stream_info.cbSize
? input_stream_info.cbSize ? input_stream_info.cbSize
: VideoFrame::AllocationSize(PIXEL_FORMAT_I420, input_visible_size_), : VideoFrame::AllocationSize(PIXEL_FORMAT_I420, input_visible_size_),
...@@ -238,7 +238,7 @@ bool MediaFoundationVideoEncodeAccelerator::Initialize(const Config& config, ...@@ -238,7 +238,7 @@ bool MediaFoundationVideoEncodeAccelerator::Initialize(const Config& config,
MFT_OUTPUT_STREAM_INFO output_stream_info; MFT_OUTPUT_STREAM_INFO output_stream_info;
hr = encoder_->GetOutputStreamInfo(output_stream_id_, &output_stream_info); hr = encoder_->GetOutputStreamInfo(output_stream_id_, &output_stream_info);
RETURN_ON_HR_FAILURE(hr, "Couldn't get output stream info", false); RETURN_ON_HR_FAILURE(hr, "Couldn't get output stream info", false);
output_sample_ = mf::CreateEmptySampleWithBuffer( output_sample_ = CreateEmptySampleWithBuffer(
output_stream_info.cbSize output_stream_info.cbSize
? output_stream_info.cbSize ? output_stream_info.cbSize
: bitstream_buffer_size_ * kOutputSampleBufferSizeRatio, : bitstream_buffer_size_ * kOutputSampleBufferSizeRatio,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment