hardware/intel/common/libva
修订版 | aa676947915a8fe0351e6537acbebaa9a1929e24 (tree) |
---|---|
时间 | 2009-06-20 03:17:40 |
作者 | Austin Yuan <shengquan.yuan@inte...> |
Commiter | Austin Yuan |
Added more comments for vaCreateBufferFromV4L2Buffer
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
@@ -1224,7 +1224,14 @@ VAStatus vaSetDisplayAttributes ( | ||
1224 | 1224 | return ctx->vtable.vaSetDisplayAttributes ( ctx, attr_list, num_attributes ); |
1225 | 1225 | } |
1226 | 1226 | |
1227 | - | |
1227 | +/* Wrap a CI (camera imaging) frame as a VA surface to share captured video between camear | |
1228 | + * and VA encode. With frame_id, VA driver need to call CI interfaces to get the information | |
1229 | + * of the frame, and to determine if the frame can be wrapped as a VA surface | |
1230 | + * | |
1231 | + * Application should make sure the frame is idle before the frame is passed into VA stack | |
1232 | + * and also a vaSyncSurface should be called before application tries to access the frame | |
1233 | + * from CI stack | |
1234 | + */ | |
1228 | 1235 | VAStatus vaCreateSurfaceFromCIFrame ( |
1229 | 1236 | VADisplay dpy, |
1230 | 1237 | unsigned long frame_id, |
@@ -1244,6 +1251,18 @@ VAStatus vaCreateSurfaceFromCIFrame ( | ||
1244 | 1251 | } |
1245 | 1252 | |
1246 | 1253 | |
1254 | +/* Wrap a V4L2 buffer as a VA surface, so that V4L2 camera, VA encode | |
1255 | + * can share the data without copy | |
1256 | + * The VA driver should query the camera device from v4l2_fd to see | |
1257 | + * if camera device memory/buffer can be wrapped into a VA surface | |
1258 | + * Buffer information is passed in by v4l2_fmt and v4l2_buf structure, | |
1259 | + * VA driver also needs do further check if the buffer can meet encode | |
1260 | + * hardware requirement, such as dimension, fourcc, stride, etc | |
1261 | + * | |
1262 | + * Application should make sure the buffer is idle before the frame into VA stack | |
1263 | + * and also a vaSyncSurface should be called before application tries to access the frame | |
1264 | + * from V4L2 stack | |
1265 | + */ | |
1247 | 1266 | VAStatus vaCreateSurfaceFromV4L2Buf( |
1248 | 1267 | VADisplay dpy, |
1249 | 1268 | int v4l2_fd, /* file descriptor of V4L2 device */ |
@@ -1264,6 +1283,10 @@ VAStatus vaCreateSurfaceFromV4L2Buf( | ||
1264 | 1283 | return VA_STATUS_ERROR_UNKNOWN; |
1265 | 1284 | } |
1266 | 1285 | |
1286 | +/* It is a debug interface, and isn't exported in core VAAPI | |
1287 | + * It is used to dump surface data into system memory | |
1288 | + * Application should explicitly call free to release the buffer memory | |
1289 | + */ | |
1267 | 1290 | |
1268 | 1291 | VAStatus vaCopySurfaceToBuffer(VADisplay dpy, |
1269 | 1292 | VASurfaceID surface, |