[PATCH v2 3/4] media-ctl: propagate frame interval

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

 



Same as the media bus format, the frame interval should be propagated
from output pads to connected entities' input pads.

Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
 utils/media-ctl/libv4l2subdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index 2f2ac8e..7f9ef48 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -694,8 +694,8 @@ static int v4l2_subdev_parse_setup_format(struct media_device *media,
 		return ret;
 
 
-	/* If the pad is an output pad, automatically set the same format on
-	 * the remote subdev input pads, if any.
+	/* If the pad is an output pad, automatically set the same format and
+	 * frame interval on the remote subdev input pads, if any.
 	 */
 	if (pad->flags & MEDIA_PAD_FL_SOURCE) {
 		for (i = 0; i < pad->entity->num_links; ++i) {
@@ -709,6 +709,10 @@ static int v4l2_subdev_parse_setup_format(struct media_device *media,
 			    link->sink->entity->info.type == MEDIA_ENT_T_V4L2_SUBDEV) {
 				remote_format = format;
 				set_format(link->sink, &remote_format);
+
+				ret = set_frame_interval(link->sink, &interval);
+				if (ret < 0)
+					return ret;
 			}
 		}
 	}
-- 
2.1.4




[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