mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
tests: Implement tests for ges_formatter_can_load_uri
This commit is contained in:
parent
6462b86ac4
commit
b731a42145
3 changed files with 69 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test-utils.h"
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -56,6 +57,22 @@ compare (GKeyFile * cmp, GESFormatter * formatter, GESTimeline * timeline)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_START_TEST (test_simple)
|
||||||
|
{
|
||||||
|
gchar *uri = ges_test_file_uri ("test.xptv");
|
||||||
|
|
||||||
|
ges_init ();
|
||||||
|
|
||||||
|
fail_unless (ges_formatter_can_load_uri (uri, NULL));
|
||||||
|
g_free (uri);
|
||||||
|
|
||||||
|
uri = ges_test_file_uri ("wrong_test.xptv");
|
||||||
|
fail_if (ges_formatter_can_load_uri (uri, NULL));
|
||||||
|
g_free (uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_END_TEST;
|
||||||
|
|
||||||
GST_START_TEST (test_keyfile_save)
|
GST_START_TEST (test_keyfile_save)
|
||||||
{
|
{
|
||||||
GESTimeline *timeline;
|
GESTimeline *timeline;
|
||||||
|
@ -764,6 +781,7 @@ ges_suite (void)
|
||||||
|
|
||||||
suite_add_tcase (s, tc_chain);
|
suite_add_tcase (s, tc_chain);
|
||||||
|
|
||||||
|
tcase_add_test (tc_chain, test_simple);
|
||||||
tcase_add_test (tc_chain, test_keyfile_save);
|
tcase_add_test (tc_chain, test_keyfile_save);
|
||||||
tcase_add_test (tc_chain, test_keyfile_load);
|
tcase_add_test (tc_chain, test_keyfile_load);
|
||||||
tcase_add_test (tc_chain, test_keyfile_identity);
|
tcase_add_test (tc_chain, test_keyfile_identity);
|
||||||
|
|
50
tests/check/ges/test.xptv
Normal file
50
tests/check/ges/test.xptv
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<pitivi formatter="GES" version="0.2">
|
||||||
|
<factories>
|
||||||
|
<sources>
|
||||||
|
<source filename="file://./audio_video.ogg" id="1"/>
|
||||||
|
</sources>
|
||||||
|
</factories>
|
||||||
|
<timeline>
|
||||||
|
<tracks>
|
||||||
|
<track>
|
||||||
|
<stream caps="video/x-raw-yuv; video/x-raw-rgb" type="pitivi.stream.VideoStream"/>
|
||||||
|
<track-objects>
|
||||||
|
<track-object active="(bool)True" locked="(bool)True" priority="(int)0" duration="(gint64)14400000000" start="(gint64)14400000000" in_point="(gint64)0" id="0" type="pitivi.timeline.track.SourceTrackObject">
|
||||||
|
<factory-ref id="1"/>
|
||||||
|
</track-object>
|
||||||
|
<track-object active="(bool)True" locked="(bool)True" priority="(int)0" duration="(gint64)14400000000" start="(gint64)0" in_point="(gint64)0" id="1" type="pitivi.timeline.track.SourceTrackObject">
|
||||||
|
<factory-ref id="1"/>
|
||||||
|
</track-object>
|
||||||
|
</track-objects>
|
||||||
|
</track>
|
||||||
|
<track>
|
||||||
|
<stream caps="audio/x-raw-int; audio/x-raw-float" type="pitivi.stream.AudioStream"/>
|
||||||
|
<track-objects>
|
||||||
|
<track-object active="(bool)True" locked="(bool)True" priority="(int)0" duration="(gint64)14400000000" start="(gint64)14400000000" in_point="(gint64)0" id="2" type="pitivi.timeline.track.SourceTrackObject">
|
||||||
|
<factory-ref id="1"/>
|
||||||
|
</track-object>
|
||||||
|
<track-object active="(bool)True" locked="(bool)True" priority="(int)0" duration="(gint64)14400000000" start="(gint64)0" in_point="(gint64)0" id="3" type="pitivi.timeline.track.SourceTrackObject">
|
||||||
|
<factory-ref id="1"/>
|
||||||
|
</track-object>
|
||||||
|
</track-objects>
|
||||||
|
</track>
|
||||||
|
</tracks>
|
||||||
|
<timeline-objects>
|
||||||
|
<timeline-object>
|
||||||
|
<factory-ref id="1"/>
|
||||||
|
<track-object-refs>
|
||||||
|
<track-object-ref id="2"/>
|
||||||
|
<track-object-ref id="0"/>
|
||||||
|
</track-object-refs>
|
||||||
|
</timeline-object>
|
||||||
|
<timeline-object>
|
||||||
|
<factory-ref id="1"/>
|
||||||
|
<track-object-refs>
|
||||||
|
<track-object-ref id="3"/>
|
||||||
|
<track-object-ref id="1"/>
|
||||||
|
</track-object-refs>
|
||||||
|
</timeline-object>
|
||||||
|
</timeline-objects>
|
||||||
|
</timeline>
|
||||||
|
</pitivi>
|
||||||
|
|
1
tests/check/ges/wrong_test.xptv
Normal file
1
tests/check/ges/wrong_test.xptv
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<Nothing/>
|
Loading…
Reference in a new issue