I am looking for an example of decoding video on Raspberry Pi directly, without using OpenMAX.
This explains the different layers of multimedia software:
I don't have a working example, but I have an API walkthrough. Sort of..
Link to the full source code
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);
There is a function to create 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);
But you need a VCHI_INSTANCE_T
which can be initialized here
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);