From 1756af1809bf26457dfaa03d3fc0d2b5248517fa Mon Sep 17 00:00:00 2001 From: Patrick Keroulas Date: Sun, 1 Dec 2019 21:15:35 -0500 Subject: [PATCH 1/2] fix compile issue caused by boost signals binding Tested with libboost 1.65.1 --- src/brcosaeffect.cpp | 4 ++-- src/brcosaeffect.h | 4 ++-- src/gui.cpp | 16 ++++++++-------- src/gui.h | 16 ++++++++-------- tests/check_properties.cpp | 8 ++++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/brcosaeffect.cpp b/src/brcosaeffect.cpp index f4d81e6..65c4e90 100644 --- a/src/brcosaeffect.cpp +++ b/src/brcosaeffect.cpp @@ -79,14 +79,14 @@ void BrCoSaEffect::setup_actor(ClutterActor *actor) clutter_actor_set_shader(actor, shader_); } -void BrCoSaEffect::on_contrast_changed(std::string &name, float value) +void BrCoSaEffect::on_contrast_changed(std::string name, float value) { UNUSED(name); contrast_ = value; update_all_actors(); } -void BrCoSaEffect::on_saturation_changed(std::string &name, float value) +void BrCoSaEffect::on_saturation_changed(std::string name, float value) { UNUSED(name); saturation_ = value; diff --git a/src/brcosaeffect.h b/src/brcosaeffect.h index 7b7d54e..05593c0 100644 --- a/src/brcosaeffect.h +++ b/src/brcosaeffect.h @@ -34,8 +34,8 @@ class BrCoSaEffect: public Effect virtual void init_properties(); virtual void update_actor(ClutterActor *actor); virtual void setup_actor(ClutterActor *actor); - void on_saturation_changed(std::string &name, float value); - void on_contrast_changed(std::string &name, float value); + void on_saturation_changed(std::string name, float value); + void on_contrast_changed(std::string name, float value); float contrast_; float saturation_; ClutterShader *shader_; diff --git a/src/gui.cpp b/src/gui.cpp index 9d591d2..f5386bf 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -106,7 +106,7 @@ gboolean Gui::on_mouse_button_event(ClutterActor* /* actor */, ClutterEvent *eve /** * [0,255] */ -void Gui::on_livefeed_opacity_changed(std::string &name, int value) +void Gui::on_livefeed_opacity_changed(std::string name, int value) { UNUSED(name); if (owner_->get_configuration()->get_verbose()) @@ -414,7 +414,7 @@ gboolean Gui::key_press_event(ClutterActor *stage, ClutterEvent *event, gpointer return TRUE; } -void Gui::on_crossfade_ratio_changed(std::string &name, float value) +void Gui::on_crossfade_ratio_changed(std::string name, float value) { UNUSED(name); if (crossfade_ratio_ != value) @@ -904,7 +904,7 @@ void on_playback_texture_size_changed(ClutterTexture *texture, gui->resize_actors(); } -void Gui::on_blending_mode_int_property_changed(std::string &name, int value) +void Gui::on_blending_mode_int_property_changed(std::string name, int value) { UNUSED(name); if (value == 1) @@ -913,7 +913,7 @@ void Gui::on_blending_mode_int_property_changed(std::string &name, int value) set_blending_mode(BLENDING_MODE_NORMAL); } -void Gui::on_playback_opacity_changed(std::string &name, int value) +void Gui::on_playback_opacity_changed(std::string name, int value) { UNUSED(name); clutter_actor_set_opacity(playback_group_, value); @@ -1168,7 +1168,7 @@ void Gui::show() } } -void Gui::on_black_out_opacity_changed(std::string &name, int value) +void Gui::on_black_out_opacity_changed(std::string name, int value) { if (owner_->get_configuration()->get_verbose()) g_print("make black_out opacity %d\n", value); @@ -1176,7 +1176,7 @@ void Gui::on_black_out_opacity_changed(std::string &name, int value) clutter_actor_set_opacity(black_out_rectangle_, value); } -void Gui::on_black_out_changed(std::string &name, int value) +void Gui::on_black_out_changed(std::string name, int value) { if (owner_->get_configuration()->get_verbose()) g_print("toggle black_out %d\n", value); @@ -1326,7 +1326,7 @@ std::string Gui::get_blending_mode_name(BlendingMode mode) } } -void Gui::on_save_clip(unsigned int clip_number, std::string &file_name) +void Gui::on_save_clip(unsigned int clip_number, std::string file_name) { std::ostringstream os; os << "Saving clip " << clip_number << " as " << file_name; @@ -1335,7 +1335,7 @@ void Gui::on_save_clip(unsigned int clip_number, std::string &file_name) animate_progress_bar(); } -void Gui::on_save_project(std::string &file_name) +void Gui::on_save_project(std::string file_name) { std::ostringstream os; os << "Saving project as " << file_name; diff --git a/src/gui.h b/src/gui.h index db92420..9de13d7 100644 --- a/src/gui.h +++ b/src/gui.h @@ -77,14 +77,14 @@ class Gui static void on_fullscreen(ClutterStage *stage, gpointer user_data); static void on_unfullscreen(ClutterStage *stage, gpointer user_data); static void on_render_frame(ClutterTimeline * timeline, gint msecs, gpointer user_data); - void on_blending_mode_int_property_changed(std::string &name, int value); - void on_crossfade_ratio_changed(std::string &name, float value); - void on_livefeed_opacity_changed(std::string &name, int value); - void on_black_out_changed(std::string &name, int value); - void on_black_out_opacity_changed(std::string &name, int value); - void on_playback_opacity_changed(std::string &name, int value); - void on_save_clip(unsigned int clip_number, std::string &file_name); - void on_save_project(std::string &file_name); + void on_blending_mode_int_property_changed(std::string name, int value); + void on_crossfade_ratio_changed(std::string name, float value); + void on_livefeed_opacity_changed(std::string name, int value); + void on_black_out_changed(std::string name, int value); + void on_black_out_opacity_changed(std::string name, int value); + void on_playback_opacity_changed(std::string name, int value); + void on_save_clip(unsigned int clip_number, std::string file_name); + void on_save_project(std::string file_name); void enable_onionskin(bool value); void set_onionskin_opacity(int value); void hideCursor(); diff --git a/tests/check_properties.cpp b/tests/check_properties.cpp index a79e2fb..c0254d7 100644 --- a/tests/check_properties.cpp +++ b/tests/check_properties.cpp @@ -4,22 +4,22 @@ #include #include -void int_cb(std::string &name, int value) +void int_cb(std::string name, int value) { std::cout << name << " changed to " << value << std::endl; } -void float_cb(std::string &name, float value) +void float_cb(std::string name, float value) { std::cout << name << " changed to " << value << std::endl; } -void string_cb(std::string &name, std::string value) +void string_cb(std::string name, std::string value) { std::cout << name << " changed to " << value << std::endl; } -void bool_cb(std::string &name, bool value) +void bool_cb(std::string name, bool value) { std::cout << name << " changed to " << value << std::endl; } From a81de17656d102e442e8f897f3f35e63adb1ae86 Mon Sep 17 00:00:00 2001 From: Patrick Keroulas Date: Sun, 16 Jun 2019 22:18:55 -0400 Subject: [PATCH 2/2] update glutter-gst-dev to version 3.0 --- configure.ac | 3 +-- src/pipeline.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5cf448a..069790f 100644 --- a/configure.ac +++ b/configure.ac @@ -70,8 +70,7 @@ AC_SUBST([CLUTTER_CFLAGS]) # libjson-glib-dev and others # Clutter-GST -PKG_CHECK_MODULES([CLUTTERGST], [clutter-gst-2.0 >= 2.0], have_clutter_gst=true, - PKG_CHECK_MODULES([CLUTTERGST], [clutter-gst-1.0 >= 1.0], have_clutter_gst=true, have_clutter_gst=false)) +PKG_CHECK_MODULES([CLUTTERGST], [clutter-gst-3.0 >= 3.0], have_clutter_gst=true, have_clutter_gst=false) if test "x${have_clutter_gst}" = "xfalse" ; then AC_MSG_ERROR([missing package: libclutter-gst-dev]) fi diff --git a/src/pipeline.cpp b/src/pipeline.cpp index 06105db..10c0f9b 100644 --- a/src/pipeline.cpp +++ b/src/pipeline.cpp @@ -461,8 +461,8 @@ Pipeline::Pipeline(Application* owner) : GstElement* queue0 = gst_element_factory_make("queue", "queue0"); g_assert(queue0); - videosink_ = gst_element_factory_make ("cluttersink", NULL); - g_object_set (videosink_, "texture", CLUTTER_TEXTURE(owner_->get_gui()->get_live_input_texture()), NULL); + videosink_ = gst_element_factory_make ("clutterautovideosink", NULL); + g_object_set (videosink_, "content", clutter_actor_get_content(owner_->get_gui()->get_live_input_texture()), NULL); // TODO: Make sure the rendering FPS is constant, and not subordinate to // the FPS of the camera.