Debug
This commit is contained in:
parent
f2c1852274
commit
fd909b839b
9
device.c
9
device.c
|
@ -152,7 +152,14 @@ mp_device_close(MPDevice *device)
|
|||
|
||||
bool
|
||||
mp_device_setup_link(MPDevice *device, uint32_t source_pad_id, uint32_t sink_pad_id,
|
||||
bool enabled)
|
||||
bool enabled)
|
||||
{
|
||||
return mp_device_setup_link_ext(device, source_pad_id, 0 , sink_pad_id, 0, enabled);
|
||||
}
|
||||
|
||||
bool
|
||||
mp_device_setup_link_ext(MPDevice *device, uint32_t source_pad_id, uint32_t source_pad_idx,
|
||||
uint32_t sink_pad_id, uint32_t sink_pad_idx, bool enabled)
|
||||
{
|
||||
const struct media_v2_pad *source_pad =
|
||||
mp_device_get_pad(device, source_pad_id);
|
||||
|
|
3
device.h
3
device.h
|
@ -17,6 +17,9 @@ void mp_device_close(MPDevice *device);
|
|||
|
||||
bool mp_device_setup_link(MPDevice *device, uint32_t source_pad_id,
|
||||
uint32_t sink_pad_id, bool enabled);
|
||||
bool mp_device_setup_link_ext(MPDevice *device, uint32_t source_pad_id,
|
||||
uint32_t source_pad_idx, uint32_t sink_pad_id,
|
||||
uint32_t sink_pad_idx, bool enabled);
|
||||
|
||||
const struct media_device_info *mp_device_get_info(const MPDevice *device);
|
||||
const struct media_v2_entity *mp_device_find_entity(const MPDevice *device,
|
||||
|
|
|
@ -42,9 +42,6 @@ struct camera_info {
|
|||
// char video_dev_fname[260];
|
||||
// int media_fd;
|
||||
|
||||
// struct mp_media_link media_links[MP_MAX_LINKS];
|
||||
// int num_media_links;
|
||||
|
||||
// int gain_ctrl;
|
||||
};
|
||||
|
||||
|
@ -177,6 +174,11 @@ setup_camera(MPDeviceList **device_list, const struct mp_camera_config *config)
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Optionally set up media graph
|
||||
for (int link=0; link<camera->num_media_links; link++) {
|
||||
g_printerr("Setup link %d:\n", link);
|
||||
}
|
||||
|
||||
info->fd = open(info->dev_fname, O_RDWR);
|
||||
if (info->fd == -1) {
|
||||
g_printerr("Could not open %s: %s\n", info->dev_fname, strerror(errno));
|
||||
|
|
Loading…
Reference in New Issue