asalamon74 / pktriggercord

Remote control for Pentax DSLR cameras
http://pktriggercord.melda.info
GNU Lesser General Public License v3.0
103 stars 38 forks source link

Libpktriggercord #68

Open blemasle opened 3 years ago

blemasle commented 3 years ago

What's this ?

This PR reworks pktriggercord so that we can build and expose pktriggercord as a static or dynamic library for other projects to plug in. A fair bit of work have been done to give the Makefile an overhaul to allow this, and almost all methods have been renamed with a standardized naming.

Why ?

While this will be a breaking change for projects that currently use a forked/modified version of pktriggercord, subsequent modifications and fixes will be much easier and quicker to propagate as it could be done by just updating the lib on the target systems rather than reshipping the entire project with the forked code. For instance, indi have a pentax driver that rely on gphotos2 that itself relies on a forked pktriggercord. Another driver has recently come to light by @karlrees who also contributed to this PR, but the it's the same story : it uses a forked and modified version of pktriggercord.

Previously, every single package of the chain had to updated for a simple fix to be applied. No more :)

Left to do

I have absolutely zero knownledge in linux package distribution (I only use them), but I think that a libpktriggercord package is mandatory for the library to be useful.

There is also a couple of opened PRs that we'll need to to manually merge into this one as methods & code have been moved around :)

Breaking changes in this PR

Breaking changes comes from the renaming that has been done all over the place :)

Member Renamed to
camera_close pslr_camera_close
camera_connect pslr_camera_connect
collect_settings_info pslr_get_settings_info
collect_status_info pslr_get_status_info
copyright pslr_copyright
debug_onoff pslr_set_debugmode
file_formats pslr_user_file_formats
find_model_by_id pslr_find_model_by_id
find_setting_by_name pslr_find_setting_by_name
format_rational pslr_format_rational
get_file_format_t pslr_get_user_file_format_t
get_hw_jpeg_quality pslr_get_hw_jpeg_quality
get_lens_name pslr_get_lens_name
get_pslr_ae_metering pslr_get_ae_metering
get_pslr_ae_metering_str pslr_get_ae_metering_str
get_pslr_af_mode pslr_get_af_mode
get_pslr_af_mode_str pslr_get_af_mode_str
get_pslr_af_point_sel pslr_get_af_point_sel
get_pslr_af_point_sel_str pslr_get_af_point_sel_str
get_pslr_af11_point_str pslr_get_af11_point_str
get_pslr_color_space pslr_get_color_space
get_pslr_color_space_str pslr_get_color_space_str
get_pslr_custom_ev_steps_str pslr_get_custom_ev_steps_str
get_pslr_custom_sensitivity_steps_str pslr_get_custom_sensitivity_steps_str
get_pslr_drive_mode pslr_get_drive_mode
get_pslr_drive_mode_str pslr_get_drive_mode_str
get_pslr_flash_mode pslr_get_flash_mode
get_pslr_flash_mode_str pslr_get_flash_mode_str
get_pslr_image_format_str pslr_get_image_format_str
get_pslr_jpeg_image_tone pslr_get_jpeg_image_tone
get_pslr_jpeg_image_tone_str pslr_get_jpeg_image_tone_str
get_pslr_raw_format_str pslr_get_raw_format_str
get_pslr_scene_mode_str pslr_get_scene_mode_str
get_pslr_white_balance_mode pslr_get_white_balance_mode
get_pslr_white_balance_mode_str pslr_get_white_balance_mode_str
get_user_file_format pslr_get_user_file_format
pslr_camera_name pslr_get_camera_name
pslr_read_datetime pslr_get_datetime
pslr_read_dspinfo pslr_get_dspinfo
pslr_read_setting pslr_get_setting
pslr_read_settings pslr_get_settings
pslr_select_af_point pslr_set_selected_af_point
pslr_set_ec plsr_set_expose_compensation
pslr_write_setting pslr_set_setting
pslr_write_setting_by_name pslr_set_setting_by_name
shexdump pslr_hexdump

PS : given the breaking changes, I think that version should be bumped to 0.86.0.