Move GstPhotography interface to -base
@tpm
Submitted by Tim Müller Link to original bug (#774779)
Description
We should move this. It is a prerequisite to moving camerabin.
Some comments/questions after reviewing:
-
GST_PHOTOGRAPHY_AUTOFOCUS_DONE: Name of custom GstMessage that will be
posted to #GstBus when autofocusing is complete. Shouldn't we have a
gst_photography_is_autofocus_done_message() for this, just like we have
gst_is_video_overlay_prepare_window_handle_message() and
gst_is_missing_plugin_message(), plus _parse_autofocus_done_message()? -
GST_PHOTOGRAPHY_SHAKE_RISK: same as for AUTOFOCUS done
-
GST_PHOTOGRAPHY_PROP_*(): do we really want to require interface implementors
to implement all of these properties? And then again implement setters as
vfuncs? Seems a bit tedious, and also makes it more difficult for implementors
to only support some of the functionality, doesn't it? (properties are good
for things like automatic UI dialogs of course) -
struct GstPhotographySettings: used to set/get all options in one go. Assumes
implementor supports all options; duplicates other mechanisms of getting and
setting options (wrapper API for interface vfuncs and properties) with a third
option, and the wrapper func doesn't even have fallback code for when the
interface doesn't implement ::set_config or ::get_config. -
struct GstPhotographySettings: if we keep it it needs padding
-
prepare_for_capture: why is the callback not done via a signal instead?
(also, no destroy_notify for user_data, but callback can do that I suppose)
How is failure communicated? Should we differentiate between still image and
video capture? -
typedef void (*GstPhotographyCapturePrepared) (gpointer data, const GstCaps *configured_caps);
why not GstPhotography-implementing object as first argument? -
set_autofocus: no gboolean return like all the others?