mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
mxf: Add unit tests for H264/PCM
This commit is contained in:
parent
d571b4f8fa
commit
f7f208de70
2 changed files with 55 additions and 0 deletions
|
@ -239,6 +239,32 @@ GST_START_TEST (test_multiple_av_streams)
|
|||
|
||||
GST_END_TEST;
|
||||
|
||||
GST_START_TEST (test_h264_raw_audio)
|
||||
{
|
||||
gchar *pipeline;
|
||||
GstElementFactory *factory = NULL;
|
||||
|
||||
if ((factory = gst_element_factory_find ("x264enc")) == NULL)
|
||||
return;
|
||||
gst_object_unref (factory);
|
||||
if ((factory = gst_element_factory_find ("h264parse")) == NULL)
|
||||
return;
|
||||
gst_object_unref (factory);
|
||||
|
||||
pipeline = g_strdup_printf ("videotestsrc num-buffers=250 ! "
|
||||
"video/x-raw,framerate=25/1 ! "
|
||||
"x264enc ! h264parse ! "
|
||||
"mxfmux name=mux ! "
|
||||
"fakesink "
|
||||
"audiotestsrc num-buffers=250 ! "
|
||||
"audioconvert ! " "audio/x-raw,format=S24LE,channels=2 ! mux. ");
|
||||
|
||||
run_test (pipeline);
|
||||
g_free (pipeline);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
||||
static Suite *
|
||||
mxfmux_suite (void)
|
||||
{
|
||||
|
@ -253,6 +279,7 @@ mxfmux_suite (void)
|
|||
tcase_add_test (tc_chain, test_raw_video_stride_transform);
|
||||
tcase_add_test (tc_chain, test_jpeg2000_alaw);
|
||||
tcase_add_test (tc_chain, test_dnxhd_mp3);
|
||||
tcase_add_test (tc_chain, test_h264_raw_audio);
|
||||
tcase_add_test (tc_chain, test_multiple_av_streams);
|
||||
|
||||
return s;
|
||||
|
|
|
@ -260,6 +260,33 @@ GST_START_TEST (test_multiple_av_streams)
|
|||
|
||||
GST_END_TEST;
|
||||
|
||||
GST_START_TEST (test_h264_raw_audio)
|
||||
{
|
||||
gchar *pipeline;
|
||||
GstElementFactory *factory = NULL;
|
||||
|
||||
if ((factory = gst_element_factory_find ("x264enc")) == NULL)
|
||||
return;
|
||||
gst_object_unref (factory);
|
||||
if ((factory = gst_element_factory_find ("h264parse")) == NULL)
|
||||
return;
|
||||
gst_object_unref (factory);
|
||||
|
||||
pipeline = g_strdup_printf ("videotestsrc num-buffers=250 ! "
|
||||
"video/x-raw,framerate=25/1 ! "
|
||||
"x264enc ! h264parse ! "
|
||||
"mxfmux name=mux ! "
|
||||
"mxfdemux name=demux ! "
|
||||
"fakesink "
|
||||
"audiotestsrc num-buffers=250 ! "
|
||||
"audioconvert ! " "audio/x-raw,format=S24LE,channels=2 ! mux. ");
|
||||
|
||||
run_test (pipeline, 2);
|
||||
g_free (pipeline);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
||||
static Suite *
|
||||
mxf_suite (void)
|
||||
{
|
||||
|
@ -274,6 +301,7 @@ mxf_suite (void)
|
|||
tcase_add_test (tc_chain, test_raw_video_stride_transform);
|
||||
tcase_add_test (tc_chain, test_jpeg2000_alaw);
|
||||
tcase_add_test (tc_chain, test_dnxhd_mp3);
|
||||
tcase_add_test (tc_chain, test_h264_raw_audio);
|
||||
tcase_add_test (tc_chain, test_multiple_av_streams);
|
||||
|
||||
return s;
|
||||
|
|
Loading…
Reference in a new issue