我正在尝试将内存中的视频缓冲区录制为h.264格式的闪存,并使用此代码初始化录制器。我应该使用哪种格式dataSrc
?
XADataLocator_URI locUri;
locUri.locatorType = XA_DATALOCATOR_URI;
locUri.URI = (XAchar *) "/sdcard/test.ts";
XADataFormat_MIME format_mime = {
XA_DATAFORMAT_MIME, XA_ANDROID_MIME_MP2TS, XA_CONTAINERTYPE_MPEG_TS };
XADataSource dataDst = {&locUri, &format_mime};
XADataSource dataSrc = {&locUri, &format_mime};
XADataSink imageVideoSink = {&dataDst, NULL};
// declare interfaces to use
XAboolean required[NB_MAXAL_INTERFACES]
= {XA_BOOLEAN_TRUE, XA_BOOLEAN_TRUE, XA_BOOLEAN_TRUE};
XAInterfaceID iidArray[NB_MAXAL_INTERFACES]
= {XA_IID_RECORD, XA_IID_ANDROIDBUFFERQUEUESOURCE,
XA_IID_STREAMINFORMATION};
res = (*engineEngine)->CreateMediaRecorder(engineEngine,
&recorderObj,
NULL,
&dataSrc,
&imageVideoSink,
NB_MAXAL_INTERFACES /*XAuint32 numInterfaces*/,
iidArray /*const XAInterfaceID *pInterfaceIds*/,
required /*const XAboolean *pInterfaceRequired*/);
assert(XA_RESULT_SUCCESS == res);