[gst-devel] Problem creating second pad on ffmpeg 3GP muxer
Geraldine Rougier
geraldine.rougier at purplelabs.com
Fri Aug 25 14:39:41 CEST 2006
Hi,
I am using 3GP muxer plugin from gstffmpeg and trying the following
pipeline :
filesrc ! 3GP demux ! 3GP mux ! filesink
When the source file is audio or video only I have no problem, but with
audio/video files I can not link the second pad created by the demuxer
to the muxer.
The "gst_pad_link" function returns the following error :
GST_PAD_LINK_NOFORMAT.
I tried two scenarii in order to link demuxer and muxer pads (the same
is applied for audio pad):
1- pl_sinkpad_mux = gst_element_get_request_pad (pl_ctx->p_mux, "video_0");
if (pl_sinkpad_mux==NULL)
{
g_print("Video sink pad is not available\n");
return;
}
vl_status = gst_pad_link (srcpad, pl_sinkpad_mux);
if(vl_status != GST_PAD_LINK_OK)
{
g_print ("Could not link src pad and muxer sink pad, vl_status =
%d\n", vl_status);
return;
}
gst_object_unref( pl_sinkpad_mux );
2- GstCaps *pl_caps = NULL;
pl_caps = gst_caps_new_simple ("video/x-h263",
NULL);
if (!pl_caps)
{
g_print("could not gst_caps_new_simple\n");
return;
}
//Request new video muxer sinkpad.
pl_sinkpad_mux = gst_element_get_compatible_pad(pl_ctx->p_mux,
srcpad, pl_caps);
if (pl_sinkpad_mux==NULL)
{
g_print("Video sink pad is not available\n");
return;
}
if ((gst_pad_set_caps(pl_sinkpad_mux, pl_caps)) == FALSE)
{
fprintf(stderr, "could not gst_pad_set_caps\n");
return;
}
gst_caps_unref(pl_caps);
vl_status = gst_pad_link (srcpad, pl_sinkpad_mux);
if(vl_status != GST_PAD_LINK_OK)
{
g_print ("Could not link src pad and muxer sink pad, vl_status =
%d\n", vl_status);
return;
}
gst_object_unref( pl_sinkpad_mux );
The problem always appears when linking the second pad, no matter if it
is the audio one or the video one.
I don't know what I'm missing :(
Any help is welcome :)
Thanks,
GG
More information about the gstreamer-devel
mailing list