Giter VIP home page Giter VIP logo

Comments (3)

kevinshieh0225 avatar kevinshieh0225 commented on September 28, 2024 1

Thanks for @WayneLin1992 's reply!

  1. I think vivid_try_fmt_vid_cap only fill in negotiate information to user, but didn't actually reset the size setting from the device. vivid_s_fmt_vid_cap is the function which change the device setting. I still think it is better to change the behavior according to the API description.
  2. Is it better to bind two update function vcamfb_update and vcam_in_queue_destroy/setup together? Which in former function rebuild vcamfb but only change in_queue attribute, and the latter one only rebuild in_queue without vcamfb.
  3. This question extend from question 5: if we want to change the in/out_queue setting, is it necessary to destroy and init a new in/out_queue, or we only need to change the attribute only? And this is the reason why in your vcamfb_update implementation, you only change the attribute on in/out_queue instead of re-init them?

from vcam.

WayneLin1992 avatar WayneLin1992 commented on September 28, 2024
  1. you can set
const struct v4l2_frmsize_discrete *sz = v4l2_find_nearest_size(
            vcam_sizes, n_avail, width, height, f->fmt.pix.width,
            f->fmt.pix.height);

, and you would pass the scaling test on v4l2-compliance.
3. TRY_FMT should not change the driver state, but it could reset the size.
reference vivid_try_fmt_vid_cap
The vivid is a Linux kernel test device driver and pass all v4l2-compliance test.
5. fb.c/vcamfb_update can remalloc space for the sizeimage, and set var.xres var.yres actually seen on the window.
The var.xres_virtual and var.yres_virtual are real space size in memory.
reference The Frame Buffer Device
6.control.c/control_iocontrol_modify_input_setting use the old API need to change.

from vcam.

WayneLin1992 avatar WayneLin1992 commented on September 28, 2024

Thanks for @kevinshieh0225
3. Your ideal is correct. TRY_FMT it will fill format negotiated for device, and S_FMT is actually reset the device size from format.
4.
5. Your ideal is correct. vcam_in_queue_destroy/setup is old API for vcamfb, so it need to combine with vcamfb_update.
6. You only need to change the attribute on in_queue.

from vcam.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.