[sushi/wip/cosimoc/no-clutter: 62/66] media-bin: add a size-change signal
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi/wip/cosimoc/no-clutter: 62/66] media-bin: add a size-change signal
- Date: Sat, 8 Jun 2019 18:45:21 +0000 (UTC)
commit 08a89e3aa0d74716520302542af8d21bbff92da3
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Apr 2 15:23:52 2017 -0700
media-bin: add a size-change signal
src/libsushi/sushi-media-bin.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/src/libsushi/sushi-media-bin.c b/src/libsushi/sushi-media-bin.c
index ac37cf8..d981e13 100644
--- a/src/libsushi/sushi-media-bin.c
+++ b/src/libsushi/sushi-media-bin.c
@@ -166,6 +166,7 @@ enum
enum
{
ERROR,
+ SIZE_CHANGE,
LAST_SIGNAL
};
@@ -1179,6 +1180,16 @@ sushi_media_bin_class_init (SushiMediaBinClass *klass)
g_signal_accumulator_true_handled, NULL,
NULL,
G_TYPE_BOOLEAN, 1, G_TYPE_ERROR);
+ /**
+ * SushiMediaBin::size-change:
+ * @self: the #SushiMediaBin which received the signal.
+ */
+ sushi_media_bin_signals[SIZE_CHANGE] =
+ g_signal_new ("size-change",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 0);
/* Action signals for key bindings */
SMB_DEFINE_ACTION_SIGNAL (object_class, "toggle", sushi_media_bin_action_toggle, 1, G_TYPE_STRING);
@@ -1826,6 +1837,8 @@ sushi_media_bin_handle_streams_selected (SushiMediaBin *self, GstMessage *msg)
else
priv->video_width = priv->video_height = 0;
+ g_signal_emit (self, sushi_media_bin_signals[SIZE_CHANGE], 0);
+
gst_caps_unref (caps);
gst_object_unref (collection);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]