2012-03-29 17 views
27

Şu anda Android 4.0'da OpenMAX aracılığıyla Kameraya nasıl erişeceğimi anlamaya çalışıyorum. Dokümantasyon benim için yeterli değil, şu anda aşağıdaki çağrı için doğru XADataSource'u nasıl alabileceğim ile mücadele ediyorum.Android'de OpenMAX üzerinden kameraya erişme

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

Ve bana sadece kullanmak Java yedek lütfen - "cevaplar".

cevap

4

Bu

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

Alanlar şunlardır http://www.khronos.org/registry/omxal/specs/OpenMAX_AL_1_1_Specification.pdf alınan temelde XADataSource bir tanımı şöyledir:

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 

daha iyi biçimlendirmek, ama yine eğer bu belgeyi kontrol etmek öneremediğini Maalesef Bunu zaten yapmadım.

+0

Üzgünüm, bunun bana nasıl yardımcı olduğunu göremiyorum. – abergmeier

İlgili konular