libcamera: media_device: Handle ancillary links in populateLinks()

The populateLinks() function can't currently handle ancillary links
which causes an error to be thrown in process() when the MediaObject
cannot be cast to a MediaPad.

Add explicit handling for the different link types, creating either
pad-2-pad links or else storing the pointer to the ancillary device
MediaEntity in the ancillaryEntities_ member of the primary.

Reviewed-by: Laurent Pinchart <>
Signed-off-by: Daniel Scally <>
Reviewed-by: Jean-Michel Hautbois <>
Signed-off-by: Kieran Bingham <>
1 file changed