khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.c
changeset 21 2ed61feeead6
parent 19 4a629bc82c5e
child 25 6f7ceef7b1d1
equal deleted inserted replaced
20:b67dd1fc57c5 21:2ed61feeead6
    25 #include "xaradiodevice.h"
    25 #include "xaradiodevice.h"
    26 #include "xaoutputmix.h"
    26 #include "xaoutputmix.h"
    27 #include "xamediaplayeradaptctx.h"
    27 #include "xamediaplayeradaptctx.h"
    28 #include "xacameraadaptctx.h"
    28 #include "xacameraadaptctx.h"
    29 #include <stdlib.h>
    29 #include <stdlib.h>
       
    30 
       
    31 #ifdef OMAX_CAMERABIN
    30 extern XAboolean cameraRealized;
    32 extern XAboolean cameraRealized;
       
    33 
    31 extern XACameraAdaptationCtx_* cameraCtx;
    34 extern XACameraAdaptationCtx_* cameraCtx;
       
    35 #else
       
    36 XAboolean cameraRealized = XA_BOOLEAN_FALSE;
       
    37 XACameraAdaptationCtx_* cameraCtx = NULL;
       
    38 #endif
    32 /*
    39 /*
    33  * XAAdaptationGstCtx* XAAdaptationGst_Create()
    40  * XAAdaptationGstCtx* XAAdaptationGst_Create()
    34  * 1st phase initialization function for Adaptation Base context structure.
    41  * 1st phase initialization function for Adaptation Base context structure.
    35  * Reserves memory for base context and initializes GStreamer FW.
    42  * Reserves memory for base context and initializes GStreamer FW.
    36  */
    43  */
   407     XAuint32 locType = 0;
   414     XAuint32 locType = 0;
   408     GstElement* gstSrc = NULL;
   415     GstElement* gstSrc = NULL;
   409     char* fname=NULL;
   416     char* fname=NULL;
   410     XADataLocator_URI* uri = NULL;
   417     XADataLocator_URI* uri = NULL;
   411     XADataLocator_IODevice* ioDevice = NULL;
   418     XADataLocator_IODevice* ioDevice = NULL;
       
   419 #ifdef OMAX_CAMERABIN
   412     XACameraDeviceImpl* cameraDevice = NULL;
   420     XACameraDeviceImpl* cameraDevice = NULL;
       
   421     XAObjectItfImpl* pObj = NULL;
       
   422 #endif
   413     XARadioDeviceImpl* radioDevice = NULL;
   423     XARadioDeviceImpl* radioDevice = NULL;
   414     XAObjectItfImpl* pObj = NULL;
       
   415 
   424 
   416     DEBUG_API("->XAAdaptationGst_CreateGstSource");
   425     DEBUG_API("->XAAdaptationGst_CreateGstSource");
   417     if( !xaSrc || !xaSrc->pLocator || !isobj )
   426     if( !xaSrc || !xaSrc->pLocator || !isobj )
   418     {
   427     {
   419         return NULL;
   428         return NULL;
   487                         gstSrc = gst_element_factory_make("audiotestsrc",name);
   496                         gstSrc = gst_element_factory_make("audiotestsrc",name);
   488                         break;
   497                         break;
   489                     }
   498                     }
   490                     break;
   499                     break;
   491                 }
   500                 }
       
   501 #ifdef OMAX_CAMERABIN
       
   502              
   492                 case XA_IODEVICE_CAMERA:
   503                 case XA_IODEVICE_CAMERA:
   493                 {
   504                 {
   494                     DEBUG_INFO("XA_IODEVICE_CAMERA");
   505                     DEBUG_INFO("XA_IODEVICE_CAMERA");
   495                     if ( ioDevice->device )
   506                     if ( ioDevice->device )
   496                     {   /*source is camera object*/
   507                     {   /*source is camera object*/
   537 							return NULL;
   548 							return NULL;
   538 						}
   549 						}
   539                     }
   550                     }
   540                     break;
   551                     break;
   541                 }
   552                 }
       
   553 #endif                
   542                 case XA_IODEVICE_RADIO:
   554                 case XA_IODEVICE_RADIO:
   543                     DEBUG_INFO("XA_IODEVICE_RADIO");
   555                     DEBUG_INFO("XA_IODEVICE_RADIO");
   544                     if ( ioDevice->device )
   556                     if ( ioDevice->device )
   545                     {
   557                     {
   546                         DEBUG_INFO("Use radio pipeline as source.");
   558                         DEBUG_INFO("Use radio pipeline as source.");