From: Yool-Je C. <re...@ya...> - 2008-12-29 17:18:22
|
Hello... I tested gstbin.. gst-launch-0.10 audiotestsrc ! queue ! audioconvert ! { vorbisenc ! oggmux } ! filesink location=audio.ogg is successed... but...below is Error: Internal data flow error. (gstbasesrc.c(2234): gst_base_src_loop (): /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0: streaming task paused, reason not-linked (-1)) static GstElement *make_encoder (void) { GstElement *result; GstElement *codec; GstElement *mux; GstPad *pad; GstCaps *caps; /* create result bin */ result = gst_bin_new(NULL); g_assert(result); /* create elements */ codec = gst_element_factory_make("vorbisenc", NULL); g_assert(codec); mux = gst_element_factory_make("oggmux", NULL); g_assert(mux); /* add elements to result bin */ gst_bin_add(GST_BIN(result), codec); gst_bin_add(GST_BIN(result), mux); /* link elements */ gst_element_link_pads(codec, "src", mux, "sink"); /* ghost src and sink pads */ pad = gst_element_get_static_pad(codec, "sink"); gst_element_add_pad(result, gst_ghost_pad_new("sink", pad)); gst_object_unref(pad); pad = gst_element_get_static_pad(mux, "src"); gst_element_add_pad(result, gst_ghost_pad_new("src", pad)); gst_object_unref(pad); return result; } static GstElement *make_pipeline(void) { GstElement *result; GstElement *audiosrc; GstElement *queue; GstElement *aconv; GstElement *sink; GstElement *encoder; result = gst_pipeline_new(NULL); g_assert(result); /* create various elements */ audiosrc = gst_element_factory_make("audiotestsrc", NULL); g_assert(audiosrc); queue = gst_element_factory_make("queue", NULL); g_assert(queue); aconv = gst_element_factory_make("audioconvert", NULL); g_assert(aconv); sink = gst_element_factory_make("filesink", NULL); g_object_set(sink, "location", "audio.ogg", NULL); g_assert(sink); /* add elements */ gst_bin_add(GST_BIN(result), audiosrc); gst_bin_add(GST_BIN(result), queue); gst_bin_add(GST_BIN(result), aconv); gst_bin_add(GST_BIN(result), sink); encoder = make_encoder(); gst_bin_add(GST_BIN(result), encoder); /* link elements */ gst_element_link_pads(audiosrc, "src", queue, "sink"); gst_element_link_pads(queue, "src", aconv, "sink"); gst_element_link_pads(aconv, "src", encoder, "sink"); gst_element_link_pads(encoder, "src", sink, "sink"); gst_element_set_state(result, GST_STATE_READY); return result; } Where is incorrect? Thanks.. ________________________________________________________ 180도 달라진 야후! 메일 - 알아서 척척! 새로운 야후! 메일은 10분에 한번 스스로 새 메시지를 받아온답니다. http://kr.content.mail.yahoo.com/cgland |