Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gst-plugins-good
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marc-André Lureau
gst-plugins-good
Commits
a4154e9d
Commit
a4154e9d
authored
Sep 30, 2011
by
Thiago Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: qtmux: Refactor bitrate check test
Refactor bitrate check test to accomodate multiple tests for bitrate
parent
535f92a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
3 deletions
+33
-3
tests/check/elements/qtmux.c
tests/check/elements/qtmux.c
+33
-3
No files found.
tests/check/elements/qtmux.c
View file @
a4154e9d
...
@@ -59,6 +59,19 @@ static GstPad *mysrcpad, *mysinkpad;
...
@@ -59,6 +59,19 @@ static GstPad *mysrcpad, *mysinkpad;
"height = (int) 288, " \
"height = (int) 288, " \
"framerate = (fraction) 25/1"
"framerate = (fraction) 25/1"
#define VIDEO_CAPS_H264_STRING "video/x-h264, " \
"width=(int)320, " \
"height=(int)240, " \
"framerate=(fraction)30/1, " \
"pixel-aspect-ratio=(fraction)1/1, " \
"codec_data=(buffer)01640014ffe1001867640014a" \
"cd94141fb0110000003001773594000f14299600" \
"1000568ebecb22c, " \
"stream-format=(string)avc, " \
"alignment=(string)au, " \
"level=(string)2, " \
"profile=(string)high"
static
GstStaticPadTemplate
sinktemplate
=
GST_STATIC_PAD_TEMPLATE
(
"sink"
,
static
GstStaticPadTemplate
sinktemplate
=
GST_STATIC_PAD_TEMPLATE
(
"sink"
,
GST_PAD_SINK
,
GST_PAD_SINK
,
GST_PAD_ALWAYS
,
GST_PAD_ALWAYS
,
...
@@ -68,6 +81,12 @@ static GstStaticPadTemplate srcvideotemplate = GST_STATIC_PAD_TEMPLATE ("src",
...
@@ -68,6 +81,12 @@ static GstStaticPadTemplate srcvideotemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_ALWAYS
,
GST_PAD_ALWAYS
,
GST_STATIC_CAPS
(
VIDEO_CAPS_STRING
));
GST_STATIC_CAPS
(
VIDEO_CAPS_STRING
));
static
GstStaticPadTemplate
srcvideoh264template
=
GST_STATIC_PAD_TEMPLATE
(
"src"
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
GST_STATIC_CAPS
(
VIDEO_CAPS_H264_STRING
));
static
GstStaticPadTemplate
srcaudiotemplate
=
GST_STATIC_PAD_TEMPLATE
(
"src"
,
static
GstStaticPadTemplate
srcaudiotemplate
=
GST_STATIC_PAD_TEMPLATE
(
"src"
,
GST_PAD_SRC
,
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
GST_PAD_ALWAYS
,
...
@@ -748,7 +767,9 @@ extract_tags (const gchar * location, GstTagList ** taglist)
...
@@ -748,7 +767,9 @@ extract_tags (const gchar * location, GstTagList ** taglist)
return
ret
;
return
ret
;
}
}
GST_START_TEST
(
test_average_bitrate
)
static
void
test_average_bitrate_custom
(
const
gchar
*
elementname
,
GstStaticPadTemplate
*
tmpl
,
const
gchar
*
sinkpadname
)
{
{
gchar
*
location
;
gchar
*
location
;
GstElement
*
qtmux
;
GstElement
*
qtmux
;
...
@@ -764,11 +785,11 @@ GST_START_TEST (test_average_bitrate)
...
@@ -764,11 +785,11 @@ GST_START_TEST (test_average_bitrate)
location
=
g_strdup_printf
(
"%s/%s-%d"
,
g_get_tmp_dir
(),
"qtmuxtest"
,
location
=
g_strdup_printf
(
"%s/%s-%d"
,
g_get_tmp_dir
(),
"qtmuxtest"
,
g_random_int
());
g_random_int
());
GST_INFO
(
"Using location %s for bitrate test"
,
location
);
GST_INFO
(
"Using location %s for bitrate test"
,
location
);
qtmux
=
gst_check_setup_element
(
"mp4mux"
);
qtmux
=
gst_check_setup_element
(
elementname
);
filesink
=
gst_element_factory_make
(
"filesink"
,
NULL
);
filesink
=
gst_element_factory_make
(
"filesink"
,
NULL
);
g_object_set
(
filesink
,
"location"
,
location
,
NULL
);
g_object_set
(
filesink
,
"location"
,
location
,
NULL
);
gst_element_link
(
qtmux
,
filesink
);
gst_element_link
(
qtmux
,
filesink
);
mysrcpad
=
setup_src_pad
(
qtmux
,
&
srcaudioaactemplate
,
NULL
,
"audio_%d"
);
mysrcpad
=
setup_src_pad
(
qtmux
,
tmpl
,
NULL
,
sinkpadname
);
fail_unless
(
mysrcpad
!=
NULL
);
fail_unless
(
mysrcpad
!=
NULL
);
gst_pad_set_active
(
mysrcpad
,
TRUE
);
gst_pad_set_active
(
mysrcpad
,
TRUE
);
...
@@ -821,6 +842,15 @@ GST_START_TEST (test_average_bitrate)
...
@@ -821,6 +842,15 @@ GST_START_TEST (test_average_bitrate)
}
}
}
}
GST_START_TEST
(
test_average_bitrate
)
{
test_average_bitrate_custom
(
"mp4mux"
,
&
srcaudioaactemplate
,
"audio_%d"
);
test_average_bitrate_custom
(
"mp4mux"
,
&
srcvideoh264template
,
"video_%d"
);
test_average_bitrate_custom
(
"qtmux"
,
&
srcaudioaactemplate
,
"audio_%d"
);
test_average_bitrate_custom
(
"qtmux"
,
&
srcvideoh264template
,
"video_%d"
);
}
GST_END_TEST
;
GST_END_TEST
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment