* If Node klass defined as MEDIA_STREAMER_STRICT or ENCODER/DECODER or CONVERTER types,
* element will be created immediately by format ot name */
if (type == MEDIA_STREAMER_NODE_TYPE_AUDIO_ENCODER)
- gst_element = __ms_audio_encoder_element_create(plug_info, type);
+ gst_element = __ms_audio_encoder_element_create(plug_info);
else if (type == MEDIA_STREAMER_NODE_TYPE_AUDIO_DECODER)
- gst_element = __ms_audio_decoder_element_create(plug_info, type);
+ gst_element = __ms_audio_decoder_element_create(plug_info);
else if (type == MEDIA_STREAMER_NODE_TYPE_VIDEO_ENCODER)
- gst_element = __ms_video_encoder_element_create(plug_info, type);
+ gst_element = __ms_video_encoder_element_create(plug_info);
else if (type == MEDIA_STREAMER_NODE_TYPE_VIDEO_DECODER)
- gst_element = __ms_video_decoder_element_create(plug_info, type);
+ gst_element = __ms_video_decoder_element_create(plug_info);
else if (type == MEDIA_STREAMER_NODE_TYPE_AUDIO_CONVERTER || type == MEDIA_STREAMER_NODE_TYPE_VIDEO_CONVERTER)
gst_element = __ms_element_create(plug_info->info->default_name, NULL);
else if (g_strrstr(MEDIA_STREAMER_STRICT, plug_info->info->klass_name) || (!src_type && !sink_type)) {
return gst_element;
}
-GstElement *__ms_video_encoder_element_create(node_plug_s *plug_info, media_streamer_node_type_e type)
+GstElement *__ms_video_encoder_element_create(node_plug_s *plug_info)
{
GstElement *video_scale = NULL;
GstElement *video_convert = NULL;
video_convert = __ms_element_create(DEFAULT_VIDEO_CONVERT, NULL);
/* Creating Video Encoder */
- encoder_info.info = __ms_node_get_klass_by_its_type(type);
+ encoder_info.info = __ms_node_get_klass_by_its_type(MEDIA_STREAMER_NODE_TYPE_VIDEO_ENCODER);
encoder_info.src_caps = enc_caps;
encoder_info.sink_caps = plug_info->sink_caps;
encoder_info.exclude_names = NULL;
- encoder_elem = __ms_element_create_from_ini(&encoder_info, type);
+ encoder_elem = __ms_element_create_from_ini(&encoder_info, MEDIA_STREAMER_NODE_TYPE_VIDEO_ENCODER);
if (!encoder_elem)
- encoder_elem = __ms_element_create_by_registry(&encoder_info, type);
+ encoder_elem = __ms_element_create_by_registry(&encoder_info, MEDIA_STREAMER_NODE_TYPE_VIDEO_ENCODER);
/* Creating Video Parser */
parser_info.info = &node_info;
return NULL;
}
-GstElement *__ms_video_decoder_element_create(node_plug_s *plug_info, media_streamer_node_type_e type)
+GstElement *__ms_video_decoder_element_create(node_plug_s *plug_info)
{
gboolean is_hw_codec = FALSE;
GstElement *last_elem = NULL;
}
/* Creating Video Decoder */
- decoder_info.info = __ms_node_get_klass_by_its_type(type);;
+ decoder_info.info = __ms_node_get_klass_by_its_type(MEDIA_STREAMER_NODE_TYPE_VIDEO_DECODER);
decoder_info.src_caps = plug_info->src_caps;
decoder_info.sink_caps = dec_caps;
decoder_info.exclude_names = NULL;
return NULL;
}
-GstElement *__ms_audio_encoder_element_create(node_plug_s *plug_info, media_streamer_node_type_e type)
+GstElement *__ms_audio_encoder_element_create(node_plug_s *plug_info)
{
gboolean gst_ret = FALSE;
GstElement *audio_convert = NULL;
audio_postenc_convert = __ms_element_create(DEFAULT_AUDIO_CONVERT, NULL);
/* Creating Audio Encoder */
- plug_info_encoder.info = __ms_node_get_klass_by_its_type(type);
+ plug_info_encoder.info = __ms_node_get_klass_by_its_type(MEDIA_STREAMER_NODE_TYPE_AUDIO_ENCODER);
plug_info_encoder.src_caps = enc_caps;
plug_info_encoder.sink_caps = plug_info->sink_caps;
plug_info_encoder.exclude_names = NULL;
- audio_encoder = __ms_element_create_from_ini(&plug_info_encoder, type);
+ audio_encoder = __ms_element_create_from_ini(&plug_info_encoder, MEDIA_STREAMER_NODE_TYPE_AUDIO_ENCODER);
if (!audio_encoder)
- audio_encoder = __ms_element_create_by_registry(&plug_info_encoder, type);
+ audio_encoder = __ms_element_create_by_registry(&plug_info_encoder, MEDIA_STREAMER_NODE_TYPE_AUDIO_ENCODER);
encoder_name = gst_element_get_name(audio_encoder);
if (encoder_name && g_strrstr(encoder_name, "aac"))
}
-GstElement *__ms_audio_decoder_element_create(node_plug_s *plug_info, media_streamer_node_type_e type)
+GstElement *__ms_audio_decoder_element_create(node_plug_s *plug_info)
{
gboolean gst_ret = FALSE;
GstElement *decoder_bin = NULL;
}
/* Creating Audio Decoder */
- decoder_info.info = __ms_node_get_klass_by_its_type(type);
+ decoder_info.info = __ms_node_get_klass_by_its_type(MEDIA_STREAMER_NODE_TYPE_AUDIO_DECODER);
decoder_info.src_caps = plug_info->src_caps;
decoder_info.sink_caps = dec_caps;
decoder_info.exclude_names = NULL;