Skip to content

Commit

Permalink
Enable api2x tools
Browse files Browse the repository at this point in the history
Tracked-On: OAM-117146
Signed-off-by: zhangyichix <[email protected]>
  • Loading branch information
zhangyichix authored and JeevakaPrabu committed Oct 18, 2024
1 parent 3f2dc92 commit 6aee4e1
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 10 deletions.
92 changes: 92 additions & 0 deletions examples/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// Copyright(c) 2023 Intel Corporation

// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files(the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and / or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

mfx_cc_defaults {

name: "hello-defaults",

header_libs: [
"libvpl_headers",
"libva_headers",
],

shared_libs: [
"libvpl",
"liblog",
"libva",
],

cflags: [
"-std=c++14",
"-Wall",
"-fexceptions",
"-Wno-unused-variable",
"-Wmissing-field-initializers",
"-DLIBVA_SUPPORT",
"-DLIBVA_ANDROID_SUPPORT",
"-DONEVPL_EXPERIMENTAL",
"-D_FORTIFY_SOURCE=2",
"-Wno-error",
"-Wno-missing-braces",
"-Wno-missing-field-initializers",
],

vendor: true,
}

cc_binary {

name: "hello-decode",

defaults: [
"hello-defaults",
],

srcs: [
"api2x/hello-decode/src/hello-decode.cpp",
],
}

cc_binary {

name: "hello-encode",

defaults: [
"hello-defaults",
],

srcs: [
"api2x/hello-encode/src/hello-encode.cpp",
],
}

cc_binary {

name: "hello-vpp",

defaults: [
"hello-defaults",
],

srcs: [
"api2x/hello-vpp/src/hello-vpp.cpp",
],
}

2 changes: 1 addition & 1 deletion examples/api1x_core/legacy-decode/src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum {

#ifdef LIBVA_SUPPORT
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#endif

#define WAIT_100_MILLISECONDS 100
Expand Down
2 changes: 1 addition & 1 deletion examples/api1x_core/legacy-encode/src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum {

#ifdef LIBVA_SUPPORT
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#endif

#define WAIT_100_MILLISECONDS 100
Expand Down
2 changes: 1 addition & 1 deletion examples/api1x_core/legacy-vpp/src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum {

#ifdef LIBVA_SUPPORT
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#endif

#define WAIT_100_MILLISECONDS 100
Expand Down
2 changes: 1 addition & 1 deletion examples/api2x/hello-decode/src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum {

#ifdef LIBVA_SUPPORT
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#endif

#define WAIT_100_MILLISECONDS 100
Expand Down
2 changes: 1 addition & 1 deletion examples/api2x/hello-decvpp/src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum {

#ifdef LIBVA_SUPPORT
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#endif

#define WAIT_100_MILLISECONDS 100
Expand Down
2 changes: 1 addition & 1 deletion examples/api2x/hello-encode/src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum {

#ifdef LIBVA_SUPPORT
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#endif

#define WAIT_100_MILLISECONDS 100
Expand Down
2 changes: 1 addition & 1 deletion examples/api2x/hello-sharing-vaapi/include/device-vaapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <fcntl.h>
#include <unistd.h>
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#include "va/va_drmcommon.h"

#include "vpl/mfx.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/api2x/hello-transcode/src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum {

#ifdef LIBVA_SUPPORT
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#endif

#define WAIT_100_MILLISECONDS 100
Expand Down
2 changes: 1 addition & 1 deletion examples/api2x/hello-vpp/src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum {

#ifdef LIBVA_SUPPORT
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#endif

#define WAIT_100_MILLISECONDS 100
Expand Down
2 changes: 1 addition & 1 deletion examples/interop/vpl-infer/src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ enum {

#ifdef LIBVA_SUPPORT
#include "va/va.h"
#include "va/va_drm.h"
#include "va//drm/va_drm.h"
#endif

#define WAIT_100_MILLISECONDS 100
Expand Down

0 comments on commit 6aee4e1

Please sign in to comment.