<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>
<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>    GstElement *mux;</div><div>    GstElement *x264_enc;</div>
<div>    GstElement *a_convert;</div><div>    GstElement *v_convert;</div><div>    GstElement *aac_enc;</div><div>    struct custom_data data;</div><div>    GstElement *v_queue;</div><div>    GstElement *a_queue;</div><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>    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>    x264_enc  = gst_element_factory_make("x264enc", "h264_encoder");</div><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>    data.video = v_queue;</div>
<div>    data.audio = a_queue;</div><div><br></div><div>    pipeline = gst_pipeline_new("test-pipeline");</div><div><br></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>    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>        if (msg != NULL)<br></div><div>        {</div><div>            switch (GST_MESSAGE_TYPE(msg))</div><div>            {</div><div>                case GST_MESSAGE_ERROR:</div><div>                    terminate = TRUE;</div>
<div>                    break;</div><div>                case GST_MESSAGE_EOS:</div><div>                    g_print("End-Of-Stream reached.\n");</div><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>
                break;</div><div>            }</div><div>            gst_message_unref(msg);</div><div>        }</div><div>    } while (!terminate);</div><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 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 class="im"><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>