2011-07-20 06:34:33 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2011, Hewlett-Packard Development Company, L.P.
|
|
|
|
* Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, Collabora Ltd.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation
|
|
|
|
* version 2.1 of the License.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
#include "gstomxmpeg4videoenc.h"
|
|
|
|
|
|
|
|
GST_DEBUG_CATEGORY_STATIC (gst_omx_mpeg4_video_enc_debug_category);
|
|
|
|
#define GST_CAT_DEFAULT gst_omx_mpeg4_video_enc_debug_category
|
|
|
|
|
|
|
|
/* prototypes */
|
|
|
|
static gboolean gst_omx_mpeg4_video_enc_set_format (GstOMXVideoEnc * enc,
|
2012-06-20 12:11:58 +00:00
|
|
|
GstOMXPort * port, GstVideoCodecState * state);
|
2011-07-20 06:34:33 +00:00
|
|
|
static GstCaps *gst_omx_mpeg4_video_enc_get_caps (GstOMXVideoEnc * enc,
|
2012-06-20 12:11:58 +00:00
|
|
|
GstOMXPort * port, GstVideoCodecState * state);
|
2011-07-20 06:34:33 +00:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0
|
|
|
|
};
|
|
|
|
|
|
|
|
/* class initialization */
|
|
|
|
|
2012-04-12 19:57:32 +00:00
|
|
|
#define DEBUG_INIT \
|
2011-07-20 06:34:33 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_omx_mpeg4_video_enc_debug_category, "omxmpeg4videoenc", 0, \
|
|
|
|
"debug category for gst-omx video encoder base class");
|
|
|
|
|
2012-04-12 19:57:32 +00:00
|
|
|
G_DEFINE_TYPE_WITH_CODE (GstOMXMPEG4VideoEnc, gst_omx_mpeg4_video_enc,
|
|
|
|
GST_TYPE_OMX_VIDEO_ENC, DEBUG_INIT);
|
2011-07-20 06:34:33 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
gst_omx_mpeg4_video_enc_class_init (GstOMXMPEG4VideoEncClass * klass)
|
|
|
|
{
|
2012-04-12 19:57:32 +00:00
|
|
|
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
2011-07-20 06:34:33 +00:00
|
|
|
GstOMXVideoEncClass *videoenc_class = GST_OMX_VIDEO_ENC_CLASS (klass);
|
|
|
|
|
|
|
|
videoenc_class->set_format =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_omx_mpeg4_video_enc_set_format);
|
|
|
|
videoenc_class->get_caps =
|
|
|
|
GST_DEBUG_FUNCPTR (gst_omx_mpeg4_video_enc_get_caps);
|
|
|
|
|
2012-04-12 19:57:32 +00:00
|
|
|
videoenc_class->cdata.default_src_template_caps = "video/mpeg, "
|
2011-07-20 06:34:33 +00:00
|
|
|
"mpegversion=(int) 4, "
|
|
|
|
"systemstream=(boolean) false, "
|
|
|
|
"width=(int) [ 16, 4096 ], " "height=(int) [ 16, 4096 ]";
|
|
|
|
|
2012-10-17 16:57:43 +00:00
|
|
|
gst_element_class_set_static_metadata (element_class,
|
2012-04-12 19:57:32 +00:00
|
|
|
"OpenMAX MPEG4 Video Encoder",
|
2019-03-26 12:17:26 +00:00
|
|
|
"Codec/Encoder/Video/Hardware",
|
2012-04-12 19:57:32 +00:00
|
|
|
"Encode MPEG4 video streams",
|
|
|
|
"Sebastian Dröge <sebastian.droege@collabora.co.uk>");
|
|
|
|
|
|
|
|
gst_omx_set_default_role (&videoenc_class->cdata, "video_encoder.mpeg4");
|
2011-07-20 06:34:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-04-12 19:57:32 +00:00
|
|
|
gst_omx_mpeg4_video_enc_init (GstOMXMPEG4VideoEnc * self)
|
2011-07-20 06:34:33 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gst_omx_mpeg4_video_enc_set_format (GstOMXVideoEnc * enc, GstOMXPort * port,
|
2012-06-20 12:11:58 +00:00
|
|
|
GstVideoCodecState * state)
|
2011-07-20 06:34:33 +00:00
|
|
|
{
|
2011-07-29 09:26:39 +00:00
|
|
|
GstOMXMPEG4VideoEnc *self = GST_OMX_MPEG4_VIDEO_ENC (enc);
|
2012-04-12 19:57:32 +00:00
|
|
|
GstCaps *peercaps, *intersection;
|
2013-03-01 11:18:08 +00:00
|
|
|
OMX_PARAM_PORTDEFINITIONTYPE port_def;
|
2011-08-02 13:14:37 +00:00
|
|
|
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
|
|
|
|
OMX_ERRORTYPE err;
|
2012-04-12 19:57:32 +00:00
|
|
|
const gchar *profile_string, *level_string;
|
2011-07-29 09:26:39 +00:00
|
|
|
|
2013-03-01 11:23:54 +00:00
|
|
|
gst_omx_port_get_port_definition (GST_OMX_VIDEO_ENC (self)->enc_out_port,
|
|
|
|
&port_def);
|
2013-03-01 11:18:08 +00:00
|
|
|
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingMPEG4;
|
2013-03-01 11:23:54 +00:00
|
|
|
err =
|
|
|
|
gst_omx_port_update_port_definition (GST_OMX_VIDEO_ENC
|
|
|
|
(self)->enc_out_port, &port_def);
|
2013-03-01 11:18:08 +00:00
|
|
|
if (err != OMX_ErrorNone)
|
|
|
|
return FALSE;
|
|
|
|
|
2013-03-11 12:59:15 +00:00
|
|
|
GST_OMX_INIT_STRUCT (¶m);
|
|
|
|
param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
|
|
|
|
|
|
|
|
err =
|
|
|
|
gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc,
|
|
|
|
OMX_IndexParamVideoProfileLevelCurrent, ¶m);
|
|
|
|
if (err != OMX_ErrorNone) {
|
|
|
|
GST_WARNING_OBJECT (self,
|
|
|
|
"Getting profile/level not supported by component");
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2012-06-20 12:11:58 +00:00
|
|
|
peercaps = gst_pad_peer_query_caps (GST_VIDEO_ENCODER_SRC_PAD (enc), NULL);
|
2011-07-29 09:26:39 +00:00
|
|
|
if (peercaps) {
|
|
|
|
GstStructure *s;
|
|
|
|
|
|
|
|
intersection =
|
|
|
|
gst_caps_intersect (peercaps,
|
2012-06-20 12:11:58 +00:00
|
|
|
gst_pad_get_pad_template_caps (GST_VIDEO_ENCODER_SRC_PAD (enc)));
|
2012-04-12 19:57:32 +00:00
|
|
|
|
2011-07-29 09:26:39 +00:00
|
|
|
gst_caps_unref (peercaps);
|
|
|
|
if (gst_caps_is_empty (intersection)) {
|
|
|
|
gst_caps_unref (intersection);
|
|
|
|
GST_ERROR_OBJECT (self, "Empty caps");
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
s = gst_caps_get_structure (intersection, 0);
|
|
|
|
profile_string = gst_structure_get_string (s, "profile");
|
|
|
|
if (profile_string) {
|
|
|
|
if (g_str_equal (profile_string, "simple")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileSimple;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "simple-scalable")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileSimpleScalable;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "core")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileCore;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "main")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileMain;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "n-bit")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileNbit;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "scalable")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileScalableTexture;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "simple-face")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileSimpleFace;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "simple-fba")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileSimpleFBA;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "basic-animated-texture")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileBasicAnimated;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "hybrid")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileHybrid;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "advanced-real-time-simple")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileAdvancedRealTime;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "core-scalable")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileCoreScalable;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "advanced-coding-efficiency")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileAdvancedCoding;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "advanced-core")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileAdvancedCore;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "advanced-scalable-texture")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileAdvancedScalable;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (profile_string, "advanced-simple")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eProfile = OMX_VIDEO_MPEG4ProfileAdvancedSimple;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else {
|
2012-04-12 19:57:32 +00:00
|
|
|
goto unsupported_profile;
|
2011-07-29 09:26:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
level_string = gst_structure_get_string (s, "level");
|
|
|
|
if (level_string) {
|
|
|
|
if (g_str_equal (level_string, "0")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eLevel = OMX_VIDEO_MPEG4Level0;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (level_string, "0b")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eLevel = OMX_VIDEO_MPEG4Level0b;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (level_string, "1")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eLevel = OMX_VIDEO_MPEG4Level1;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (level_string, "2")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eLevel = OMX_VIDEO_MPEG4Level2;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (level_string, "3")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eLevel = OMX_VIDEO_MPEG4Level3;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (level_string, "4")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eLevel = OMX_VIDEO_MPEG4Level4;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (level_string, "4a")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eLevel = OMX_VIDEO_MPEG4Level4a;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else if (g_str_equal (level_string, "5")) {
|
2013-03-11 12:59:15 +00:00
|
|
|
param.eLevel = OMX_VIDEO_MPEG4Level5;
|
2011-07-29 09:26:39 +00:00
|
|
|
} else {
|
2012-04-12 19:57:32 +00:00
|
|
|
goto unsupported_level;
|
2011-07-29 09:26:39 +00:00
|
|
|
}
|
|
|
|
}
|
2012-04-12 19:57:32 +00:00
|
|
|
|
|
|
|
gst_caps_unref (intersection);
|
2011-08-02 13:14:37 +00:00
|
|
|
}
|
2011-07-29 09:26:39 +00:00
|
|
|
|
2011-08-02 13:14:37 +00:00
|
|
|
err =
|
2013-02-25 08:15:46 +00:00
|
|
|
gst_omx_component_set_parameter (GST_OMX_VIDEO_ENC (self)->enc,
|
2011-08-02 13:14:37 +00:00
|
|
|
OMX_IndexParamVideoProfileLevelCurrent, ¶m);
|
|
|
|
if (err == OMX_ErrorUnsupportedIndex) {
|
|
|
|
GST_WARNING_OBJECT (self,
|
|
|
|
"Setting profile/level not supported by component");
|
|
|
|
} else if (err != OMX_ErrorNone) {
|
|
|
|
GST_ERROR_OBJECT (self,
|
2013-04-18 22:07:28 +00:00
|
|
|
"Error setting profile %u and level %u: %s (0x%08x)",
|
|
|
|
(guint) param.eProfile, (guint) param.eLevel,
|
|
|
|
gst_omx_error_to_string (err), err);
|
2011-08-02 13:14:37 +00:00
|
|
|
return FALSE;
|
2011-07-29 09:26:39 +00:00
|
|
|
}
|
|
|
|
|
2011-07-20 06:34:33 +00:00
|
|
|
return TRUE;
|
2012-04-12 19:57:32 +00:00
|
|
|
|
|
|
|
unsupported_profile:
|
|
|
|
GST_ERROR_OBJECT (self, "Unsupported profile %s", profile_string);
|
2013-03-14 14:03:02 +00:00
|
|
|
gst_caps_unref (intersection);
|
2012-04-12 19:57:32 +00:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
unsupported_level:
|
|
|
|
GST_ERROR_OBJECT (self, "Unsupported level %s", level_string);
|
2013-03-14 14:03:02 +00:00
|
|
|
gst_caps_unref (intersection);
|
2012-04-12 19:57:32 +00:00
|
|
|
return FALSE;
|
2011-07-20 06:34:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GstCaps *
|
|
|
|
gst_omx_mpeg4_video_enc_get_caps (GstOMXVideoEnc * enc, GstOMXPort * port,
|
2012-06-20 12:11:58 +00:00
|
|
|
GstVideoCodecState * state)
|
2011-07-20 06:34:33 +00:00
|
|
|
{
|
2011-07-29 09:26:39 +00:00
|
|
|
GstOMXMPEG4VideoEnc *self = GST_OMX_MPEG4_VIDEO_ENC (enc);
|
2011-07-20 06:34:33 +00:00
|
|
|
GstCaps *caps;
|
2011-07-29 09:26:39 +00:00
|
|
|
OMX_ERRORTYPE err;
|
|
|
|
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
|
|
|
|
const gchar *profile, *level;
|
|
|
|
|
2011-08-02 13:14:37 +00:00
|
|
|
caps =
|
|
|
|
gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 4,
|
2012-06-20 12:11:58 +00:00
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
|
2011-08-02 13:14:37 +00:00
|
|
|
|
2011-07-29 09:26:39 +00:00
|
|
|
GST_OMX_INIT_STRUCT (¶m);
|
2013-02-25 08:15:46 +00:00
|
|
|
param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;
|
2011-07-29 09:26:39 +00:00
|
|
|
|
|
|
|
err =
|
2013-02-25 08:15:46 +00:00
|
|
|
gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc,
|
2011-07-29 09:26:39 +00:00
|
|
|
OMX_IndexParamVideoProfileLevelCurrent, ¶m);
|
2011-08-02 13:14:37 +00:00
|
|
|
if (err != OMX_ErrorNone && err != OMX_ErrorUnsupportedIndex) {
|
|
|
|
gst_caps_unref (caps);
|
2011-07-29 09:26:39 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-08-02 13:14:37 +00:00
|
|
|
if (err == OMX_ErrorNone) {
|
|
|
|
switch (param.eProfile) {
|
|
|
|
case OMX_VIDEO_MPEG4ProfileSimple:
|
|
|
|
profile = "simple";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileSimpleScalable:
|
|
|
|
profile = "simple-scalable";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileCore:
|
|
|
|
profile = "core";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileMain:
|
|
|
|
profile = "main";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileNbit:
|
|
|
|
profile = "n-bit";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileScalableTexture:
|
|
|
|
profile = "scalable";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileSimpleFace:
|
|
|
|
profile = "simple-face";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileSimpleFBA:
|
|
|
|
profile = "simple-fba";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileBasicAnimated:
|
|
|
|
profile = "basic-animated-texture";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileHybrid:
|
|
|
|
profile = "hybrid";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileAdvancedRealTime:
|
|
|
|
profile = "advanced-real-time-simple";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileCoreScalable:
|
|
|
|
profile = "core-scalable";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileAdvancedCoding:
|
|
|
|
profile = "advanced-coding-efficiency";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileAdvancedCore:
|
|
|
|
profile = "advanced-core";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileAdvancedScalable:
|
|
|
|
profile = "advanced-scalable-texture";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4ProfileAdvancedSimple:
|
|
|
|
profile = "advanced-simple";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
g_assert_not_reached ();
|
2013-03-22 19:23:14 +00:00
|
|
|
return NULL;
|
2011-08-02 13:14:37 +00:00
|
|
|
}
|
2011-07-20 06:34:33 +00:00
|
|
|
|
2011-08-02 13:14:37 +00:00
|
|
|
switch (param.eLevel) {
|
|
|
|
case OMX_VIDEO_MPEG4Level0:
|
|
|
|
level = "0";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4Level0b:
|
|
|
|
level = "0b";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4Level1:
|
|
|
|
level = "1";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4Level2:
|
|
|
|
level = "2";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4Level3:
|
|
|
|
level = "3";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4Level4:
|
|
|
|
level = "4";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4Level4a:
|
|
|
|
level = "4a";
|
|
|
|
break;
|
|
|
|
case OMX_VIDEO_MPEG4Level5:
|
|
|
|
level = "5";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
g_assert_not_reached ();
|
2013-03-22 19:23:14 +00:00
|
|
|
return NULL;
|
2011-08-02 13:14:37 +00:00
|
|
|
}
|
2011-07-20 06:34:33 +00:00
|
|
|
|
2011-08-02 13:14:37 +00:00
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"profile", G_TYPE_STRING, profile, "level", G_TYPE_STRING, level, NULL);
|
|
|
|
}
|
2011-07-20 06:34:33 +00:00
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|