Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libva
Commits
7ce4ebf0
Commit
7ce4ebf0
authored
May 11, 2010
by
Ren Zhaohan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into libva-1.1
parents
9f1afd58
bed76379
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
106 additions
and
5 deletions
+106
-5
va/Android.mk
va/Android.mk
+27
-4
va/va_backend_tpi.h
va/va_backend_tpi.h
+19
-0
va/va_tpi.c
va/va_tpi.c
+42
-0
va/va_tpi.h
va/va_tpi.h
+18
-1
No files found.
va/Android.mk
View file @
7ce4ebf0
# For libva_android
# =====================================================
LOCAL_PATH
:=
$(
call
my-dir
)
LOCAL_PATH
:=
$(
call
my-dir
)
LIBVA_MINOR_VERSION
:=
31
LIBVA_MINOR_VERSION
:=
31
...
@@ -15,10 +18,8 @@ LOCAL_CFLAGS += -DHAVE_CONFIG_H \
...
@@ -15,10 +18,8 @@ LOCAL_CFLAGS += -DHAVE_CONFIG_H \
-DANDROID
\
-DANDROID
\
LOCAL_C_INCLUDES
+=
\
LOCAL_C_INCLUDES
+=
\
$(TOPDIR)
kernel/include
\
$(TARGET_OUT_HEADERS)
/libva
\
$(TARGET_OUT_HEADERS)
/libva
\
$(LOCAL_PATH)
/x11
\
$(LOCAL_PATH)
/x11
$(TOPDIR)
kernel/include/drm
LOCAL_CXX
:=
g++
LOCAL_CXX
:=
g++
...
@@ -37,4 +38,26 @@ LOCAL_SHARED_LIBRARIES := libdl libdrm libcutils
...
@@ -37,4 +38,26 @@ LOCAL_SHARED_LIBRARIES := libdl libdrm libcutils
include
$(BUILD_SHARED_LIBRARY)
include
$(BUILD_SHARED_LIBRARY)
include
$(call all-makefiles-under,$(LOCAL_PATH))
# For libva_android_tpi
# =====================================================
include
$(CLEAR_VARS)
LOCAL_SRC_FILES
:=
\
va_tpi.c
\
LOCAL_C_INCLUDES
+=
\
$(TARGET_OUT_HEADERS)
/libva
\
LOCAL_COPY_HEADERS_TO
:=
libva/va
LOCAL_COPY_HEADERS
:=
\
va.h
\
va_backend.h
\
va_backend_tpi.h
LOCAL_MODULE
:=
libva_android_tpi
include
$(BUILD_SHARED_LIBRARY)
va/va_backend_tpi.h
View file @
7ce4ebf0
...
@@ -50,6 +50,25 @@ struct VADriverVTableTPI
...
@@ -50,6 +50,25 @@ struct VADriverVTableTPI
struct
v4l2_buffer
*
v4l2_buf
,
/* V4L2 buffer */
struct
v4l2_buffer
*
v4l2_buf
,
/* V4L2 buffer */
VASurfaceID
*
surface
/* out */
VASurfaceID
*
surface
/* out */
);
);
VAStatus
(
*
vaPutSurfaceBuf
)
(
VADisplay
dpy
,
VASurfaceID
surface
,
unsigned
int
draw
,
/* Android Surface/Window */
unsigned
char
*
data
,
int
*
data_len
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
VARectangle
*
cliprects
,
/* client supplied clip list */
unsigned
int
number_cliprects
,
/* number of clip rects in the clip list */
unsigned
int
flags
/* de-interlacing flags */
);
};
};
...
...
va/va_tpi.c
View file @
7ce4ebf0
...
@@ -39,6 +39,16 @@
...
@@ -39,6 +39,16 @@
#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; }
#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; }
#ifdef ANDROID
#define Drawable unsigned int
#endif
static
int
vaDisplayIsValid
(
VADisplay
dpy
)
{
VADisplayContextP
pDisplayContext
=
(
VADisplayContextP
)
dpy
;
return
pDisplayContext
&&
(
pDisplayContext
->
vadpy_magic
==
VA_DISPLAY_MAGIC
)
&&
pDisplayContext
->
vaIsValid
(
pDisplayContext
);
}
/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear
/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear
* and VA encode. With frame_id, VA driver need to call CI interfaces to get the information
* and VA encode. With frame_id, VA driver need to call CI interfaces to get the information
* of the frame, and to determine if the frame can be wrapped as a VA surface
* of the frame, and to determine if the frame can be wrapped as a VA surface
...
@@ -97,3 +107,35 @@ VAStatus vaCreateSurfaceFromV4L2Buf(
...
@@ -97,3 +107,35 @@ VAStatus vaCreateSurfaceFromV4L2Buf(
}
else
}
else
return
VA_STATUS_ERROR_UNIMPLEMENTED
;
return
VA_STATUS_ERROR_UNIMPLEMENTED
;
}
}
VAStatus
vaPutSurfaceBuf
(
VADisplay
dpy
,
VASurfaceID
surface
,
Drawable
draw
,
/* Android Surface/Window */
unsigned
char
*
data
,
int
*
data_len
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
VARectangle
*
cliprects
,
/* client supplied clip list */
unsigned
int
number_cliprects
,
/* number of clip rects in the clip list */
unsigned
int
flags
/* de-interlacing flags */
)
{
VADriverContextP
ctx
;
struct
VADriverVTableTPI
*
tpi
;
CHECK_DISPLAY
(
dpy
);
ctx
=
CTX
(
dpy
);
tpi
=
(
struct
VADriverVTableTPI
*
)
ctx
->
vtable_tpi
;
if
(
tpi
&&
tpi
->
vaPutSurfaceBuf
)
{
return
tpi
->
vaPutSurfaceBuf
(
ctx
,
surface
,
draw
,
data
,
data_len
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
,
cliprects
,
number_cliprects
,
flags
);
}
else
return
VA_STATUS_ERROR_UNIMPLEMENTED
;
}
va/va_tpi.h
View file @
7ce4ebf0
...
@@ -46,4 +46,21 @@ VAStatus vaCreateSurfaceFromV4L2Buf(
...
@@ -46,4 +46,21 @@ VAStatus vaCreateSurfaceFromV4L2Buf(
VASurfaceID
*
surface
/* out */
VASurfaceID
*
surface
/* out */
);
);
VAStatus
vaPutSurfaceBuf
(
VADisplay
dpy
,
VASurfaceID
surface
,
Drawable
draw
,
/* Android Surface/Window */
unsigned
char
*
data
,
int
*
data_len
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
VARectangle
*
cliprects
,
/* client supplied clip list */
unsigned
int
number_cliprects
,
/* number of clip rects in the clip list */
unsigned
int
flags
/* de-interlacing flags */
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment