On Mon, Aug 30, 2021 at 04:55:47PM -0700, Dan Fandrich wrote:
> On Mon, Aug 30, 2021 at 11:08:25AM -0400, xiang5 wrote:
> > I hope this email list could help me solve the problems I am having. I am 
> > using Nikon D3500 for a project. What I need now is getting camera live 
> > view stream and show in my application. I am wondering is there any 
> > function I can use to get the lives stream pointer so that I could display 
> > it on my screen?
> 
> I don't know if that camera specifically supports live streaming, but you can
> see how the simple program like
> https://github.com/aqiank/gphoto2-liveview-example works to display a camera
> live stream. That particular program relies on the gphoto2 CLI to get the 
> data,
> so you'd have to read its code to figure out how to write a self-contained
> application using libgphoto2 directly. The API documentation at
> http://gphoto.org/doc/api/ will help with that.

The libgphoto2 API has 

int gp_camera_capture_preview    (Camera *camera, CameraFile *file,
                                  GPContext *context);

Whichs returns 1 JPEG frame of the liveview (via a CameraFile* struct).

You can push this JPEG to your rendering pipeline.

The D3500 I have noted down as able to capture liveview.

Ciao, Marcus


_______________________________________________
Gphoto-devel mailing list
Gphoto-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gphoto-devel

Reply via email to