<div dir="ltr">Good.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 2, 2013 at 5:16 PM, Carah Smith <span dir="ltr"><<a href="mailto:carah29ingress@gmail.com" target="_blank">carah29ingress@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I got it working in the code now. Thank you both for your help! Below is the working code in case anyone is curious or still struggling with this issue. All error checking has been removed for conciseness. I didn't include the helper functions or structure because they did not change all that much.<div class="im">
<div>
<br></div><div>int</div><div>main(int argc, char **argv)</div><div>{</div><div>    GstElement *source;</div><div>    GstElement *pipeline;</div><div>    GstElement *sink;</div></div><div>    GstElement *mux;</div><div>    GstElement *x264_enc;</div>

<div>    GstElement *a_convert;</div><div>    GstElement *v_convert;</div><div class="im"><div>    GstElement *aac_enc;</div><div>    struct custom_data data;</div></div><div>    GstElement *v_queue;</div><div>    GstElement *a_queue;</div>
<div class="im"><div>
    GstBus     *bus;</div><div>    GstMessage *msg;</div><div>    gboolean terminate = FALSE;</div><div><br></div><div>    gst_init (&argc, &argv);</div><div><br></div></div><div>    source    = gst_element_factory_make("uridecodebin", "URI_decoder");</div>

<div>    v_convert = gst_element_factory_make("videoconvert", "video_converter");</div><div>    v_queue   = gst_element_factory_make("queue", "v_queue");</div><div>    a_queue   = gst_element_factory_make("queue", "a_queue");</div>
<div class="im">
<div>    x264_enc  = gst_element_factory_make("x264enc", "h264_encoder");</div></div><div class="im"><div>    a_convert = gst_element_factory_make("audioconvert", "audio_converter");</div>
<div>    aac_enc   = gst_element_factory_make("faac", "aac_encoder");</div>
<div>    mux       = gst_element_factory_make("mpegtsmux", "muxer");</div><div>    sink      = gst_element_factory_make("hlssink", "hls_sink");</div><div><br></div></div><div>    data.video = v_queue;</div>

<div>    data.audio = a_queue;</div><div class="im"><div><br></div><div>    pipeline = gst_pipeline_new("test-pipeline");</div><div><br></div></div><div>    g_object_set(G_OBJECT(source), "uri", "file:///stream_1.ts", NULL);</div>

<div><br></div><div>    gst_bin_add_many(GST_BIN(pipeline),</div><div>                     source, v_queue, a_queue, x264_enc,</div><div>                     v_convert, aac_enc, a_convert, mux, sink,</div><div>                     NULL);</div>

<div><br></div><div>    gst_element_link_many(a_queue, a_convert, aac_enc, NULL);</div><div>    gst_element_link_many(v_queue, v_convert, x264_enc, NULL);</div><div>    gst_element_link(mux, sink);</div><div><br></div><div>

    link_to_multiplexer(x264_enc, mux);</div><div>    link_to_multiplexer(aac_enc, mux);</div><div><br></div><div>    g_signal_connect(source, "pad-added", G_CALLBACK(on_pad_added), &data);</div><div><br></div>

<div>    gst_element_set_state(pipeline, GST_STATE_PLAYING);</div><div><br></div><div class="im"><div>    bus = gst_element_get_bus(pipeline);<br></div><div>    do</div><div>    {</div><div>        msg = gst_bus_timed_pop(bus, 0);</div>
<div>
<br></div></div><div class="im"><div>        if (msg != NULL)<br></div><div>        {</div><div>            switch (GST_MESSAGE_TYPE(msg))</div><div>            {</div><div>                case GST_MESSAGE_ERROR:</div></div>
<div>                    terminate = TRUE;</div>
<div>                    break;</div><div>                case GST_MESSAGE_EOS:</div><div>                    g_print("End-Of-Stream reached.\n");</div><div class="im"><div>                    terminate = TRUE;</div>
<div>                    break;</div>
<div>                case GST_MESSAGE_STATE_CHANGED:</div><div>                    if (GST_MESSAGE_SRC(msg) == GST_OBJECT(pipeline))</div><div>                    {</div><div>                        GstState old_state, new_state, pending_state;</div>

<div><br></div><div>                        gst_message_parse_state_changed(msg, &old_state, &new_state, &pending_state);</div><div>                        g_print("Pipeline state changed from %s to %s:\n",</div>

<div>                        gst_element_state_get_name(old_state), gst_element_state_get_name(new_state));</div><div>                    }</div><div>                    break;</div><div>                default:</div></div>
<div>
                break;</div><div>            }</div><div>            gst_message_unref(msg);</div><div>        }</div><div>    } while (!terminate);</div><div class="im"><div><br></div><div>    gst_object_unref(bus);<br>
</div><div>    gst_element_set_state(pipeline, GST_STATE_NULL);</div>
<div>    gst_object_unref(pipeline);</div><div><br></div><div>    return 0;</div><div>} </div></div><div><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 2, 2013 at 2:50 PM, Carah Smith <span dir="ltr"><<a href="mailto:carah29ingress@gmail.com" target="_blank">carah29ingress@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok, this worked for me as well. I am going to try and put this exactly into my code.<div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Wed, Oct 2, 2013 at 2:41 PM, Robert Krakora <span dir="ltr"><<a href="mailto:rob.krakora@messagenetsystems.com" target="_blank">rob.krakora@messagenetsystems.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="background-color:rgb(255,255,0)">This </span>works...xviddec and xvidenc are not ported to GStreamer 1.0...<div>


<br></div><div><div>DevKrakora MessageNet # <span style="background-color:rgb(255,255,0)">gst-launch-1.0 uridecodebin uri=file:///home/silentm/MessageNet/bbb24p_00.ts name=bin ! queue ! videoconvert ! x264enc ! mpegtsmux name=mux ! hlssink bin. ! queue ! audioconvert ! faac ! mux.</span></div>


<div>
<div>Setting pipeline to PAUSED ...</div><div>Pipeline is PREROLLING ...</div><div>Redistribute latency...</div></div><div>Redistribute latency...</div><div>Pipeline is PREROLLED ...</div><div>Setting pipeline to PLAYING ...</div>



<div>New clock: GstSystemClock</div></div></div><div class="gmail_extra"><br><br></div></blockquote></div></div></div></div>
</blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table width="426" cellpadding="2" cellspacing="0"><colgroup><col width="422"></colgroup><tbody><tr><td width="422" valign="TOP" style="border:none;padding:0in">
<p><font face="Arial, sans-serif"><font size="4">Rob Krakora</font><font size="4">,</font><br>Senior Software Engineer</font></p><p><font face="Arial, sans-serif">MessageNet Systems<br>101 E Carmel Dr, Suite 105<br>Carmel, IN 46032</font></p>
<p><a href="http://www.messagenetcommunicationsystems.com/?utm_source=email+signature&utm_medium=email&utm_campaign=email+signature+to+homepage" style="color:rgb(17,85,204)" target="_blank"><font color="#1155cc"><font face="Arial, sans-serif">MessageNetSystems.com</font></font></a><font face="Arial, sans-serif"><br>
</font><a href="mailto:rob.krakora@messagenetsystems.com" style="color:rgb(17,85,204)" target="_blank"><font color="#1155cc"><font face="Arial, sans-serif">Rob.Krakora@MessageNetSystems.com</font></font></a><font face="Arial, sans-serif"><br>
P: </font><a style="color:rgb(17,85,204)"><font color="#1155cc"><font face="Arial, sans-serif">317.566.1677</font></font></a><font face="Arial, sans-serif">, 21</font><font face="Arial, sans-serif">2</font><font face="Arial, sans-serif"><br>
F: </font><a style="color:rgb(17,85,204)"><font color="#1155cc"><font face="Arial, sans-serif">317.663.0808</font></font></a></p></td></tr><tr><td width="422" valign="TOP" style="border-top-width:1px;border-style:solid none none;border-top-color:rgb(0,0,0);padding:0.02in 0in 0in">
<p><font face="Arial, sans-serif"><font style="font-size:8pt">For the latest news, information, and blogs, please be sure to visit, follow, and like us...</font></font></p><p><font color="#1155cc"><a href="http://www.messagenetcommunicationsystems.com/get-the-message-out-blog/?utm_source=email+signature&utm_medium=email&utm_campaign=gmail+signature+to+blog" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.messagenetcommunicationsystems.com/wp-content/uploads/2013/07/MessageNet_Logo_200x200-e1374867138718.jpg" name="SafeHtmlFilter_14040bc6244eae96_graphics46" align="BOTTOM" width="34" height="34" border="0"></a>  <a href="http://www.youtube.com/user/MessageNetConnection/feed" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.messagenetsystems.com/images/socialmediaicons/32/youtube.png" name="SafeHtmlFilter_14040bc6244eae96_graphics47" align="BOTTOM" width="34" height="34" border="0"></a>  <a href="http://www.linkedin.com/company/messagenet-systems" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.messagenetsystems.com/images/socialmediaicons/32/linkedin.png" name="SafeHtmlFilter_14040bc6244eae96_graphics48" align="BOTTOM" width="34" height="34" border="0"></a>  <a href="http://twitter.com/MessageNet" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.messagenetsystems.com/images/socialmediaicons/32/twitter.png" name="SafeHtmlFilter_14040bc6244eae96_graphics49" align="BOTTOM" width="34" height="34" border="0"></a>  <a href="http://www.facebook.com/MessageNetsystems" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.messagenetsystems.com/images/socialmediaicons/32/facebook.png" name="SafeHtmlFilter_14040bc6244eae96_graphics50" align="BOTTOM" width="34" height="34" border="0"></a></font></p>
</td></tr></tbody></table></div>
</div>