khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.c
changeset 16 43d09473c595
parent 12 5a06f39ad45b
--- a/khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.c	Mon May 03 12:59:52 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaimageencodercapabilitiesitf.c	Fri May 14 16:22:35 2010 +0300
@@ -21,9 +21,7 @@
 #include <string.h>
 #include "xaglobals.h"
 #include "xaimageencodercapabilitiesitf.h"
-#ifdef _GSTREAMER_BACKEND_  
-#include "XAStaticCapsAdaptation.h"
-#endif
+#include "xacapabilitiesmgr.h"  
 /* XAImageEncoderCapabilitiesItfImpl* GetImpl
  * Description: Validate interface pointer and cast it to implementation pointer.
  */
@@ -72,19 +70,20 @@
         else
         {
             /* query capabilities from adaptation using codec id */
-#ifdef _GSTREAMER_BACKEND_  
-            XAStaticCapsData temp;
+  
+            XACapabilities temp;
             memset(pDescriptor,0,sizeof(XAImageCodecDescriptor));
             /* here pEncoderId refers to index rather than codec id */
-            res = XAStaticCapsAdapt_GetCapsByIdx(XACAP_ENCODER|XACAP_IMAGE, *pEncoderId, &temp);
+            res = XACapabilitiesMgr_GetCapsByIdx(NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE), *pEncoderId, &temp);
             if( res == XA_RESULT_SUCCESS )
             {
+                XAImageCodecDescriptor* desc = (XAImageCodecDescriptor*)(&temp.pEntry);
                 /* map applicable values to XAAudioCodecCapabilities */
                 pDescriptor->codecId = temp.xaid;
-                pDescriptor->maxWidth = temp.maxW;
-                pDescriptor->maxHeight = temp.maxH;
+                pDescriptor->maxWidth = desc->maxWidth;
+                pDescriptor->maxHeight = desc->maxHeight;
             }
-#endif
+
         }
     }
 
@@ -113,9 +112,9 @@
     }
     else
     {
-#ifdef _GSTREAMER_BACKEND_
-        res = XAStaticCapsAdapt_QueryColorFormats(pIndex, pColorFormats);
-#endif        
+
+        res = XACapabilitiesMgr_QueryColorFormats(NULL, pIndex, pColorFormats);
+        
     }
     DEBUG_API("<-XAImageEncoderCapabilitiesItfImpl_QueryColorFormats");
     return res;
@@ -142,11 +141,11 @@
         self->itf.QueryColorFormats =
             XAImageEncoderCapabilitiesItfImpl_QueryColorFormats;
 
-#ifdef _GSTREAMER_BACKEND_  
+  
         /* init variables */
-        assert( XAStaticCapsAdapt_GetCapsCount( XACAP_ENCODER|XACAP_IMAGE,
+        assert( XACapabilitiesMgr_GetCapsCount( NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE),
                                   &(self->numCodecs) ) == XA_RESULT_SUCCESS );
-#endif
+
         self->self = self;
     }
     DEBUG_API("<-XAImageEncoderCapabilitiesItfImpl_Create");