media/capture: Add support for V4L2 MPLANE devices [chromium/src : master]

139 views
Skip to first unread message

Daniel Mack (Gerrit)

unread,
Nov 9, 2017, 7:44:10 AM11/9/17
to amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Aaron Boodman, chromium...@chromium.org, Darin Fisher

This change is ready for review.

View Change

    To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
    Gerrit-Change-Number: 742845
    Gerrit-PatchSet: 1
    Gerrit-Owner: Daniel Mack <zon...@gmail.com>
    Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
    Gerrit-CC: Aaron Boodman <a...@chromium.org>
    Gerrit-CC: Darin Fisher <da...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Nov 2017 12:44:03 +0000
    Gerrit-HasComments: No
    Gerrit-HasLabels: No

    Daniel Mack (Gerrit)

    unread,
    Jan 30, 2018, 4:39:20 PM1/30/18
    to amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Aaron Boodman, chromium...@chromium.org, Darin Fisher

    Could this be reviewed before it doesn't apply anymore, please?

    View Change

      To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-MessageType: comment
      Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
      Gerrit-Change-Number: 742845
      Gerrit-PatchSet: 1
      Gerrit-Owner: Daniel Mack <zon...@gmail.com>
      Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
      Gerrit-CC: Aaron Boodman <a...@chromium.org>
      Gerrit-CC: Darin Fisher <da...@chromium.org>
      Gerrit-Comment-Date: Tue, 30 Jan 2018 21:39:16 +0000
      Gerrit-HasComments: No
      Gerrit-HasLabels: No

      Christian Fremerey (Gerrit)

      unread,
      Jan 30, 2018, 5:03:51 PM1/30/18
      to Daniel Mack, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Aaron Boodman, chromium...@chromium.org, Darin Fisher

      Sorry for the inactivity. You haven't added anyone as reviewer yet, which is probably why it fell off the radar.

      I am not an expert with the V4L2 details, but I can take a look to help review this.

      View Change

        To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
        Gerrit-Change-Number: 742845
        Gerrit-PatchSet: 1
        Gerrit-Owner: Daniel Mack <zon...@gmail.com>
        Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
        Gerrit-CC: Aaron Boodman <a...@chromium.org>
        Gerrit-CC: Darin Fisher <da...@chromium.org>
        Gerrit-Comment-Date: Tue, 30 Jan 2018 22:03:47 +0000
        Gerrit-HasComments: No
        Gerrit-HasLabels: No

        Daniel Mack (Gerrit)

        unread,
        Jan 30, 2018, 5:19:01 PM1/30/18
        to amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Aaron Boodman, chromium...@chromium.org, Darin Fisher

        Patch Set 1:

        Sorry for the inactivity. You haven't added anyone as reviewer yet, which is probably why it fell off the radar.

        I am not an expert with the V4L2 details, but I can take a look to help review this.

        No problem, I just wanted to trigger someone :)

        I didn't add any reviewer because I have no idea who would be suitable. I have no other involvement in the Chromium project at this point and would have hoped this is dispatched to and handled by the respective teams.

        If I can do anything else, please let me know.

        View Change

          To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-MessageType: comment
          Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
          Gerrit-Change-Number: 742845
          Gerrit-PatchSet: 1
          Gerrit-Owner: Daniel Mack <zon...@gmail.com>
          Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
          Gerrit-CC: Aaron Boodman <a...@chromium.org>
          Gerrit-CC: Darin Fisher <da...@chromium.org>
          Gerrit-Comment-Date: Tue, 30 Jan 2018 22:18:59 +0000
          Gerrit-HasComments: No
          Gerrit-HasLabels: No

          Christian Fremerey (Gerrit)

          unread,
          Jan 30, 2018, 5:29:50 PM1/30/18
          to Daniel Mack, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Aaron Boodman, chromium...@chromium.org, Darin Fisher

          Patch Set 1:

          Patch Set 1:

          Sorry for the inactivity. You haven't added anyone as reviewer yet, which is probably why it fell off the radar.

          I am not an expert with the V4L2 details, but I can take a look to help review this.

          No problem, I just wanted to trigger someone :)

          I didn't add any reviewer because I have no idea who would be suitable. I have no other involvement in the Chromium project at this point and would have hoped this is dispatched to and handled by the respective teams.

          If I can do anything else, please let me know.

          Makes sense. No worries.
          The way it typically works is that until a reviewer is assigned, it is assumed that the CL is not yet ready for review and the uploader is still working on it.

          In order to find reviewers, you can look at the OWNER files in the folders (or parent folders) of the files you touched. Since I am an OWNER of media/capture, you can add me as reviewer and click Start Review.

          View Change

            To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-MessageType: comment
            Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
            Gerrit-Change-Number: 742845
            Gerrit-PatchSet: 1
            Gerrit-Owner: Daniel Mack <zon...@gmail.com>
            Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
            Gerrit-CC: Aaron Boodman <a...@chromium.org>
            Gerrit-CC: Darin Fisher <da...@chromium.org>
            Gerrit-Comment-Date: Tue, 30 Jan 2018 22:29:45 +0000
            Gerrit-HasComments: No
            Gerrit-HasLabels: No

            Daniel Mack (Gerrit)

            unread,
            Jan 30, 2018, 5:55:54 PM1/30/18
            to Christian Fremerey, Tommi, Emircan Uysaler, Miguel Casas, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org

            Daniel Mack would like Christian Fremerey, Tommi, Emircan Uysaler and Miguel Casas to review this change.

            View Change

            media/capture: Add support for V4L2 MPLANE devices

            The Linux V4L2 API knows different types of video devices. Single planar
            ones are the most common and are used by all USB cameras, while multiplanar
            types are used by the drivers of some embedded chipsets such as Qualcomm
            Snapdragon.

            Support for multiplanar cameras was once introduced to the code base
            (Issue 441836) but then removed again, most probably accidentially (Issue
            585519).

            This patch brings back support for these types of devices but in a simpler
            way of implementation than the original approach, as all the device
            specific code is kept internal to the V4L2CaptureDelegate class.

            Some static inline functions were turned into class members in order to
            keep the number of parameters low.

            Bug: 768887

            media/capture: register new type LINUX_V4L2_MULTI_PLANE

            This new type will be used for multiplanar video devices exposed by the V4L2
            Linux kernel API.

            [For the lack of multiplanar hardware, this change set was only tested for
            regressions with single plane cameras on x86_64. An equivalent set was used
            against version 56, which is the version currently bundled for Qt's
            QWebEngine 5.9 to confirm the functionality of multi-planar video devices
            on arm64.]

            Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
            ---
            M media/capture/mojo/video_capture_types.mojom
            M media/capture/mojo/video_capture_types_typemap_traits.cc
            M media/capture/video/linux/v4l2_capture_delegate.cc
            M media/capture/video/linux/v4l2_capture_delegate.h
            M media/capture/video/linux/video_capture_device_factory_linux.cc
            M media/capture/video/video_capture_device_descriptor.cc
            M media/capture/video/video_capture_device_descriptor.h
            7 files changed, 184 insertions(+), 73 deletions(-)


            To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-MessageType: newchange
            Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
            Gerrit-Change-Number: 742845
            Gerrit-PatchSet: 1
            Gerrit-Owner: Daniel Mack <zon...@gmail.com>
            Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
            Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
            Gerrit-Reviewer: Emircan Uysaler <emi...@chromium.org>
            Gerrit-Reviewer: Miguel Casas <mca...@chromium.org>
            Gerrit-Reviewer: Tommi <to...@chromium.org>

            Daniel Mack (Gerrit)

            unread,
            Jan 30, 2018, 5:56:37 PM1/30/18
            to amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Emircan Uysaler, Christian Fremerey, Miguel Casas, Tommi, Aaron Boodman, chromium...@chromium.org, Darin Fisher

            In order to find reviewers, you can look at the OWNER files in the folders (or parent folders) of the files you touched. Since I am an OWNER of media/capture, you can add me as reviewer and click Start Review.

            Okay, got it, thanks a bunch!

            View Change

              To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: chromium/src
              Gerrit-Branch: master
              Gerrit-MessageType: comment
              Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
              Gerrit-Change-Number: 742845
              Gerrit-PatchSet: 1
              Gerrit-Owner: Daniel Mack <zon...@gmail.com>
              Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
              Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
              Gerrit-Reviewer: Emircan Uysaler <emi...@chromium.org>
              Gerrit-Reviewer: Miguel Casas <mca...@chromium.org>
              Gerrit-Reviewer: Tommi <to...@chromium.org>
              Gerrit-CC: Aaron Boodman <a...@chromium.org>
              Gerrit-CC: Darin Fisher <da...@chromium.org>
              Gerrit-Comment-Date: Tue, 30 Jan 2018 22:56:26 +0000
              Gerrit-HasComments: No
              Gerrit-HasLabels: No

              Christian Fremerey (Gerrit)

              unread,
              Jan 30, 2018, 6:00:08 PM1/30/18
              to Daniel Mack, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Emircan Uysaler, Miguel Casas, Tommi, Aaron Boodman, chromium...@chromium.org, Darin Fisher

              Patch Set 1:

              In order to find reviewers, you can look at the OWNER files in the folders (or parent folders) of the files you touched. Since I am an OWNER of media/capture, you can add me as reviewer and click Start Review.

              Okay, got it, thanks a bunch!

              Hehe, sorry I should have mentioned that it is not necessary to add all of the owners. Typically it is enough to start with 1 reviewer and add more later only as needed.

              I can do the first review round and if questions arise we can ask the others to take a look at well.

              View Change

                To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: chromium/src
                Gerrit-Branch: master
                Gerrit-MessageType: comment
                Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                Gerrit-Change-Number: 742845
                Gerrit-PatchSet: 1
                Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                Gerrit-Reviewer: Emircan Uysaler <emi...@chromium.org>
                Gerrit-Reviewer: Miguel Casas <mca...@chromium.org>
                Gerrit-Reviewer: Tommi <to...@chromium.org>
                Gerrit-CC: Aaron Boodman <a...@chromium.org>
                Gerrit-CC: Darin Fisher <da...@chromium.org>
                Gerrit-Comment-Date: Tue, 30 Jan 2018 23:00:07 +0000
                Gerrit-HasComments: No
                Gerrit-HasLabels: No

                Daniel Mack (Gerrit)

                unread,
                Jan 30, 2018, 6:05:01 PM1/30/18
                to Tommi, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Emircan Uysaler, Miguel Casas, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                Daniel Mack removed Tommi from this change.

                View Change

                To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: chromium/src
                Gerrit-Branch: master
                Gerrit-MessageType: deleteReviewer
                Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                Gerrit-Change-Number: 742845
                Gerrit-PatchSet: 1
                Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                Gerrit-Reviewer: Emircan Uysaler <emi...@chromium.org>
                Gerrit-Reviewer: Miguel Casas <mca...@chromium.org>

                Daniel Mack (Gerrit)

                unread,
                Jan 30, 2018, 6:05:01 PM1/30/18
                to amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Emircan Uysaler, Miguel Casas, Tommi, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                Patch Set 1:

                Patch Set 1:

                In order to find reviewers, you can look at the OWNER files in the folders (or parent folders) of the files you touched. Since I am an OWNER of media/capture, you can add me as reviewer and click Start Review.

                Okay, got it, thanks a bunch!

                Hehe, sorry I should have mentioned that it is not necessary to add all of the owners. Typically it is enough to start with 1 reviewer and add more later only as needed.

                I can do the first review round and if questions arise we can ask the others to take a look at well.

                Okay, sorry. Let's do that then. Thanks for bearing with me :)

                [I only saw now that the patch already has a merge conflict. I'm not currently on the computer I did this work on. I'll have access to it in about a month from now.]

                View Change

                  To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: comment
                  Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                  Gerrit-Change-Number: 742845
                  Gerrit-PatchSet: 1
                  Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                  Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                  Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                  Gerrit-Reviewer: Emircan Uysaler <emi...@chromium.org>
                  Gerrit-Reviewer: Miguel Casas <mca...@chromium.org>
                  Gerrit-Reviewer: Tommi <to...@chromium.org>
                  Gerrit-CC: Aaron Boodman <a...@chromium.org>
                  Gerrit-CC: Darin Fisher <da...@chromium.org>
                  Gerrit-Comment-Date: Tue, 30 Jan 2018 23:04:51 +0000
                  Gerrit-HasComments: No
                  Gerrit-HasLabels: No

                  Daniel Mack (Gerrit)

                  unread,
                  Jan 30, 2018, 6:05:19 PM1/30/18
                  to Emircan Uysaler, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Miguel Casas, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                  Daniel Mack removed Emircan Uysaler from this change.

                  View Change

                  To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: deleteReviewer
                  Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                  Gerrit-Change-Number: 742845
                  Gerrit-PatchSet: 1
                  Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                  Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                  Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                  Gerrit-Reviewer: Miguel Casas <mca...@chromium.org>

                  Daniel Mack (Gerrit)

                  unread,
                  Jan 30, 2018, 6:05:19 PM1/30/18
                  to Miguel Casas, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                  Daniel Mack removed Miguel Casas from this change.

                  View Change

                  To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: deleteReviewer
                  Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                  Gerrit-Change-Number: 742845
                  Gerrit-PatchSet: 1
                  Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                  Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                  Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>

                  Christian Fremerey (Gerrit)

                  unread,
                  Jan 30, 2018, 6:36:48 PM1/30/18
                  to Daniel Mack, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                  Patch Set 1:

                  Patch Set 1:

                  Patch Set 1:

                  In order to find reviewers, you can look at the OWNER files in the folders (or parent folders) of the files you touched. Since I am an OWNER of media/capture, you can add me as reviewer and click Start Review.

                  Okay, got it, thanks a bunch!

                  Hehe, sorry I should have mentioned that it is not necessary to add all of the owners. Typically it is enough to start with 1 reviewer and add more later only as needed.

                  I can do the first review round and if questions arise we can ask the others to take a look at well.

                  Okay, sorry. Let's do that then. Thanks for bearing with me :)

                  [I only saw now that the patch already has a merge conflict. I'm not currently on the computer I did this work on. I'll have access to it in about a month from now.]

                  No problem. If you have a different computer where you can check out Chromium, you can simply download the changes from this code. Just click Download on the right side above the list of files and it presents several options for how to get/apply the change to your local checkout.

                  View Change

                    To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: chromium/src
                    Gerrit-Branch: master
                    Gerrit-MessageType: comment
                    Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                    Gerrit-Change-Number: 742845
                    Gerrit-PatchSet: 1
                    Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                    Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                    Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                    Gerrit-CC: Aaron Boodman <a...@chromium.org>
                    Gerrit-CC: Darin Fisher <da...@chromium.org>
                    Gerrit-Comment-Date: Tue, 30 Jan 2018 23:36:43 +0000
                    Gerrit-HasComments: No
                    Gerrit-HasLabels: No

                    Miguel Casas (Gerrit)

                    unread,
                    Jan 31, 2018, 12:30:19 PM1/31/18
                    to Daniel Mack, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                    View Change

                    1 comment:

                    • File media/capture/video/video_capture_device_descriptor.h:

                      • Patch Set #1, Line 21: LINUX_V4L2_MULTI_PLANE

                        The original code was reverted not by mistake but because
                        there were no devices in use with this planarity - so this
                        was tantamount to dead code. Back in the day also the
                        linuxtv.org test code (i.e. vivi and the likes) didn't
                        properly cover multiplanar YUV formats. So, before landing
                        code we need make sure that it's properly used and tested;
                        I see you found some Qualcomm cameras using this format, so
                        that's good -- but somehow we need to make sure that this
                        code is tested on the trybots and, if possible, in the CQ
                        (via unittests and also via some kind of OS emulator).

                    To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: chromium/src
                    Gerrit-Branch: master
                    Gerrit-MessageType: comment
                    Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                    Gerrit-Change-Number: 742845
                    Gerrit-PatchSet: 1
                    Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                    Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                    Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                    Gerrit-CC: Aaron Boodman <a...@chromium.org>
                    Gerrit-CC: Darin Fisher <da...@chromium.org>
                    Gerrit-Comment-Date: Wed, 31 Jan 2018 17:30:17 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-HasLabels: No

                    Christian Fremerey (Gerrit)

                    unread,
                    Feb 2, 2018, 7:36:06 PM2/2/18
                    to Daniel Mack, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                    View Change

                    1 comment:

                      • The original code was reverted not by mistake but because […]

                        I agree with mcasas@ that we need this to be covered by automated tests.

                        In order to test this without requiring actual camera hardware or OS emulators, one possibility I see would be to mock out all of the V4L2 API calls and then configure the mock to behave like we expect V4L2 to behave on real hardware.
                        mcasas@: Would you see this as an acceptable option?

                        If we need coverage on real hardware, we could check if there is a way to add a webrtc bot running on a device using one of these Qualcomm chips.
                        zonque@: Could you share more details on particular devices that could be used for such tests?

                    To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: chromium/src
                    Gerrit-Branch: master
                    Gerrit-MessageType: comment
                    Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                    Gerrit-Change-Number: 742845
                    Gerrit-PatchSet: 1
                    Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                    Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                    Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                    Gerrit-CC: Aaron Boodman <a...@chromium.org>
                    Gerrit-CC: Darin Fisher <da...@chromium.org>
                    Gerrit-Comment-Date: Sat, 03 Feb 2018 00:36:04 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-HasLabels: No

                    Daniel Mack (Gerrit)

                    unread,
                    Apr 21, 2018, 4:30:14 AM4/21/18
                    to acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                    I've now rebased the two patches onto the current master. I'd very much like to get this reviewed.

                    The comment from last round still applies though, as the code supporting this camera type is not currently unit-tested. As I said, I don't know how to do that in the Chromium project. However, given that such tests are being made a requirement for this patch set, I assume there is some mock code that tests the SPLANE cameras, and that code should be easily extendible for MPLANE types as well.


                    View Change

                    1 comment:

                      • The change set that removed that support didn't mention any of that reasoning, or did I miss anything?

                        As my change set says, this PR is a forward port of a patch that I did for version 56, because that's the version that is currently bundled in Qt5.9, and that's the thing we're using on the Qualcomm processor. Last time I checked, the latest version of Chromium could not be built on arm64, but maybe that has changed now. If that's the case, I can test Chromium directly again and rebase my changes.

                        However, how to bring this into your GQ system beats me, that has to be done by someone else.

                    To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: chromium/src
                    Gerrit-Branch: master
                    Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                    Gerrit-Change-Number: 742845
                    Gerrit-PatchSet: 2
                    Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                    Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                    Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                    Gerrit-CC: Aaron Boodman <a...@chromium.org>
                    Gerrit-CC: Darin Fisher <da...@chromium.org>
                    Gerrit-Comment-Date: Sat, 21 Apr 2018 08:30:04 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: No
                    Comment-In-Reply-To: Miguel Casas <mca...@chromium.org>
                    Gerrit-MessageType: comment

                    Daniel Mack (Gerrit)

                    unread,
                    Apr 21, 2018, 5:19:41 AM4/21/18
                    to acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                    Patch Set 2:

                    (1 comment)

                    I've now rebased the two patches onto the current master. I'd very much like to get this reviewed.

                    The comment from last round still applies though, as the code supporting this camera type is not currently unit-tested. As I said, I don't know how to do that in the Chromium project. However, given that such tests are being made a requirement for this patch set, I assume there is some mock code that tests the SPLANE cameras, and that code should be easily extendible for MPLANE types as well.

                    To give some more background on this patch set: we are building embedded hardware based on Qualcomm's MSM8016 (aka Snapdragon 410), and we're using web technology for the UI components. For this, we chose QWebEngine, which is based on Chromium 56 in Qt 5.9. As we need to support the cameras in our systems in the browser views, I had to come up with a downstream patch for MPLANE types which works very well since a while. The planarity type is not enforced by the camera modules in our designs but by the Qualcomm camera subsystem in the mainline Linux kernel.

                    The purpose of the effort to merge this patch upstream is that I don't want to rebase my patch all the time when Qt updates their Chromium version. I also believe that more people are affected by the current limitation to SPLANE cameras. Let me know if I can provide any other information.

                    View Change

                      To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                      Gerrit-Project: chromium/src
                      Gerrit-Branch: master
                      Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                      Gerrit-Change-Number: 742845
                      Gerrit-PatchSet: 2
                      Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                      Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                      Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                      Gerrit-CC: Aaron Boodman <a...@chromium.org>
                      Gerrit-CC: Darin Fisher <da...@chromium.org>
                      Gerrit-Comment-Date: Sat, 21 Apr 2018 09:19:32 +0000
                      Gerrit-HasComments: No
                      Gerrit-Has-Labels: No
                      Gerrit-MessageType: comment

                      Alexandre Courbot (Gerrit)

                      unread,
                      Apr 24, 2018, 11:40:29 PM4/24/18
                      to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                      View Change

                      2 comments:

                      • File media/capture/video/linux/v4l2_capture_delegate.cc:

                        • Patch Set #2, Line 340: if (isMultiplane())

                          Contrary to the one in Init(), this call to isMultiplane() can be moved out of the loop without duplicating code.

                        • Patch Set #2, Line 958: if (isMultiplane()) {

                          I feel like this isMultiPlane() (and the one in set_payload_size()) should be outside of the loop, since there will only be one plane if it is false anyway. In this case multiple iterations should not happen and would be an error. But I also understand that doing so would duplicate the mmap() code. Maybe perform a runtime check on (isMultiplane() || num_planes_ == 1) and trigger an error if this condition is not met to ensure consistency?

                      To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                      Gerrit-Project: chromium/src
                      Gerrit-Branch: master
                      Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                      Gerrit-Change-Number: 742845
                      Gerrit-PatchSet: 2
                      Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                      Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                      Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                      Gerrit-CC: Aaron Boodman <a...@chromium.org>
                      Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                      Gerrit-CC: Darin Fisher <da...@chromium.org>
                      Gerrit-Comment-Date: Wed, 25 Apr 2018 03:40:20 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      Gerrit-MessageType: comment

                      Daniel Mack (Gerrit)

                      unread,
                      Apr 27, 2018, 4:43:48 AM4/27/18
                      to acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Alexandre Courbot, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                      Patch Set 2:

                      (2 comments)

                      Thanks for the comments. As commented inline, I agree with the change in line 340, but I'm sceptical about the other one. I can repost a new set with just the one change if you want.

                      View Change

                      2 comments:

                        • Contrary to the one in Init(), this call to isMultiplane() can be moved out of the loop without dupl […]

                          Ack

                        • I feel like this isMultiPlane() (and the one in set_payload_size()) should be outside of the loop, s […]

                          Hmm. I can do that if you insist, but I don't see how I could move that condition out of the loop without duplicating the loop body entirely, as the start_, lenth_ and payload_size_ arrays are all used for single plane as well. I wrote that function so that both cases share as much code as possible.

                          Given that isMultiplane() is very cheap and this code is not even on the hot path, I wonder if that rework would actually improve anything.

                          I could add that sanity check for consistency though. WDYT?

                      To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                      Gerrit-Project: chromium/src
                      Gerrit-Branch: master
                      Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                      Gerrit-Change-Number: 742845
                      Gerrit-PatchSet: 2
                      Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                      Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                      Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                      Gerrit-CC: Aaron Boodman <a...@chromium.org>
                      Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                      Gerrit-CC: Darin Fisher <da...@chromium.org>
                      Gerrit-Comment-Date: Fri, 27 Apr 2018 08:43:44 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      Comment-In-Reply-To: Alexandre Courbot <acou...@chromium.org>
                      Gerrit-MessageType: comment

                      Daniel Mack (Gerrit)

                      unread,
                      May 4, 2018, 2:10:48 AM5/4/18
                      to acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Pawel Osciak, Alexandre Courbot, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                      pos...@chromium.org

                      View Change

                        To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                        Gerrit-Project: chromium/src
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                        Gerrit-Change-Number: 742845
                        Gerrit-PatchSet: 3
                        Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                        Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                        Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                        Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                        Gerrit-CC: Aaron Boodman <a...@chromium.org>
                        Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                        Gerrit-CC: Darin Fisher <da...@chromium.org>
                        Gerrit-Comment-Date: Fri, 04 May 2018 06:10:43 +0000

                        Alexandre Courbot (Gerrit)

                        unread,
                        May 7, 2018, 3:45:58 AM5/7/18
                        to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Pawel Osciak, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                        View Change

                        2 comments:

                        • File media/capture/video/linux/v4l2_capture_delegate.cc:

                          • Patch Set #2, Line 340: for (int i = 0; i < num_planes_; ++i) {

                            Ack

                            Apologies - your code was actually correct, for the reason I explain in my latest comment for Init(). You will probably want to revert the change you did to this block in v3.

                          • Patch Set #2, Line 958: unsigned int length, offset;

                            Hmm. […]

                            Actually, let me withdraw that comment. From an API point of view, a device can perfectly use the multi-planar API yet only use one plane. So it turns out that your code is the correct way to handle this case as well.

                        To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                        Gerrit-Project: chromium/src
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                        Gerrit-Change-Number: 742845
                        Gerrit-PatchSet: 3
                        Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                        Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                        Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                        Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                        Gerrit-CC: Aaron Boodman <a...@chromium.org>
                        Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                        Gerrit-CC: Darin Fisher <da...@chromium.org>
                        Gerrit-Comment-Date: Mon, 07 May 2018 07:45:53 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        Comment-In-Reply-To: Daniel Mack <zon...@gmail.com>

                        Daniel Mack (Gerrit)

                        unread,
                        May 23, 2018, 5:47:30 AM5/23/18
                        to acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Pawel Osciak, Alexandre Courbot, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                        I really hate nagging, and I don't want to appear obnoxiously impatient, but I'm afraid this change set will bit-rot again. Is there anything I can do to get another round of review?

                        Alexandre revoked his comments on version 2, so version 3 is currently obsolete. Is it necessary to repost version 2 as new one?

                        View Change

                        1 comment:

                        To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                        Gerrit-Project: chromium/src
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                        Gerrit-Change-Number: 742845
                        Gerrit-PatchSet: 3
                        Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                        Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                        Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                        Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                        Gerrit-CC: Aaron Boodman <a...@chromium.org>
                        Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                        Gerrit-CC: Darin Fisher <da...@chromium.org>
                        Gerrit-Comment-Date: Wed, 23 May 2018 09:47:17 +0000

                        Alexandre Courbot (Gerrit)

                        unread,
                        May 23, 2018, 7:33:16 AM5/23/18
                        to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Pawel Osciak, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                        Patch Set 3:

                        (1 comment)

                        I really hate nagging, and I don't want to appear obnoxiously impatient, but I'm afraid this change set will bit-rot again. Is there anything I can do to get another round of review?

                        Alexandre revoked his comments on version 2, so version 3 is currently obsolete. Is it necessary to repost version 2 as new one?

                        IIUC only the latest posted patch can be sent to the CQ, so you may need to reupload the version you want to see merged. Otherwise the patch LGTM but I don't have permission to +1 sadly.

                        View Change

                          To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                          Gerrit-Project: chromium/src
                          Gerrit-Branch: master
                          Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                          Gerrit-Change-Number: 742845
                          Gerrit-PatchSet: 3
                          Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                          Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                          Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                          Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                          Gerrit-CC: Aaron Boodman <a...@chromium.org>
                          Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                          Gerrit-CC: Darin Fisher <da...@chromium.org>
                          Gerrit-Comment-Date: Wed, 23 May 2018 11:33:07 +0000

                          Daniel Mack (Gerrit)

                          unread,
                          Jun 2, 2018, 2:18:49 AM6/2/18
                          to acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Pawel Osciak, Alexandre Courbot, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                          Re-uploaded v2 as v4 now. Please consider another look. Thanks!

                          View Change

                            To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                            Gerrit-Project: chromium/src
                            Gerrit-Branch: master
                            Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                            Gerrit-Change-Number: 742845
                            Gerrit-PatchSet: 4
                            Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                            Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                            Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                            Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                            Gerrit-CC: Aaron Boodman <a...@chromium.org>
                            Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                            Gerrit-CC: Darin Fisher <da...@chromium.org>
                            Gerrit-Comment-Date: Sat, 02 Jun 2018 06:18:46 +0000

                            Alexandre Courbot (Gerrit)

                            unread,
                            Jun 7, 2018, 2:44:18 AM6/7/18
                            to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Fredrik Hubinette, Dan Sanders, Chrome Cunningham, Xiaohan Wang, Pawel Osciak, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                            Adding more media/ owners for review.

                            View Change

                              To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: chromium/src
                              Gerrit-Branch: master
                              Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                              Gerrit-Change-Number: 742845
                              Gerrit-PatchSet: 4
                              Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                              Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                              Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                              Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                              Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                              Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                              Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                              Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
                              Gerrit-CC: Aaron Boodman <a...@chromium.org>
                              Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                              Gerrit-CC: Darin Fisher <da...@chromium.org>
                              Gerrit-Comment-Date: Thu, 07 Jun 2018 06:44:14 +0000

                              Chrome Cunningham (Gerrit)

                              unread,
                              Jun 7, 2018, 1:24:05 PM6/7/18
                              to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Fredrik Hubinette, Dan Sanders, Xiaohan Wang, Pawel Osciak, Alexandre Courbot, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher


                              Hi Daniel, sorry for the slow review. The recently added media/ owners are decode/playback experts, but probably much help on this review - Miguel has the expertise in this area. There's a big open question about testing which I've pinged on below. When the experts are happy any one of us will be able to LGTM, but the test question needs follow up first.

                              View Change

                              1 comment:

                                • The change set that removed that support didn't mention any of that reasoning, or did I miss anythin […]

                                  mcasas@ friendly ping for Christian's question and Daniel's follow up. Pls give more guidance and loop in webRTC CQ infra as needed to unblock review.

                              To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: chromium/src
                              Gerrit-Branch: master
                              Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                              Gerrit-Change-Number: 742845
                              Gerrit-PatchSet: 4
                              Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                              Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                              Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                              Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                              Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                              Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                              Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                              Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
                              Gerrit-CC: Aaron Boodman <a...@chromium.org>
                              Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                              Gerrit-CC: Darin Fisher <da...@chromium.org>
                              Gerrit-Comment-Date: Thu, 07 Jun 2018 17:24:00 +0000
                              Gerrit-HasComments: Yes
                              Gerrit-Has-Labels: No
                              Comment-In-Reply-To: Miguel Casas <mca...@chromium.org>
                              Comment-In-Reply-To: Daniel Mack <zon...@gmail.com>
                              Gerrit-MessageType: comment

                              Tomasz Figa (Gerrit)

                              unread,
                              Jun 11, 2018, 1:51:35 AM6/11/18
                              to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Pawel Osciak, Ricky Liang, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Xiaohan Wang, Alexandre Courbot, Christian Fremerey, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                              Just 1 nit and 1 general comment. Otherwise LGTM, but I don't have any reviewer rights in Chromium.

                              View Change

                              2 comments:

                                • mcasas@ friendly ping for Christian's question and Daniel's follow up. […]

                                  FWIW, upstream vivi has evolved into vivid and it supports MPLANE.
                                  It is also much more configurable and IMHO we should actually consider using it for VM testing even for single planar variant, if we don't already do it.

                              To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                              Gerrit-Project: chromium/src
                              Gerrit-Branch: master
                              Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                              Gerrit-Change-Number: 742845
                              Gerrit-PatchSet: 4
                              Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                              Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                              Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                              Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                              Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                              Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                              Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                              Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
                              Gerrit-CC: Aaron Boodman <a...@chromium.org>
                              Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                              Gerrit-CC: Darin Fisher <da...@chromium.org>
                              Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                              Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                              Gerrit-Comment-Date: Mon, 11 Jun 2018 05:51:30 +0000
                              Gerrit-HasComments: Yes
                              Gerrit-Has-Labels: No
                              Comment-In-Reply-To: Miguel Casas <mca...@chromium.org>
                              Comment-In-Reply-To: Chrome Cunningham <chcunn...@chromium.org>

                              Christian Fremerey (Gerrit)

                              unread,
                              Jun 12, 2018, 6:36:17 PM6/12/18
                              to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Patrik Höglund, Pawel Osciak, Ricky Liang, Tomasz Figa, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                              Patch Set 2:

                              (1 comment)

                              I've now rebased the two patches onto the current master. I'd very much like to get this reviewed.

                              The comment from last round still applies though, as the code supporting this camera type is not currently unit-tested. As I said, I don't know how to do that in the Chromium project. However, given that such tests are being made a requirement for this patch set, I assume there is some mock code that tests the SPLANE cameras, and that code should be easily extendible for MPLANE types as well.

                              Unfortunately, I don't think there is any mock code for testing the SPLANE code. Test coverage for that code is currently achieved by running tests on special trybots in the chromium.webrtc waterfall with real cameras attached.

                              For getting test coverage for the MPLANE code, I see three options:
                              1. Adding/configuring webrtc trybots that use a physical device that uses the MPLANE code path.
                              2. Adding/configuring webrtc trybots that use a virtual device (vivi?) that uses the MPLANE code path.
                              3. Mocking out V4L2 API calls to simulate the behavior of MPLANE devices.

                              For 1. and 2. we need to talk to phoglund@ to see if/how we can add such trybots.
                              phoglund@: Could you give a quick input on how doable this seems to you?

                              For 1. we would need to know which device(s) to get. zonque@ is there any off-the-shelf device you know of that could be bought for this purpose?

                              For 2. I am not familiar with vivi or vivid, but it seems tfiga@ has expertise on that.
                              tfiga@, phoglund@: How easy/hard would it be to set up a webrtc bot with such virtual devices?

                              For 3. An example for mocking out a platform-specific video capture API for unit testing can be found for the case of Windows Media Foundation based capture here: https://cs.chromium.org/chromium/src/media/capture/video/win/video_capture_device_mf_win_unittest.cc?dr&g=0. The advantage of this approach is that it does not require any special bot configuration, so it can run on the regular commit queue.

                              Ideally, test coverage would include all three approaches, but I think as long as we can get at least one of them, we should be okay for landing this.

                              View Change

                                To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                Gerrit-Project: chromium/src
                                Gerrit-Branch: master
                                Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                Gerrit-Change-Number: 742845
                                Gerrit-PatchSet: 4
                                Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                Gerrit-CC: Darin Fisher <da...@chromium.org>
                                Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                Gerrit-Comment-Date: Tue, 12 Jun 2018 22:36:11 +0000

                                Daniel Mack (Gerrit)

                                unread,
                                Jun 13, 2018, 2:41:38 AM6/13/18
                                to acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Patrik Höglund, Christian Fremerey, Pawel Osciak, Ricky Liang, Tomasz Figa, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                                Unfortunately, I don't think there is any mock code for testing the SPLANE code. Test coverage for that code is currently achieved by running tests on special trybots in the chromium.webrtc waterfall with real cameras attached.

                                So there is no code for automated testing of SPLANE which is the only format currently supported and the most widespread too, but merging support for exotic MPLANE cameras is problematic because no test code is provided?

                                Wouldn't it make more sense to add testing for both types in one go?

                                For getting test coverage for the MPLANE code, I see three options:
                                1. Adding/configuring webrtc trybots that use a physical device that uses the MPLANE code path.
                                2. Adding/configuring webrtc trybots that use a virtual device (vivi?) that uses the MPLANE code path.
                                3. Mocking out V4L2 API calls to simulate the behavior of MPLANE devices.

                                For 1. and 2. we need to talk to phoglund@ to see if/how we can add such trybots.
                                phoglund@: Could you give a quick input on how doable this seems to you?

                                For 1. we would need to know which device(s) to get. zonque@ is there any off-the-shelf device you know of that could be bought for this purpose?

                                The only camera system I'm aware of that uses that type of MPLANE transport is Qualcomm's camss driver, and that is only used by some Snapdragon processors, and only when they are booted with the mainline kernel (and not Android).

                                Not sure if it's feasible to use such an embedded platform for automated tests.

                                So I believe it's much easier to mock the user code for this.

                                View Change

                                2 comments:

                                  • nit: Is there a reason to mix 3 different method naming conventions? (Init, isMultiplane, num_planes […]

                                    The code base is largely chaotic in that area, and I merely tried to keep as close to the environment as possible and keep the change set small.

                                    A cleanup could certainly be done, but it would touch a lot more ground than this one, so it's out of scope for this contribution.

                                • File media/capture/video/video_capture_device_descriptor.h:

                                  • FWIW, upstream vivi has evolved into vivid and it supports MPLANE. […]

                                    As I said, I really don't know how the test setup in your project works, and building the tree alone takes 7 hours on my machine already. I'd really appreciate if somebody did the testing part for this. All I can say is that the implementation as it stand in this PR does work for both multi and single planarity.

                                To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                Gerrit-Project: chromium/src
                                Gerrit-Branch: master
                                Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                Gerrit-Change-Number: 742845
                                Gerrit-PatchSet: 4
                                Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                Gerrit-CC: Darin Fisher <da...@chromium.org>
                                Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                Gerrit-Comment-Date: Wed, 13 Jun 2018 06:41:27 +0000
                                Gerrit-HasComments: Yes
                                Gerrit-Has-Labels: No
                                Comment-In-Reply-To: Miguel Casas <mca...@chromium.org>
                                Comment-In-Reply-To: Tomasz Figa <tf...@chromium.org>

                                Tomasz Figa (Gerrit)

                                unread,
                                Jun 13, 2018, 5:27:17 AM6/13/18
                                to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Patrik Höglund, Christian Fremerey, Pawel Osciak, Ricky Liang, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                                Patch Set 4:

                                Patch Set 2:

                                (1 comment)

                                I've now rebased the two patches onto the current master. I'd very much like to get this reviewed.

                                The comment from last round still applies though, as the code supporting this camera type is not currently unit-tested. As I said, I don't know how to do that in the Chromium project. However, given that such tests are being made a requirement for this patch set, I assume there is some mock code that tests the SPLANE cameras, and that code should be easily extendible for MPLANE types as well.

                                Unfortunately, I don't think there is any mock code for testing the SPLANE code. Test coverage for that code is currently achieved by running tests on special trybots in the chromium.webrtc waterfall with real cameras attached.

                                For getting test coverage for the MPLANE code, I see three options:


                                1. Adding/configuring webrtc trybots that use a physical device that uses the MPLANE code path.
                                2. Adding/configuring webrtc trybots that use a virtual device (vivi?) that uses the MPLANE code path.
                                3. Mocking out V4L2 API calls to simulate the behavior of MPLANE devices.

                                For 1. and 2. we need to talk to phoglund@ to see if/how we can add such trybots.
                                phoglund@: Could you give a quick input on how doable this seems to you?

                                For 1. we would need to know which device(s) to get. zonque@ is there any off-the-shelf device you know of that could be bought for this purpose?

                                For 2. I am not familiar with vivi or vivid, but it seems tfiga@ has expertise on that.

                                tfiga@, phoglund@: How easy/hard would it be to set up a webrtc bot with such virtual devices?

                                For 3. An example for mocking out a platform-specific video capture API for unit testing can be found for the case of Windows Media Foundation based capture here: https://cs.chromium.org/chromium/src/media/capture/video/win/video_capture_device_mf_win_unittest.cc?dr&g=0. The advantage of this approach is that it does not require any special bot configuration, so it can run on the regular commit queue.

                                Ideally, test coverage would include all three approaches, but I think as long as we can get at least one of them, we should be okay for landing this.

                                FYI, we're interested in 3) for Chrome OS, so we can run Chromium and our tests in Chromium bots early before potential regressions sneak into Chrome OS. I've filed crbug.com/852302 to track this.

                                View Change

                                  To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                  Gerrit-Project: chromium/src
                                  Gerrit-Branch: master
                                  Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                  Gerrit-Change-Number: 742845
                                  Gerrit-PatchSet: 4
                                  Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                  Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                  Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                  Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                  Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                  Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                  Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                  Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                  Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                  Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                  Gerrit-CC: Darin Fisher <da...@chromium.org>
                                  Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                  Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                  Gerrit-Comment-Date: Wed, 13 Jun 2018 09:27:12 +0000

                                  Patrik Höglund (Gerrit)

                                  unread,
                                  Jun 13, 2018, 9:41:09 AM6/13/18
                                  to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Pawel Osciak, Ricky Liang, Tomasz Figa, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                                  We're trying to make the WebRTC bot configs less exotic and not more, so we'd really not like to add more camera models than the C920 devices we're already using. Try out the mock approach first like Daniel is suggesting and let me know if it doesn't work out.

                                  View Change

                                    To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                    Gerrit-Project: chromium/src
                                    Gerrit-Branch: master
                                    Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                    Gerrit-Change-Number: 742845
                                    Gerrit-PatchSet: 4
                                    Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                    Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                    Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                    Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                    Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                    Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                    Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                    Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                    Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                    Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                    Gerrit-CC: Darin Fisher <da...@chromium.org>
                                    Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                    Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                    Gerrit-Comment-Date: Wed, 13 Jun 2018 13:41:07 +0000

                                    Christian Fremerey (Gerrit)

                                    unread,
                                    Jun 13, 2018, 12:01:33 PM6/13/18
                                    to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Patrik Höglund, Pawel Osciak, Ricky Liang, Tomasz Figa, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                                    Patch Set 4:

                                    (2 comments)

                                    Unfortunately, I don't think there is any mock code for testing the SPLANE code. Test coverage for that code is currently achieved by running tests on special trybots in the chromium.webrtc waterfall with real cameras attached.

                                    So there is no code for automated testing of SPLANE which is the only format currently supported and the most widespread too, but merging support for exotic MPLANE cameras is problematic because no test code is provided?

                                    What is problematic about merging the MPLANE code as is is that there would be zero test coverage inside Chromium. I agree that it is bad that there is no test code for SPLANE, but I guess it has been decided at some point in the past that this was acceptable considering there is test coverage through tests involving real cameras. Since we don't have such coverage for MPLANE, and it looks like it is difficult to add, we now have no choice but to bite the bullet and do the work.


                                    > Wouldn't it make more sense to add testing for both types in one go?

                                    Yes, absolutely. Once we have the V4L2 calls mocked out, it should be used for testing both SPLANE and MPLANE.

                                    For getting test coverage for the MPLANE code, I see three options:
                                    1. Adding/configuring webrtc trybots that use a physical device that uses the MPLANE code path.
                                    2. Adding/configuring webrtc trybots that use a virtual device (vivi?) that uses the MPLANE code path.
                                    3. Mocking out V4L2 API calls to simulate the behavior of MPLANE devices.

                                    So based on everyone's comments, it looks like approach 3 is the way to go.
                                    If noone else can spend the resources to do this, I can volunteer to give it a try. But I won't be able to make this a very high priority, and likely won't be able to start before next week.

                                    View Change

                                      To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                      Gerrit-Project: chromium/src
                                      Gerrit-Branch: master
                                      Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                      Gerrit-Change-Number: 742845
                                      Gerrit-PatchSet: 4
                                      Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                      Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                      Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                      Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                      Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                      Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                      Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                      Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                      Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                      Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                      Gerrit-CC: Darin Fisher <da...@chromium.org>
                                      Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                      Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                      Gerrit-Comment-Date: Wed, 13 Jun 2018 16:01:28 +0000

                                      Tomasz Figa (Gerrit)

                                      unread,
                                      Jun 13, 2018, 9:24:10 PM6/13/18
                                      to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Patrik Höglund, Pawel Osciak, Ricky Liang, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                                      Patch Set 4:

                                      Patch Set 4:

                                      (2 comments)

                                      Unfortunately, I don't think there is any mock code for testing the SPLANE code. Test coverage for that code is currently achieved by running tests on special trybots in the chromium.webrtc waterfall with real cameras attached.

                                      So there is no code for automated testing of SPLANE which is the only format currently supported and the most widespread too, but merging support for exotic MPLANE cameras is problematic because no test code is provided?

                                      What is problematic about merging the MPLANE code as is is that there would be zero test coverage inside Chromium. I agree that it is bad that there is no test code for SPLANE, but I guess it has been decided at some point in the past that this was acceptable considering there is test coverage through tests involving real cameras. Since we don't have such coverage for MPLANE, and it looks like it is difficult to add, we now have no choice but to bite the bullet and do the work.

                                      > Wouldn't it make more sense to add testing for both types in one go?

                                      Yes, absolutely. Once we have the V4L2 calls mocked out, it should be used for testing both SPLANE and MPLANE.

                                      For getting test coverage for the MPLANE code, I see three options:
                                      1. Adding/configuring webrtc trybots that use a physical device that uses the MPLANE code path.
                                      2. Adding/configuring webrtc trybots that use a virtual device (vivi?) that uses the MPLANE code path.
                                      3. Mocking out V4L2 API calls to simulate the behavior of MPLANE devices.

                                      So based on everyone's comments, it looks like approach 3 is the way to go.
                                      If noone else can spend the resources to do this, I can volunteer to give it a try. But I won't be able to make this a very high priority, and likely won't be able to start before next week.

                                      Uhm, I just realized that I mixed up the numbering. We're interested in 2), using vivid for testing on Chrome OS builds of Chromium.

                                      Mocking out V4L2 API calls in Chromium wouldn't work for us, since in addition to the Linux VCD that talks directly to V4L2, depending on the board configuration, we also use Chrome OS VCD that talks to a Chrome OS camera service, which then talks to V4L2.

                                      View Change

                                        To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                        Gerrit-Project: chromium/src
                                        Gerrit-Branch: master
                                        Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                        Gerrit-Change-Number: 742845
                                        Gerrit-PatchSet: 4
                                        Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                        Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                        Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                        Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                        Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                        Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                        Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                        Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                        Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                        Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                        Gerrit-CC: Darin Fisher <da...@chromium.org>
                                        Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                        Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                        Gerrit-Comment-Date: Thu, 14 Jun 2018 01:24:07 +0000

                                        Daniel Mack (Gerrit)

                                        unread,
                                        Jun 29, 2018, 10:04:52 AM6/29/18
                                        to acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Christian Fremerey, Patrik Höglund, Pawel Osciak, Ricky Liang, Tomasz Figa, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                                        I have now rebased the patch set to Chromium 65, as that is what's bundled with Qt 5.11. While doing that, I noted a regression that happened in the rebase, so the code as it currently stands doesn't quite do the right thing. I'm working on a fix and will repost a new set once that's finished.

                                        View Change

                                          To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                          Gerrit-Project: chromium/src
                                          Gerrit-Branch: master
                                          Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                          Gerrit-Change-Number: 742845
                                          Gerrit-PatchSet: 4
                                          Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                          Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                          Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                          Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                          Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                          Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                          Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                          Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                          Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                          Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                          Gerrit-CC: Darin Fisher <da...@chromium.org>
                                          Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                          Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                          Gerrit-Comment-Date: Fri, 29 Jun 2018 14:03:57 +0000

                                          Christian Fremerey (Gerrit)

                                          unread,
                                          Jun 29, 2018, 2:19:01 PM6/29/18
                                          to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Patrik Höglund, Pawel Osciak, Ricky Liang, Tomasz Figa, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                                          Patch Set 4:

                                          Patch Set 4:

                                          Patch Set 4:

                                          (2 comments)

                                          Unfortunately, I don't think there is any mock code for testing the SPLANE code. Test coverage for that code is currently achieved by running tests on special trybots in the chromium.webrtc waterfall with real cameras attached.

                                          So there is no code for automated testing of SPLANE which is the only format currently supported and the most widespread too, but merging support for exotic MPLANE cameras is problematic because no test code is provided?

                                          What is problematic about merging the MPLANE code as is is that there would be zero test coverage inside Chromium. I agree that it is bad that there is no test code for SPLANE, but I guess it has been decided at some point in the past that this was acceptable considering there is test coverage through tests involving real cameras. Since we don't have such coverage for MPLANE, and it looks like it is difficult to add, we now have no choice but to bite the bullet and do the work.

                                          > Wouldn't it make more sense to add testing for both types in one go?

                                          Yes, absolutely. Once we have the V4L2 calls mocked out, it should be used for testing both SPLANE and MPLANE.

                                          For getting test coverage for the MPLANE code, I see three options:
                                          1. Adding/configuring webrtc trybots that use a physical device that uses the MPLANE code path.
                                          2. Adding/configuring webrtc trybots that use a virtual device (vivi?) that uses the MPLANE code path.
                                          3. Mocking out V4L2 API calls to simulate the behavior of MPLANE devices.

                                          So based on everyone's comments, it looks like approach 3 is the way to go.
                                          If noone else can spend the resources to do this, I can volunteer to give it a try. But I won't be able to make this a very high priority, and likely won't be able to start before next week.

                                          Uhm, I just realized that I mixed up the numbering. We're interested in 2), using vivid for testing on Chrome OS builds of Chromium.

                                          Mocking out V4L2 API calls in Chromium wouldn't work for us, since in addition to the Linux VCD that talks directly to V4L2, depending on the board configuration, we also use Chrome OS VCD that talks to a Chrome OS camera service, which then talks to V4L2.

                                          Acknowledged.

                                          I still think it makes sense to pursue approach 3), i.e. mocking out V4L2 API calls, since it allows running tests anywhere without any special configuration or kernel module needed. Also it allows very fine control of how the API calls respond directly from the test code.

                                          As a first step, I created a CL for abstracting out the V4L2 calls, see https://chromium-review.googlesource.com/c/chromium/src/+/1120856. Next step would be to create a configurable fake implementation of that interface and use it in actual tests.

                                          View Change

                                            To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                            Gerrit-Project: chromium/src
                                            Gerrit-Branch: master
                                            Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                            Gerrit-Change-Number: 742845
                                            Gerrit-PatchSet: 4
                                            Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                            Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                            Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                            Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                            Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                            Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                            Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                            Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                            Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                            Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                            Gerrit-CC: Darin Fisher <da...@chromium.org>
                                            Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                            Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                            Gerrit-Comment-Date: Fri, 29 Jun 2018 18:18:53 +0000

                                            Christian Fremerey (Gerrit)

                                            unread,
                                            Jun 29, 2018, 5:19:46 PM6/29/18
                                            to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Patrik Höglund, Pawel Osciak, Ricky Liang, Tomasz Figa, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                                            View Change

                                            2 comments:

                                              • The code base is largely chaotic in that area, and I merely tried to keep as close to the environmen […]

                                                It is not as chaotic as it may seem. As per Chromium coding style guide [1], Init() and num_planes() are correct, but isMultiplane() should be IsMultiplane().

                                                From the methods below, start() and payload_size() may still qualify as accessors, so lower-case is fine. set_payload_size() now contains quite a bit of logic, so should be changed to SetPayloadSize().

                                                [1] https://google.github.io/styleguide/cppguide.html#Function_Names

                                              • Patch Set #4, Line 903: capture_format_, rotation_, now, timestamp);

                                                This does not seem to make sense to me. What this would do is to send one separate video frame per plane down the video capture stack. I don't think that is what we want.

                                                It looks like back in the day [1], VideoCaptureDeviceClient used to have a method OnIncomingCapturedYuvData() which accepted one pointer per plane and interpreted them as one frame. We would need to add something like this back here, or we would need to ask |client_| for a buffer and copy the data into the buffer from here.

                                                [1] https://codereview.chromium.org/1026073002/patch/20001/30016

                                            To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                            Gerrit-Project: chromium/src
                                            Gerrit-Branch: master
                                            Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                            Gerrit-Change-Number: 742845
                                            Gerrit-PatchSet: 4
                                            Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                            Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                            Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                            Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                            Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                            Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                            Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                            Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                            Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                            Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                            Gerrit-CC: Darin Fisher <da...@chromium.org>
                                            Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                            Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                            Gerrit-Comment-Date: Fri, 29 Jun 2018 21:19:43 +0000
                                            Gerrit-HasComments: Yes
                                            Gerrit-Has-Labels: No
                                            Comment-In-Reply-To: Tomasz Figa <tf...@chromium.org>

                                            Christian Fremerey (Gerrit)

                                            unread,
                                            Jul 6, 2018, 6:34:28 PM7/6/18
                                            to Daniel Mack, acourbo...@chromium.org, amp+...@chromium.org, chfreme...@chromium.org, feature-me...@chromium.org, ipc-securi...@chromium.org, miu+...@chromium.org, poscia...@chromium.org, qsr+...@chromium.org, viettrung...@chromium.org, xjz+...@chromium.org, Patrik Höglund, Pawel Osciak, Ricky Liang, Tomasz Figa, Chrome Cunningham, Fredrik Hubinette, Dan Sanders, Alexandre Courbot, Aaron Boodman, chromium...@chromium.org, Darin Fisher

                                            Quick update regarding testing via mocking out V4L2. I created a series of CLs for making this happen. That should create the basis on top of which adding testing for the MPLANE case should be relatively easy.

                                            See design doc at
                                            https://docs.google.com/document/d/1ihGDZloUGdDpZ5XfmiI3AcqsSxOP9kOe5GxXOTqpHW4/edit?usp=sharing

                                            View Change

                                              To view, visit change 742845. To unsubscribe, or for help writing mail filters, visit settings.

                                              Gerrit-Project: chromium/src
                                              Gerrit-Branch: master
                                              Gerrit-Change-Id: I094ebf03b9ecf092911eb229d20267540b74e1e4
                                              Gerrit-Change-Number: 742845
                                              Gerrit-PatchSet: 4
                                              Gerrit-Owner: Daniel Mack <zon...@gmail.com>
                                              Gerrit-Reviewer: Christian Fremerey <chfr...@chromium.org>
                                              Gerrit-Reviewer: Chrome Cunningham <chcunn...@chromium.org>
                                              Gerrit-Reviewer: Dan Sanders <sand...@chromium.org>
                                              Gerrit-Reviewer: Daniel Mack <zon...@gmail.com>
                                              Gerrit-Reviewer: Fredrik Hubinette <hu...@chromium.org>
                                              Gerrit-Reviewer: Patrik Höglund <phog...@chromium.org>
                                              Gerrit-Reviewer: Pawel Osciak <pos...@chromium.org>
                                              Gerrit-CC: Aaron Boodman <a...@chromium.org>
                                              Gerrit-CC: Alexandre Courbot <acou...@chromium.org>
                                              Gerrit-CC: Darin Fisher <da...@chromium.org>
                                              Gerrit-CC: Ricky Liang <jcl...@chromium.org>
                                              Gerrit-CC: Tomasz Figa <tf...@chromium.org>
                                              Gerrit-Comment-Date: Fri, 06 Jul 2018 22:34:22 +0000
                                              Reply all
                                              Reply to author
                                              Forward
                                              0 new messages