GNU Lesser General Public License v2.1

项目介绍

gphoto/libgphoto2 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 GNU Lesser General Public License v2.1 许可证,目前获得 1.4k 个 Star、390 次 Fork。

仓库全名
gphoto/libgphoto2
开源许可证
GNU Lesser General Public License v2.1
Star 数
1.4k
Fork 数
390
未关闭 Issue
454

README 摘要

libgphoto2 Hello and welcome to the wonderful world of gphoto! This is libgphoto2, the successor of gphoto with lots of new features and additional camera drivers. If you miss a feature, would like to report success or failure, or have any questions, please don't hesitate to contact our mailing list. What is libgphoto2? libgphoto2 is a library that can be used by applications to access various digital cameras. For…

完整内容见 GitHub 原始 README 或本页 。

常见问题

libgphoto2 用什么语言开发?

主要使用 C 编写,采用 GNU Lesser General Public License v2.1 许可证,目前有 1.4k 个 Star。

libgphoto2 可以免费商用吗?

仓库标注的许可证为 GNU Lesser General Public License v2.1,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 libgphoto2 的源码?

可以直接克隆仓库:git clone https://github.com/gphoto/libgphoto2.git,默认分支为 master;安装与运行步骤见仓库 README。

libgphoto2 最近还在维护吗?

仓库最近一次更新为 6 天前,当前有 454 个未关闭 Issue;Star 数为 1.4k,可作为社区活跃度的参考。

关于

The libgphoto2 camera access and control library.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
2251
价值分
949
活跃状态
活跃

语言占比

C
C++
HTML
M4
Makefile
Meson
Perl
Python
Shell

README

libgphoto2

Hello and welcome to the wonderful world of gphoto! This is libgphoto2, the successor of gphoto with lots of new features and additional camera drivers.

If you miss a feature, would like to report success or failure, or have any questions, please don’t hesitate to contact our mailing list.

What is libgphoto2?

libgphoto2 is a library that can be used by applications to access various digital cameras. For more information on gphoto, please visit the gphoto project website.

You can find information there about our mailing lists, a list of supported cameras, and the availability of gphoto2. Another source of information is gphoto github project page where you can fetch the source code of gphoto2, libgphoto2, gtkam and other related projects.

What libgphoto2 is NOT

Unlike the original gphoto, libgphoto2 is not a standalone graphical user interface (GUI) application. Instead, it is a backend library. There are several GUI frontends for the gphoto2 library, such as gtkam, a reference implementation for a graphical libgphoto2 client in GTK2.

libgphoto2 can only communicate with cameras that use protocols it understands. If a camera uses a proprietary protocol that has not been publicly documented or reverse-engineered, libgphoto2 will not be able to communicate with it.

USB Communication Protocols

Cameras typically use one of two main protocols for communication via USB:

  • USB Mass Storage protocol: This protocol treats the camera’s internal storage (e.g., an SD card) as a standard disk drive. Your operating system will automatically recognize it as an external drive that you can mount to access files, just like a flash drive. Because there are already built-in OS drivers for this protocol, you do not need libgphoto2 for these cameras.

  • PTP (Picture Transfer Protocol): Developed by Kodak and others, PTP is a dedicated protocol for transferring images. libgphoto2 fully supports PTP. Almost all modern cameras that are not USB Mass Storage devices use this protocol, including models from Nikon, Canon, Fuji, Sony, and Panasonic. Cameras labeled as “PictBridge” also work, as this is an extension of PTP. If a PTP camera is unknown to libgphoto2, it will be detected as a generic PTP camera and will typically still work without any special configuration.

  • MTP (Media Transfer Protocol): MTP is a Microsoft-developed extension of PTP. MTP-capable devices are also accessible through libgphoto2.

For an up-to-date list of supported cameras and their protocol status, please consult the camera list with support status.

Platforms

libgphoto2 is designed to compile and run on most Unix-like platforms. Support for operating systems from Microsoft is not currently available.

Bindings

How do I build it?

If you want to have ‘libgphoto2’ installed into $HOME/.local, keep the PKG_CONFIG_PATH= and --prefix= arguments to configure. Otherwise adapt or remove them.

autoreconf -is  # if using a git clone
./configure PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig${PKG_CONFIG_PATH+":${PKG_CONFIG_PATH}"}" --prefix="$HOME/.local"
make
make install

Out-of-tree builds are supported. ./configure --help may help.

using Meson build system

Since f5bb6c875c143c53bc8ba725e9d34726b31c47af, you can also build the library using Meson:

cd /path/to/source/root
meson setup builddir && cd builddir
meson compile
meson test

Getting the sources

The sources are available at the following places:

The gphoto2 Manual includes important information about setting up USB hotplugging. If you encounter problems, you may also consult the FAQ, which is included in the manual.

Frontends

gphoto2 is a command line frontend which is quite powerful, especially in combination with scripts. See The gphoto2 Manual for more information.

For the GUI lovers, there are many applications that use libgphoto2 as a backend. Examples include:

We also have a GTK2 reference GUI called gtkam, which is unmaintained. Its primary special feature is its capture ability. Additionally, there are plugins for other programs available like kio_camera (which integrates camera support into KDE’s file manager, Konqueror) and a FUSE plugin gphotofs.

Reporting Bugs

Every piece of software contains errors and flaws. So does libgphoto2. When you encounter something that does not work, please do the following:

  1. Find out whether this is a known problem by searching the mailing lists and the Github issues.

  2. Reproduce the problem with debug output enabled and the language set to English, so that the development team will understand the messages. You can do this by running:

     env LC_ALL=C gtkam
    

    if you’re using the gtkam frontend or running:

     env LC_ALL=C gphoto2 --debug-logfile=logfile.log --debug <options>
    

    using the gphoto2 command line interface.

  3. Report the problem on the mailing list with the corresponding debug output if it is small. If it is more than a few kilobytes, please don’t post the complete debug output on the list.

评论

暂无评论