2012-03-29 15 views
27

Obecnie próbuję dowiedzieć się, jak uzyskać dostęp do kamery przez OpenMAX w systemie Android 4.0. Dokumentacja jest dla mnie niewystarczająca, dlatego obecnie borykam się z tym, jak mogę uzyskać poprawne XADataSource dla następującego połączenia.Dostęp do kamery przez OpenMAX w Androidzie

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

I proszę oszczędzić mi prostu użyć Java - "odpowiedź".

Odpowiedz

4

Jest to po prostu definicja XADataSource, zaczerpnięte z http://www.khronos.org/registry/omxal/specs/OpenMAX_AL_1_1_Specification.pdf

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

Obszary obejmują:

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 

Niestety nie mógł sformatować go lepiej, ale proponuję, aby sprawdzić, czy dokument, w każdym razie jeśli ciebie jeszcze tego nie zrobiłem.

+0

Niestety, nie rozumiem, w jaki sposób mi to pomaga. – abergmeier

Powiązane problemy