Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending flags to MMAL / PiCapture SD1 #9

Open
gsautr opened this issue Feb 22, 2017 · 1 comment
Open

Sending flags to MMAL / PiCapture SD1 #9

gsautr opened this issue Feb 22, 2017 · 1 comment

Comments

@gsautr
Copy link

gsautr commented Feb 22, 2017

Hi there, I recently got a very cool board for my Pi called PiCapture SD1 (by Lintest) which takes analogue composite video, s-video or RGB video inputs via the CSI port.

Happy to find that it works out the box as a Pi camera through ofxCvPiCam, though by default it launches in "mode 1" which isn't suitable for my needs. Via the CLI I can launch it in "mode 6" (the mode that I need it to launch in) with;

raspivid -md 6

So my question is how could I go about sending these same flags through the addon / OpenFrameworks? ie. something like


void ofxCvPiCam::setMode(int i) {

    // ???

}

Many thanks!

@gsautr
Copy link
Author

gsautr commented Feb 22, 2017

Just tried adding this...

int ofxCvPiCam::setMode(int mode){
    if (!camera)
         return 1;

      return mmal_status_to_int(mmal_port_parameter_set_uint32(camera->control, MMAL_PARAMETER_CAMERA_CUSTOM_SENSOR_CONFIG, mode));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant