summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2015-11-06 10:20:34 +0100
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2015-11-09 16:14:56 +0100
commit4fc8769761843a9b98c97c2cbe3fb5487c1b68de (patch)
treef796f366db42d21914aa2823922d299e0e152821 /tests
parenta2611b7f35ef34677eda6e7c149690e5a5a6bcc2 (diff)
downloadgstreamer-vaapi-4fc8769761843a9b98c97c2cbe3fb5487c1b68de.tar.gz
tests: simple-encoder: remove dead code
The caps creation for codec state configuration is not used. Let's remove it. Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/simple-encoder.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/tests/simple-encoder.c b/tests/simple-encoder.c
index ff9ddcbe..ae0c20de 100644
--- a/tests/simple-encoder.c
+++ b/tests/simple-encoder.c
@@ -150,7 +150,7 @@ encoder_new (GstVaapiDisplay * display)
return encoder;
}
-static GstVideoCodecState *
+static inline GstVideoCodecState *
new_codec_state (gint width, gint height, gint fps_n, gint fps_d)
{
GstVideoCodecState *state;
@@ -173,28 +173,9 @@ set_format (GstVaapiEncoder * encoder, gint width, gint height, gint fps_n,
{
GstVideoCodecState *in_state;
GstVaapiEncoderStatus status;
- GstCaps *caps;
-
- if (!g_strcmp0 (g_codec_str, "mpeg2")) {
- caps = gst_caps_from_string ("video/mpeg");
- gst_caps_set_simple (caps,
- "mpegversion", G_TYPE_INT, 2,
- "systemstream", G_TYPE_BOOLEAN, FALSE,
- "width", G_TYPE_INT, width,
- "height", G_TYPE_INT, height,
- "framerate", GST_TYPE_FRACTION, fps_n, fps_d, NULL);
- } else if (!g_strcmp0 (g_codec_str, "h264")) {
- caps = gst_caps_new_empty_simple ("video/x-h264");
- gst_caps_set_simple (caps, "width", G_TYPE_INT, width,
- "height", G_TYPE_INT, height,
- "framerate", GST_TYPE_FRACTION, fps_n, fps_d, NULL);
- } else {
- return FALSE;
- }
in_state = new_codec_state (width, height, fps_n, fps_d);
status = gst_vaapi_encoder_set_codec_state (encoder, in_state);
- gst_caps_unref (caps);
g_slice_free (GstVideoCodecState, in_state);
return (status == GST_VAAPI_ENCODER_STATUS_SUCCESS);