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

Unified Diff: media/base/win/mf_helpers.h

Issue 2172703002: Revert of H264 HW encode using MediaFoundation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « media/base/win/BUILD.gn ('k') | media/base/win/mf_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/win/mf_helpers.h
diff --git a/media/base/win/mf_helpers.h b/media/base/win/mf_helpers.h
deleted file mode 100644
index a99ecedbb3fdbf0dd79b008597dfc9ebaab7c774..0000000000000000000000000000000000000000
--- a/media/base/win/mf_helpers.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_BASE_WIN_MF_HELPERS_H_
-#define MEDIA_BASE_WIN_MF_HELPERS_H_
-
-#include <mfapi.h>
-#include <stdint.h>
-
-#include "base/win/scoped_comptr.h"
-#include "media/base/win/mf_initializer_export.h"
-
-namespace media {
-
-namespace mf {
-
-#define RETURN_ON_FAILURE(result, log, ret) \
- do { \
- if (!(result)) { \
- DLOG(ERROR) << log; \
- mf::LogDXVAError(__LINE__); \
- return ret; \
- } \
- } while (0)
-
-#define RETURN_ON_HR_FAILURE(result, log, ret) \
- RETURN_ON_FAILURE(SUCCEEDED(result), \
- log << ", HRESULT: 0x" << std::hex << result, ret);
-
-#define RETURN_AND_NOTIFY_ON_FAILURE(result, log, error_code, ret) \
- do { \
- if (!(result)) { \
- DVLOG(1) << log; \
- mf::LogDXVAError(__LINE__); \
- StopOnError(error_code); \
- return ret; \
- } \
- } while (0)
-
-#define RETURN_AND_NOTIFY_ON_HR_FAILURE(result, log, error_code, ret) \
- RETURN_AND_NOTIFY_ON_FAILURE(SUCCEEDED(result), \
- log << ", HRESULT: 0x" << std::hex << result, \
- error_code, ret);
-
-MF_INITIALIZER_EXPORT void LogDXVAError(int line);
-
-// Creates a Media Foundation sample with one buffer of length |buffer_length|
-// on a |align|-byte boundary. Alignment must be a perfect power of 2 or 0.
-MF_INITIALIZER_EXPORT IMFSample* CreateEmptySampleWithBuffer(
- uint32_t buffer_length,
- int align);
-
-// Provides scoped access to the underlying buffer in an IMFMediaBuffer
-// instance.
-class MF_INITIALIZER_EXPORT MediaBufferScopedPointer {
- public:
- MediaBufferScopedPointer(IMFMediaBuffer* media_buffer);
- ~MediaBufferScopedPointer();
-
- uint8_t* get() { return buffer_; }
- DWORD current_length() const { return current_length_; }
-
- private:
- base::win::ScopedComPtr<IMFMediaBuffer> media_buffer_;
- uint8_t* buffer_;
- DWORD max_length_;
- DWORD current_length_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaBufferScopedPointer);
-};
-
-} // namespace mf
-
-} // namespace media
-
-#endif // MEDIA_BASE_WIN_MF_HELPERS_H_
« no previous file with comments | « media/base/win/BUILD.gn ('k') | media/base/win/mf_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698