Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Copyright (c) 2009 Intel Corporation. All Rights Reserved.
  3.  *
  4.  * Permission is hereby granted, free of charge, to any person obtaining a
  5.  * copy of this software and associated documentation files (the
  6.  * "Software"), to deal in the Software without restriction, including
  7.  * without limitation the rights to use, copy, modify, merge, publish,
  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
  10.  * the following conditions:
  11.  *
  12.  * The above copyright notice and this permission notice (including the
  13.  * next paragraph) shall be included in all copies or substantial portions
  14.  * of the Software.
  15.  *
  16.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  17.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  18.  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
  19.  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
  20.  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  21.  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  22.  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23.  */
  24.  
  25. #ifndef VA_TRACE_H
  26. #define VA_TRACE_H
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32. extern int trace_flag;
  33.  
  34. #define VA_TRACE_FLAG_LOG             0x1
  35. #define VA_TRACE_FLAG_BUFDATA         0x2
  36. #define VA_TRACE_FLAG_CODEDBUF        0x4
  37. #define VA_TRACE_FLAG_SURFACE_DECODE  0x8
  38. #define VA_TRACE_FLAG_SURFACE_ENCODE  0x10
  39. #define VA_TRACE_FLAG_SURFACE_JPEG    0x20
  40. #define VA_TRACE_FLAG_SURFACE         (VA_TRACE_FLAG_SURFACE_DECODE | \
  41.                                        VA_TRACE_FLAG_SURFACE_ENCODE | \
  42.                                        VA_TRACE_FLAG_SURFACE_JPEG)
  43.  
  44. #define VA_TRACE_LOG(trace_func,...)            \
  45.     if (trace_flag & VA_TRACE_FLAG_LOG) {       \
  46.         trace_func(__VA_ARGS__);                \
  47.     }
  48. #define VA_TRACE_ALL(trace_func,...)            \
  49.     if (trace_flag) {                           \
  50.         trace_func(__VA_ARGS__);                \
  51.     }
  52.  
  53. DLL_HIDDEN
  54. void va_TraceInit(VADisplay dpy);
  55. DLL_HIDDEN
  56. void va_TraceEnd(VADisplay dpy);
  57.  
  58. DLL_HIDDEN
  59. void va_TraceInitialize (
  60.     VADisplay dpy,
  61.     int *major_version,  /* out */
  62.     int *minor_version   /* out */
  63. );
  64.  
  65. DLL_HIDDEN
  66. void va_TraceTerminate (
  67.     VADisplay dpy
  68. );
  69.  
  70. DLL_HIDDEN
  71. void va_TraceCreateConfig(
  72.     VADisplay dpy,
  73.     VAProfile profile,
  74.     VAEntrypoint entrypoint,
  75.     VAConfigAttrib *attrib_list,
  76.     int num_attribs,
  77.     VAConfigID *config_id /* out */
  78. );
  79.  
  80. DLL_HIDDEN
  81. void va_TraceCreateSurfaces(
  82.     VADisplay dpy,
  83.     int width,
  84.     int height,
  85.     int format,
  86.     int num_surfaces,
  87.     VASurfaceID *surfaces,      /* out */
  88.     VASurfaceAttrib    *attrib_list,
  89.     unsigned int        num_attribs
  90. );
  91.  
  92. DLL_HIDDEN
  93. void va_TraceDestroySurfaces(
  94.     VADisplay dpy,
  95.     VASurfaceID *surface_list,
  96.     int num_surfaces
  97. );
  98.  
  99. DLL_HIDDEN
  100. void va_TraceCreateContext(
  101.     VADisplay dpy,
  102.     VAConfigID config_id,
  103.     int picture_width,
  104.     int picture_height,
  105.     int flag,
  106.     VASurfaceID *render_targets,
  107.     int num_render_targets,
  108.     VAContextID *context                /* out */
  109. );
  110.  
  111. DLL_HIDDEN
  112. void va_TraceCreateBuffer (
  113.     VADisplay dpy,
  114.     VAContextID context,        /* in */
  115.     VABufferType type,          /* in */
  116.     unsigned int size,          /* in */
  117.     unsigned int num_elements,  /* in */
  118.     void *data,                 /* in */
  119.     VABufferID *buf_id          /* out */
  120. );
  121.  
  122. DLL_HIDDEN
  123. void va_TraceDestroyBuffer (
  124.     VADisplay dpy,
  125.     VABufferID buf_id    /* in */
  126. );
  127.  
  128. DLL_HIDDEN
  129. void va_TraceMapBuffer (
  130.     VADisplay dpy,
  131.     VABufferID buf_id,  /* in */
  132.     void **pbuf         /* out */
  133. );
  134.  
  135.  
  136. DLL_HIDDEN
  137. void va_TraceBeginPicture(
  138.     VADisplay dpy,
  139.     VAContextID context,
  140.     VASurfaceID render_target
  141. );
  142.  
  143. DLL_HIDDEN
  144. void va_TraceRenderPicture(
  145.     VADisplay dpy,
  146.     VAContextID context,
  147.     VABufferID *buffers,
  148.     int num_buffers
  149. );
  150.  
  151. DLL_HIDDEN
  152. void va_TraceEndPicture(
  153.     VADisplay dpy,
  154.     VAContextID context,
  155.     int endpic_done
  156. );
  157.  
  158. DLL_HIDDEN
  159. void va_TraceSyncSurface(
  160.     VADisplay dpy,
  161.     VASurfaceID render_target
  162. );
  163.  
  164. DLL_HIDDEN
  165. void va_TraceQuerySurfaceAttributes(
  166.     VADisplay           dpy,
  167.     VAConfigID          config,
  168.     VASurfaceAttrib    *attrib_list,
  169.     unsigned int       *num_attribs
  170. );
  171.  
  172. DLL_HIDDEN
  173. void va_TraceQuerySurfaceStatus(
  174.     VADisplay dpy,
  175.     VASurfaceID render_target,
  176.     VASurfaceStatus *status     /* out */
  177. );
  178.  
  179. DLL_HIDDEN
  180. void va_TraceQuerySurfaceError(
  181.         VADisplay dpy,
  182.         VASurfaceID surface,
  183.         VAStatus error_status,
  184.         void **error_info /*out*/
  185. );
  186.  
  187.  
  188. DLL_HIDDEN
  189. void va_TraceMaxNumDisplayAttributes (
  190.     VADisplay dpy,
  191.     int number
  192. );
  193.  
  194. DLL_HIDDEN
  195. void va_TraceQueryDisplayAttributes (
  196.     VADisplay dpy,
  197.     VADisplayAttribute *attr_list,      /* out */
  198.     int *num_attributes                 /* out */
  199. );
  200.  
  201. DLL_HIDDEN
  202. void va_TraceGetDisplayAttributes (
  203.     VADisplay dpy,
  204.     VADisplayAttribute *attr_list,
  205.     int num_attributes
  206. );
  207.  
  208. DLL_HIDDEN
  209. void va_TraceSetDisplayAttributes (
  210.     VADisplay dpy,
  211.     VADisplayAttribute *attr_list,
  212.     int num_attributes
  213. );
  214.  
  215. /* extern function called by display side */
  216. void va_TracePutSurface (
  217.     VADisplay dpy,
  218.     VASurfaceID surface,
  219.     void *draw, /* the target Drawable */
  220.     short srcx,
  221.     short srcy,
  222.     unsigned short srcw,
  223.     unsigned short srch,
  224.     short destx,
  225.     short desty,
  226.     unsigned short destw,
  227.     unsigned short desth,
  228.     VARectangle *cliprects, /* client supplied clip list */
  229.     unsigned int number_cliprects, /* number of clip rects in the clip list */
  230.     unsigned int flags /* de-interlacing flags */
  231. );
  232.  
  233. #ifdef __cplusplus
  234. }
  235. #endif
  236.    
  237.  
  238. #endif /* VA_TRACE_H */
  239.