【发布时间】:2012-12-21 15:35:27
【问题描述】:
OMX 提供了一个结构如下定义
/* Parameter specifying the content URI to use. */
typedef struct OMX_PARAM_CONTENTURITYPE
{
OMX_U32 nSize;
/**< size of the structure in bytes */
OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
OMX_U8 contentURI[1]; /**< The URI name*/
}OMX_PARAM_CONTENTURITYPE;
OMX_IndexParamContentURI,
/**< The URI that identifies the target content. Data type is OMX_PARAM_CONTENTURITYPE. */
我有一个常量字符数组要设置。
char* filename = "/test.bmp";
据我了解,我需要以某种方式将 memcopy 文件名设置为 struct.contentURI,然后相应地更新 struct.size。我该怎么做?
最好的问候
【问题讨论】:
-
C 还是 C++?任选其一。
-
谷歌'c struct hack'。你会被设置。这个问题一定是骗人的吧?
-
到目前为止您尝试过什么?具体来说,您如何创建(分配)您的 OMX_PARAM_CONTENTURITYPE 实例?展示您的代码可以让我们减少对细节的猜测。
-
卡尔,请写下你的答案作为回复,我可以接受!