| 6 |
| * License as published by the Free Software Foundation; either |
| 7 | * version 2.1 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * FFmpeg is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with FFmpeg; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | */ |
| 18 |
| 19 |
| 20 | #ifndef AVUTIL_HWCONTEXT_AMF_H |
| 21 | #define AVUTIL_HWCONTEXT_AMF_H |
| 22 |
| 23 | #include "pixfmt.h" |
| 24 | #include "hwcontext.h" |
| 25 | #include <AMF/core/Factory.h> |
| 26 | #include <AMF/core/Context.h> |
| 27 | #include <AMF/core/Trace.h> |
| 28 | #include <AMF/core/Debug.h> |
| 29 |
| 30 | /** |
| 31 | * This struct is allocated as AVHWDeviceContext.hwctx |
| 32 | */ |
| 33 | typedef struct AVAMFDeviceContext { |
| 34 | void * library; |
| 35 | AMFFactory *factory; |
| 36 | void *trace_writer; |
| 37 |
| 38 | int64_t version; ///< version of AMF runtime |
| 39 | AMFContext *context; |
| 40 | AMF_MEMORY_TYPE memory_type; |
| 41 |
| 42 | void (*lock)(void *lock_ctx); |
| 43 | void (*unlock)(void *lock_ctx); |
| 44 | void *lock_ctx; |
| 45 | } AVAMFDeviceContext; |
| 46 |
| 47 | enum AMF_SURFACE_FORMAT av_av_to_amf_format(enum AVPixelFormat fmt); |
| 48 | enum AVPixelFormat av_amf_to_av_format(enum AMF_SURFACE_FORMAT fmt); |
| 49 |
| 50 | #endif /* AVUTIL_HWCONTEXT_AMF_H */ |
| 51 |