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

Side by Side Diff: third_party/libva/va/va_backend.h

Issue 62273006: Update libva headers to the latest release (1.2.1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: remove two header files, fix comment style Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2007 Intel Corporation. All Rights Reserved. 2 * Copyright (c) 2007 Intel Corporation. All Rights Reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the 5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including 6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish, 7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to 8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to 9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions: 10 * the following conditions:
(...skipping 17 matching lines...) Expand all
28 28
29 #ifndef _VA_BACKEND_H_ 29 #ifndef _VA_BACKEND_H_
30 #define _VA_BACKEND_H_ 30 #define _VA_BACKEND_H_
31 31
32 #include <va/va.h> 32 #include <va/va.h>
33 #include <linux/videodev2.h> 33 #include <linux/videodev2.h>
34 34
35 typedef struct VADriverContext *VADriverContextP; 35 typedef struct VADriverContext *VADriverContextP;
36 typedef struct VADisplayContext *VADisplayContextP; 36 typedef struct VADisplayContext *VADisplayContextP;
37 37
38 /** \brief VA display types. */
39 enum {
40 /** \brief Mask to major identifier for VA display type. */
41 VA_DISPLAY_MAJOR_MASK = 0xf0,
42
43 /** \brief VA/X11 API is used, through vaGetDisplay() entry-point. */
44 VA_DISPLAY_X11 = 0x10,
45 /** \brief VA/GLX API is used, through vaGetDisplayGLX() entry-point. */
46 VA_DISPLAY_GLX = (VA_DISPLAY_X11 | (1 << 0)),
47 /** \brief VA/Android API is used, through vaGetDisplay() entry-point. */
48 VA_DISPLAY_ANDROID = 0x20,
49 /** \brief VA/DRM API is used, through vaGetDisplayDRM() entry-point. */
50 VA_DISPLAY_DRM = 0x30,
51 /** \brief VA/Wayland API is used, through vaGetDisplayWl() entry-point. */
52 VA_DISPLAY_WAYLAND = 0x40,
53 };
54
38 struct VADriverVTable 55 struct VADriverVTable
39 { 56 {
40 VAStatus (*vaTerminate) ( VADriverContextP ctx ); 57 VAStatus (*vaTerminate) ( VADriverContextP ctx );
41 58
42 VAStatus (*vaQueryConfigProfiles) ( 59 VAStatus (*vaQueryConfigProfiles) (
43 VADriverContextP ctx, 60 VADriverContextP ctx,
44 VAProfile *profile_list, /* out */ 61 VAProfile *profile_list, /* out */
45 int *num_profiles /* out */ 62 int *num_profiles /* out */
46 ); 63 );
47 64
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 */ 384 */
368 void **buffer /* if it is not NULL, map the surface buffer for 385 void **buffer /* if it is not NULL, map the surface buffer for
369 * CPU access 386 * CPU access
370 */ 387 */
371 ); 388 );
372 389
373 VAStatus (*vaUnlockSurface) ( 390 VAStatus (*vaUnlockSurface) (
374 VADriverContextP ctx, 391 VADriverContextP ctx,
375 VASurfaceID surface 392 VASurfaceID surface
376 ); 393 );
394
395 /* DEPRECATED */
396 VAStatus
397 (*vaGetSurfaceAttributes)(
398 VADriverContextP dpy,
399 VAConfigID config,
400 VASurfaceAttrib *attrib_list,
401 unsigned int num_attribs
402 );
403
404 VAStatus
405 (*vaCreateSurfaces2)(
406 VADriverContextP ctx,
407 unsigned int format,
408 unsigned int width,
409 unsigned int height,
410 VASurfaceID *surfaces,
411 unsigned int num_surfaces,
412 VASurfaceAttrib *attrib_list,
413 unsigned int num_attribs
414 );
415
416 VAStatus
417 (*vaQuerySurfaceAttributes)(
418 VADriverContextP dpy,
419 VAConfigID config,
420 VASurfaceAttrib *attrib_list,
421 unsigned int *num_attribs
422 );
377 }; 423 };
378 424
379 struct VADriverContext 425 struct VADriverContext
380 { 426 {
381 void *pDriverData; 427 void *pDriverData;
382 428
383 /** 429 /**
384 * The core VA implementation hooks. 430 * The core VA implementation hooks.
385 * 431 *
386 * This structure is allocated from libva with calloc(). 432 * This structure is allocated from libva with calloc().
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 int version_minor; 466 int version_minor;
421 int max_profiles; 467 int max_profiles;
422 int max_entrypoints; 468 int max_entrypoints;
423 int max_attributes; 469 int max_attributes;
424 int max_image_formats; 470 int max_image_formats;
425 int max_subpic_formats; 471 int max_subpic_formats;
426 int max_display_attributes; 472 int max_display_attributes;
427 const char *str_vendor; 473 const char *str_vendor;
428 474
429 void *handle; /* dlopen handle */ 475 void *handle; /* dlopen handle */
430 476
431 void *dri_state; 477 /**
478 * \brief DRM state.
479 *
480 * This field holds driver specific data for DRM-based
481 * drivers. This structure is allocated from libva with
482 * calloc(). Do not deallocate from within VA driver
483 * implementations.
484 *
485 * All structures shall be derived from struct drm_state. So, for
486 * instance, this field holds a dri_state structure for VA/X11
487 * drivers that use the DRM protocol.
488 */
489 void *drm_state;
490
432 void *glx; /* opaque for GLX code */ 491 void *glx; /* opaque for GLX code */
433 void *egl; 492
434 unsigned long reserved[44]; /* reserve for future add-ins, decrease the subscript accordingly */ 493 /** \brief VA display type. */
494 unsigned long display_type;
495
496 /**
497 * The VA/Wayland implementation hooks.
498 *
499 * This structure is intended for drivers that implement the
500 * VA/Wayland API. libVA allocates this structure with calloc()
501 * and owns the resulting memory.
502 */
503 struct VADriverVTableWayland *vtable_wayland;
504
505 /**
506 * \brief The VA/VPP implementation hooks.
507 *
508 * This structure is allocated from libva with calloc().
509 */
510 struct VADriverVTableVPP *vtable_vpp;
511
512 unsigned long reserved[42]; /* reserve for future add-ins, decrease the subscript accordingly */
435 }; 513 };
436 514
437 #define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */ 515 #define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */
438 struct VADisplayContext 516 struct VADisplayContext
439 { 517 {
440 int vadpy_magic; 518 int vadpy_magic;
441 519
442 VADisplayContextP pNext; 520 VADisplayContextP pNext;
443 VADriverContextP pDriverContext; 521 VADriverContextP pDriverContext;
444 522
445 int (*vaIsValid) ( 523 int (*vaIsValid) (
446 VADisplayContextP ctx 524 VADisplayContextP ctx
447 ); 525 );
448 526
449 void (*vaDestroy) ( 527 void (*vaDestroy) (
450 VADisplayContextP ctx 528 VADisplayContextP ctx
451 ); 529 );
452 530
453 VAStatus (*vaGetDriverName) ( 531 VAStatus (*vaGetDriverName) (
454 VADisplayContextP ctx, 532 VADisplayContextP ctx,
455 char **driver_name 533 char **driver_name
456 ); 534 );
457 535
458 void *opaque; /* opaque for display extensions (e.g. GLX) */ 536 void *opaque; /* opaque for display extensions (e.g. GLX) */
459
460 VAStatus (*vaCreateNativePixmap) (
461 VADisplayContextP pDisplayContext,
462 unsigned int width,
463 unsigned int height,
464 void **native_pixmap);
465
466 VAStatus (*vaFreeNativePixmap) (
467 VADisplayContextP pDisplayContext,
468 void *native_pixmap);
469 }; 537 };
470 538
471 typedef VAStatus (*VADriverInit) ( 539 typedef VAStatus (*VADriverInit) (
472 VADriverContextP driver_context 540 VADriverContextP driver_context
473 ); 541 );
474 542
475 #endif /* _VA_BACKEND_H_ */ 543 #endif /* _VA_BACKEND_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698