mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-03 02:33:53 +00:00
connect to duration and max-duration changed of filesources
This commit is contained in:
parent
8ae5872787
commit
2919d61bf8
1 changed files with 55 additions and 1 deletions
|
@ -62,6 +62,19 @@ gboolean create_ui (App * app);
|
||||||
static gboolean find_row_for_object (GtkListStore * model, GtkTreeIter * ret,
|
static gboolean find_row_for_object (GtkListStore * model, GtkTreeIter * ret,
|
||||||
GESTimelineObject * object);
|
GESTimelineObject * object);
|
||||||
|
|
||||||
|
void timeline_object_notify_duration_cb (GESTimelineObject * object,
|
||||||
|
GParamSpec * arg G_GNUC_UNUSED, App * app);
|
||||||
|
|
||||||
|
void filesource_notify_duration_cb (GESTimelineObject * object, GParamSpec *
|
||||||
|
arg G_GNUC_UNUSED, App * app);
|
||||||
|
|
||||||
|
void filesource_notify_max_duration_cb (GESTimelineObject * object, GParamSpec *
|
||||||
|
arg G_GNUC_UNUSED, App * app);
|
||||||
|
|
||||||
|
void connect_to_filesource (GESTimelineObject * object, App * app);
|
||||||
|
|
||||||
|
void disconnect_from_filesource (GESTimelineObject * object, App * app);
|
||||||
|
|
||||||
/* signal handlers **********************************************************/
|
/* signal handlers **********************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -297,7 +310,28 @@ layer_object_removed_cb (GESTimelineLayer * layer, GESTimelineObject * object,
|
||||||
gtk_list_store_remove (app->model, &iter);
|
gtk_list_store_remove (app->model, &iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Layout *******************************************************************/
|
void
|
||||||
|
timeline_object_notify_duration_cb (GESTimelineObject * object,
|
||||||
|
GParamSpec * arg G_GNUC_UNUSED, App * app)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
filesource_notify_duration_cb (GESTimelineObject * object,
|
||||||
|
GParamSpec * arg G_GNUC_UNUSED, App * app)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
filesource_notify_max_duration_cb (GESTimelineObject * object,
|
||||||
|
GParamSpec * arg G_GNUC_UNUSED, App * app)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* UI Configuration *********************************************************/
|
||||||
|
|
||||||
#define GET_WIDGET(dest,name,type) {\
|
#define GET_WIDGET(dest,name,type) {\
|
||||||
if (!(dest =\
|
if (!(dest =\
|
||||||
|
@ -305,6 +339,26 @@ layer_object_removed_cb (GESTimelineLayer * layer, GESTimelineObject * object,
|
||||||
goto fail;\
|
goto fail;\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
connect_to_filesource (GESTimelineObject * object, App * app)
|
||||||
|
{
|
||||||
|
g_signal_connect (G_OBJECT (object), "notify::duration",
|
||||||
|
G_CALLBACK (filesource_notify_duration_cb), app);
|
||||||
|
|
||||||
|
g_signal_connect (G_OBJECT (object), "notify::maxduration",
|
||||||
|
G_CALLBACK (filesource_notify_max_duration_cb), app);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
disconnect_from_filesource (GESTimelineObject * object, App * app)
|
||||||
|
{
|
||||||
|
g_signal_handlers_disconnect_by_func (G_OBJECT (object),
|
||||||
|
filesource_notify_duration_cb, app);
|
||||||
|
|
||||||
|
g_signal_handlers_disconnect_by_func (G_OBJECT (object),
|
||||||
|
filesource_notify_max_duration_cb, app);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
create_ui (App * app)
|
create_ui (App * app)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue