Re: [PATCH v8 28/36] media: subdev: Add [GS]_ROUTING subdev ioctls and operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 04.10.21 07:15, Tomi Valkeinen wrote:
Hi,

On 03/10/2021 22:52, Dafna Hirschfeld wrote:

+/**
+ * struct v4l2_subdev_route - A route inside a subdev
+ *
+ * @sink_pad: the sink pad index
+ * @sink_stream: the sink stream identifier
+ * @source_pad: the source pad index
+ * @source_stream: the source stream identifier
+ * @flags: route flags V4L2_SUBDEV_ROUTE_FL_*
+ * @reserved: drivers and applications must zero this array
+ */
+struct v4l2_subdev_route {
+    __u32 sink_pad;
+    __u32 sink_stream;
+    __u32 source_pad;
+    __u32 source_stream;
+    __u32 flags;
+    __u32 reserved[5];
+};
+

I don't understand that struct, what is the meaning of the two sink_stream, source_stream fields?
What is the relation between sink_pad and source_pad? A 'route' between two pads means that 'streams' can flow through them?

If I have for example:

sink_pad = sink_stream = 0
source_pad = source_stream = 1

what does that mean?

It means that a stream with stream ID 0 that comes to the subdev's sink pad 0 will be routed to the subdev's source pad 1 with stream ID 1.

So the sink_pad and source_pad tell via which pads the streams flows.

Stream IDs are numbers used to uniquely identify the stream for the specific pad. In other words, for the subdev's pad 0, each stream ID must be unique. That pad 0 is linked (media link) to another subdev's pad, and on that pad there must be streams with the matching IDs.

Ok, so the stream ID for the same stream changes from link to link.

So different streams can have the same ID on different pads?

Won't it be more simple if the stream ID is forced to stay the same along all the links and pads?


  Tomi



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux