2012-03-29 27 views
27

Tôi hiện đang cố gắng tìm hiểu cách truy cập Máy ảnh qua OpenMAX trong Android 4.0. Tài liệu không đủ cho tôi vì vậy tôi hiện đang đấu tranh với cách tôi có thể truy xuất chính xác XADataSource cho cuộc gọi sau.Truy cập máy ảnh qua OpenMAX trong Android

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

Và làm ơn tha cho tôi những chỉ cần sử dụng Java - "câu trả lời".

Trả lời

4

này về cơ bản là một định nghĩa của XADataSource, lấy từ http://www.khronos.org/registry/omxal/specs/OpenMAX_AL_1_1_Specification.pdf

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

Fields bao gồm:

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 

Xin lỗi không thể định dạng nó tốt hơn, nhưng tôi đề nghị để kiểm tra tài liệu đó anyway nếu bạn chưa làm điều đó.

+0

Xin lỗi, tôi không thấy cách điều này giúp tôi. – abergmeier

Các vấn đề liên quan