mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-04 22:48:54 +00:00
allow adding test sources
This commit is contained in:
parent
e21bce1843
commit
b37a92b255
1 changed files with 28 additions and 0 deletions
|
@ -64,6 +64,8 @@ void app_add_file (App * app, gchar * filename);
|
|||
|
||||
void app_add_title (App * app);
|
||||
|
||||
void app_add_test (App * app);
|
||||
|
||||
GList *app_get_selected_objects (App * app);
|
||||
|
||||
void app_delete_objects (App * app, GList * objects);
|
||||
|
@ -82,6 +84,8 @@ void add_file_activate_cb (GtkAction * item, App * app);
|
|||
|
||||
void add_text_activate_cb (GtkAction * item, App * app);
|
||||
|
||||
void add_test_activate_cb (GtkAction * item, App * app);
|
||||
|
||||
void app_selection_changed_cb (GtkTreeSelection * selection, App * app);
|
||||
|
||||
void app_toggle_playback (App * app);
|
||||
|
@ -185,6 +189,12 @@ add_text_activate_cb (GtkAction * item, App * app)
|
|||
app_add_title (app);
|
||||
}
|
||||
|
||||
void
|
||||
add_test_activate_cb (GtkAction * item, App * app)
|
||||
{
|
||||
app_add_test (app);
|
||||
}
|
||||
|
||||
void
|
||||
play_activate_cb (GtkAction * item, App * app)
|
||||
{
|
||||
|
@ -469,6 +479,20 @@ app_add_title (App * app)
|
|||
obj, -1);
|
||||
}
|
||||
|
||||
void
|
||||
app_add_test (App * app)
|
||||
{
|
||||
GESTimelineObject *obj;
|
||||
|
||||
GST_DEBUG ("adding test");
|
||||
|
||||
obj = GES_TIMELINE_OBJECT (ges_timeline_test_source_new ());
|
||||
g_object_set (G_OBJECT (obj), "duration", GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
(app->layer), obj, -1);
|
||||
}
|
||||
|
||||
App *
|
||||
app_new (void)
|
||||
{
|
||||
|
@ -633,6 +657,10 @@ layer_object_added_cb (GESTimelineLayer * layer, GESTimelineObject * object,
|
|||
title_source_text_changed_cb (object, NULL, app);
|
||||
}
|
||||
|
||||
else if (GES_IS_TIMELINE_TEST_SOURCE (object)) {
|
||||
gtk_list_store_set (app->model, &iter, 2, object, 0, "Test Source", -1);
|
||||
}
|
||||
|
||||
g_signal_connect (G_OBJECT (object), "notify::duration",
|
||||
G_CALLBACK (timeline_object_notify_duration_cb), app);
|
||||
timeline_object_notify_duration_cb (object, NULL, app);
|
||||
|
|
Loading…
Reference in a new issue