问题描述
我要寻找的树莓派的解码视频的例子,直接的,不使用的OpenMAX。
I am looking for an example of decoding video on Raspberry Pi directly, without using OpenMAX.
这解释了多媒体软件的不同层:
This explains the different layers of multimedia software:
有是未在这里示出的附加的层,包含了上述的一切源(橙色和绿色的盒子;源VCHIQ本身,对VCHIQ,也OpenGL和EGL的实现,...)之上的OpenMAX IL实现。因此在理论上它应该是足够的上手。的问题是,它是高度非显而易见如何使用它,即使一个非常熟悉的OpenMAX并与一般多媒体框架
This github repository: https://github.com/raspberrypi/userland/ contains the source for everything shown above (the orange and green boxes; source for VCHIQ itself, OpenMAX IL implementation on top of VCHIQ, also OpenGL and EGL implementations, ...). So in theory it should be enough to get started. The problem is that it is highly non-obvious how to use it, even if one is very familiar with OpenMAX and with multimedia frameworks in general.
例如:vchiq_bulk_transmit()似乎是一个将用于发送视频到去codeR的功能。但如何初始化类型的第一个参数 VCHIQ_SERVICE_HANDLE_T
?在哪里,结果去了,在帧缓冲区,或在一个结果句柄,还是...?
For example: vchiq_bulk_transmit() seems to be the function that one would use to send video to the decoder. But how to initialize the first argument of type VCHIQ_SERVICE_HANDLE_T
? Where do the results go, in the framebuffer, or in a result handle, or... ?
的修改的赏金可以通过或者使用vchiq,一个API演练,显示调用序列(即使不是工作的例子),或提供的视频去code的工作示例收集指针足够的文件写这个。工作示例将获得高额奖金外:)
EDIT The bounty can be collected by either providing a working example of video decode using vchiq, an API walkthrough that shows the calling sequence (even though not a working example) or a pointer to sufficient documentation to write this. A working example will get a hefty extra bounty :)
推荐答案
我没有工作的例子,但我有一个API演练。的排序.. 的
I don't have a working example, but I have an API walkthrough. Sort of..
链接到完整的源代码code
我发现下面的函数,演示如何调用 vchiq_bulk_transmit
I found the following function that demonstrate how you can call vchiq_bulk_transmit
int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle,
void *data_src,
uint32_t data_size,
VCHI_FLAGS_T flags,
void *bulk_handle)
{
SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
..
status = vchiq_bulk_transmit(service->handle, data_src,
data_size, bulk_handle, mode);
..
return vchiq_status_to_vchi(status);
}
EXPORT_SYMBOL(vchi_bulk_queue_transmit);
有一个函数来创建 VCHI_SERVICE_HANDLE_T
int32_t vchi_service_create(VCHI_INSTANCE_T instance_handle,
SERVICE_CREATION_T *setup,
VCHI_SERVICE_HANDLE_T *handle)
{
VCHIQ_INSTANCE_T instance = (VCHIQ_INSTANCE_T)instance_handle;
SHIM_SERVICE_T *service = service_alloc(instance, setup);
*handle = (VCHI_SERVICE_HANDLE_T)service;
..
return (service != NULL) ? 0 : -1;
}
EXPORT_SYMBOL(vchi_service_create);
但你需要一个 VCHI_INSTANCE_T
可以在这里初始化
int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle)
{
VCHIQ_INSTANCE_T instance;
VCHIQ_STATUS_T status;
status = vchiq_initialise(&instance);
*instance_handle = (VCHI_INSTANCE_T)instance;
return vchiq_status_to_vchi(status);
}
EXPORT_SYMBOL(vchi_initialise);
这篇关于德美元树莓派C $ C视频,而无需使用的OpenMAX?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!