2012-03-29 11 views
27

मैं वर्तमान में एंड्रॉइड 4.0 में ओपनमैक्स के माध्यम से कैमरे तक पहुंचने का तरीका जानने का प्रयास करता हूं। दस्तावेज मेरे लिए पर्याप्त नहीं है इसलिए मैं वर्तमान में निम्नलिखित कॉल के लिए सही XADataSource पुनर्प्राप्त करने के तरीके के साथ संघर्ष कर रहा हूं।एंड्रॉइड में ओपनमैक्स के माध्यम से एक्सेस कैमरा

(*_engine)->CreateMediaRecorder(_engine, 
           &_mediaRecorder, //pRecorder 
           nullptr, //pAudioSrc 
           XADataSource *, //pImageVideoSrc 
           XADataSink *, //pDataSnk 
           XAuint32, // numInterfaces 
           const XAInterfaceID *, //pInterfaceIds 
           const XAboolean *, //pInterfaceRequired 
); 

और कृपया मुझे छोड़ जावा बस का उपयोग करें - "उत्तर"।

उत्तर

4

यह मूल रूप से, XADataSource की एक परिभाषा है http://www.khronos.org/registry/omxal/specs/OpenMAX_AL_1_1_Specification.pdf से लिया

typedef struct XADataSource_ { 
    void * pLocator; 
    void * pFormat; 
} XADataSource; 

फील्ड्स में शामिल हैं:

Field  Description 
pLocator Pointer to the specified data locator structure. This may point to any of the  following structures. 
    XADataLocator_Address 
    XADataLocator_IODevice 
    XADataLocator_URI 
    XADataLocator_MediaObject 
    XADataLocator_Null 
    XADataLocator_ContentPipe 
The first field of each of these structures includes the 32 bit locatorType field, which identifies 
the locator type (see XA_DATALOCATOR definitions) and hence the structure pointed to. 
Note: The available XA_DATALOCATOR definitions may be extended through an API extension. 

pFormat A pointer to the specified format structure. This may point to any of the following structures. 
    XADataFormat_PCM (Deprecated) 
    XADataFormat_PCM_EX 
    XADataFormat_MIME 
    XADataFormat_RawImage 
The first field of each of these structures includes the 32 bit formatType field, which identifies the 
format type (XA_DATAFORMAT definitions) and hence the structure pointed to. pFormat is ignored 
if pLocator is XADataLocator_IODevice 

क्षमा करें यह बेहतर स्वरूपित नहीं कर सकता है, लेकिन मुझे लगता है कि दस्तावेज़ की जाँच करने के लिए सुझाव वैसे भी अगर आप पहले से ही ऐसा नहीं किया है।

+0

क्षमा करें, मुझे नहीं लगता कि यह मेरी मदद कैसे करता है। – abergmeier

संबंधित मुद्दे