From 346a01b4eb0a175fc78dec4d13d5ad21350e503f Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 21 Sep 2012 15:48:56 +0200 Subject: [PATCH] tests: First filesource test port to assets --- tests/check/ges/audio_only.ogg | Bin 0 -> 3645 bytes tests/check/ges/audio_video.ogg | Bin 0 -> 17738 bytes tests/check/ges/filesource.c | 116 +++++++++++++++++++++++++++------------- 3 files changed, 78 insertions(+), 38 deletions(-) create mode 100644 tests/check/ges/audio_only.ogg create mode 100644 tests/check/ges/audio_video.ogg diff --git a/tests/check/ges/audio_only.ogg b/tests/check/ges/audio_only.ogg new file mode 100644 index 0000000000000000000000000000000000000000..6baf00732e479d4297161ce3893d9d067870e5d7 GIT binary patch literal 3645 zcmai1eNYqE7QY}L0Vxd-Fwoc+Y9a}uC738tu_O?Ig$UWOKteMVFclg@kr1o%${QpB zX+(y`5H-d=u*8A_ZLFa9s-qSVfue{3De}-#34YX%b_&k)O?`J4we4TMb9eXb@1Bo) z&pqev+0?CDrN9-uXum&SwjC#@FBYg>-gMdVVM$)01_xZ?Tk!_~<F8QkA zlK4pb*4yR2vgdzlyB95}Spi403X2O?rIu`^Z!65pAe7US=uwfJsK}_u)pS;>x~QPtqudYz#hR)iryd~h3c6x zSw>x045X_05G%wnvhd|i#4muO0@70bbY!%T?r!umnqI`uB13GJu76#4#-eNGLuLjq zF-_;epQY(9MX(GN-H~U4^lm&>O~sFqeK&NAh1C{a67N}veyd<-(1HzyAhAy8A?Ty( zHwoYjJoslQ`T;?6h(4T8`iGv*-4Y1u0BAVMG8|=jlS58=gFXPru@cJV?X)YO(yrKP zi%GA^+~EcR668xXG$q#lm}q3kj7*}>d~!Tu;3Uzb2=PP!(j-2j?G#T!ZVLdUhG>H= z%U~-oIIC+(`l?n}P!50_G{cRPZb&f2UrooxI@J?@>e*&xFd+_oNWNb9ev3zSxTrGG7Z~=P$J;cI+}9HgxfwR?X0r87pT9Qb(;a z9}DDjTDu!$-V0Qieb+ThIF4-}y7!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pF|VelH<>1fIUbf?5Zz-iiUsK*QpP h+IKg1G;DZY`tL_0WoJ|8cYNsFQAG5rTxyjI_&?>{iN^o{ literal 0 HcmV?d00001 diff --git a/tests/check/ges/audio_video.ogg b/tests/check/ges/audio_video.ogg new file mode 100644 index 0000000000000000000000000000000000000000..8d7b53879a61139d9590407aea0a3ff47873b1d1 GIT binary patch literal 17738 zcmc(F1yoes_vk1oqJ)%$f^&!j->^}RPbML-0qhW2W4Z05c3%K14-vRtYF=`*8;3J*>tFl}_+kAq!wGQpY@KX)G+eCdpV^w} zTp6cVrRV46BRgEW7rbr80M>k7X zH+m0Kcgt%ye+)m6f24B_BntvDxl(Z`<+)M>5>v}--d&=VAF$uLEB~0ppO*izK`*mw z3`1_Fe24*?-%tz;bgA%K&XX)KOb(wRkXcGEHh@(Mz(T|Tn(ZZxSpM&eqL>Z9mBXhC zT;dfa3|JODp$$|N(<26GYxIFc^7Y99C1QXulaPvL0It{?ZD2bWTbO?bZ#_jIwh&u{ z|2N)GV*xkiLy`kjg-)mgt>ru^{`g>$Q;7+{mHR{$s3ZqOfGbu{7T7CSNFB%_hJQbh zUeJOZ6axZfX0wH5vk?$eR}z3efk4EvT4deMw4dM5ey*UsiGNEU=Wa!5R4YgL3B!i#km_i7!0FkX>_@pioW zJISx8z_+t+l!`5+E@kT9P6k(q(WR=?c*UlKHHfXIx(<9^N#z>=ujETvvC$&obxhEr-Am8@0)U@8q>kQB8`n(L*htII~` zI&JEm%VA+lLww3mCxB^mtaBFl&(ljeC?|XjEGfhP0fBN9x!4 z7)%Bk9sA4y?F4D67jLQmZ|%?2fqMcyu-X4iguRQ(wNGq~DUSH>X#xuhaw1c{+Hb0r zOll)c{Ucl&`+^#Gq_oHsM+ITSY;Nu$(#eS@@S` zgm*PXQV>WymXSU70ekF{XcUvGtj#A5kSy-yi40q0i&_$mWm1i0wvDy+iZ4t`UQbHr zKwpV~h%ZGhAuQiBtjII0&@*Z+B-SP=zOX2nvnPM6v261{wVPKPoCyS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FrbACJ`wU8qVq!1J9D3|#msqoQKtz}tS(q_^lV#m zU8HzsY)Rd9!94$HcBRQ~A{h?XI}`jx^w>?!K=_vA #include /* This test uri will eventually have to be fixed */ #define TEST_URI "http://nowhere/blahblahblah" + +static gchar *av_uri; +GMainLoop *mainloop; + +static void +asset_created_cb (GObject * source, GAsyncResult * res, gpointer udata) +{ + GList *tracks, *tmp; + GESAsset *asset; + GESTimelineLayer *layer; + GESTimelineFileSource *tlfs; + + GError *error = NULL; + + asset = ges_asset_request_finish (res, &error); + fail_unless (error == NULL); + fail_if (asset == NULL); + fail_if (g_strcmp0 (ges_asset_get_id (asset), av_uri)); + + layer = GES_TIMELINE_LAYER (g_async_result_get_user_data (res)); + tlfs = GES_TIMELINE_FILE_SOURCE (ges_timeline_layer_add_asset (layer, + asset, 0, 0, GST_CLOCK_TIME_NONE, 1, GES_TRACK_TYPE_UNKNOWN)); + fail_unless (GES_IS_TIMELINE_FILE_SOURCE (tlfs)); + fail_if (g_strcmp0 (ges_timeline_filesource_get_uri (tlfs), av_uri)); + assert_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tlfs), GST_SECOND); + + fail_unless (ges_timeline_object_get_supported_formats + (GES_TIMELINE_OBJECT (tlfs)) & GES_TRACK_TYPE_VIDEO); + fail_unless (ges_timeline_object_get_supported_formats + (GES_TIMELINE_OBJECT (tlfs)) & GES_TRACK_TYPE_AUDIO); + + tracks = ges_timeline_get_tracks (ges_timeline_layer_get_timeline (layer)); + for (tmp = tracks; tmp; tmp = tmp->next) { + GList *tckobjs = ges_track_get_objects (GES_TRACK (tmp->data)); + + assert_equals_int (g_list_length (tckobjs), 1); + fail_unless (GES_IS_TRACK_FILESOURCE (tckobjs->data)); + g_list_free_full (tckobjs, gst_object_unref); + } + g_list_free_full (tracks, gst_object_unref); + + gst_object_unref (asset); + g_main_loop_quit (mainloop); +} + GST_START_TEST (test_filesource_basic) { - GESTrack *track; - GESTrackObject *trackobject; - GESTimelineFileSource *source; - gchar *uri; + GESTimeline *timeline; + GESTimelineLayer *layer; - ges_init (); + fail_unless (ges_init ()); - track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY); - fail_unless (track != NULL); + mainloop = g_main_loop_new (NULL, FALSE); - source = ges_timeline_filesource_new ((gchar *) TEST_URI); - fail_unless (source != NULL); - - /* Make sure the object was properly set */ - g_object_get (source, "uri", &uri, NULL); - fail_unless (g_ascii_strcasecmp (uri, TEST_URI) == 0); - g_free (uri); - - /* Make sure no track object is created for an incompatible - * track. */ - trackobject = - ges_timeline_object_create_track_object (GES_TIMELINE_OBJECT (source), - track); - fail_unless (trackobject == NULL); - - /* Make sure the track object is created for a compatible track. */ - g_object_set (source, "supported-formats", GES_TRACK_TYPE_CUSTOM, NULL); - trackobject = - ges_timeline_object_create_track_object (GES_TIMELINE_OBJECT (source), - track); - ges_timeline_object_add_track_object (GES_TIMELINE_OBJECT (source), - trackobject); - fail_unless (trackobject != NULL); + timeline = ges_timeline_new_audio_video (); + fail_unless (timeline != NULL); - /* The track holds a reference to the object - * and the timelineobject holds a reference on the object */ - ASSERT_OBJECT_REFCOUNT (trackobject, "Track Object", 2); + layer = ges_timeline_layer_new (); + fail_unless (layer != NULL); + fail_unless (ges_timeline_add_layer (timeline, layer)); - fail_unless (ges_timeline_object_release_track_object (GES_TIMELINE_OBJECT - (source), trackobject) == TRUE); + ges_asset_request_async (GES_TYPE_TIMELINE_FILE_SOURCE, + av_uri, NULL, asset_created_cb, layer); - g_object_unref (source); - g_object_unref (track); + g_main_loop_run (mainloop); + g_main_loop_unref (mainloop); + g_object_unref (timeline); } GST_END_TEST; +#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \ + guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \ + g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \ + "media-start", &pmstart, "media-duration", &pmdur, \ + "priority", &pprio, "active", &pact, \ + NULL); \ + assert_equals_uint64 (pstart, start); \ + assert_equals_uint64 (pdur, duration); \ + assert_equals_uint64 (pmstart, mstart); \ + assert_equals_uint64 (pmdur, mduration); \ + assert_equals_int (pprio, priority); \ + assert_equals_int (pact, active); \ + } + + GST_START_TEST (test_filesource_properties) { GESTrack *track; @@ -211,9 +247,13 @@ main (int argc, char **argv) gst_check_init (&argc, &argv); + av_uri = ges_test_get_audio_video_uri (); + srunner_run_all (sr, CK_NORMAL); nf = srunner_ntests_failed (sr); srunner_free (sr); + g_free (av_uri); + return nf; } -- 2.7.4