[sushi/wip/cosimoc/no-clutter: 42/67] 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: 42/67] media-bin: add a size-change signal
- Date: Mon, 30 Apr 2018 15:17:10 +0000 (UTC)
commit 6741f8e8111fae7590600c388bdef4202c28d25c
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 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/libsushi/sushi-media-bin.c b/src/libsushi/sushi-media-bin.c
index a94f052..fb1d747 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
};
@@ -1156,6 +1157,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);
@@ -1802,6 +1813,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]