I am modifying AppSrc.Test.java to change the example code to output to a tcp port. I run the app and it hits NEED_DATA a couple of times and stops. <br><br>Apparently, there are errors somewhere but nothing is output by the program. How do I track down the errors?<br>
<br>Here is the program at the moment:<br><br>Many thanks,<br>Morris<br><br><br>public class AppSrcTest<br>    {<br>    <br>    /** Creates a new instance of AppSrcTest */<br>    public AppSrcTest()<br>        {<br>        }<br>
    private static Pipeline pipeline;<br>    static TagList tags;<br>    public static void main(String[] args)<br>        {<br><br>        args = Gst.init(&quot;AppSrcTest&quot;, args);<br>        final int width = 320, height = 200;<br>
        /* setup pipeline */<br>        pipeline = new Pipeline(&quot;pipeline&quot;);<br>        final AppSrc appsrc = (AppSrc) ElementFactory.make(&quot;appsrc&quot;, &quot;source&quot;);<br>        final Element srcfilter = ElementFactory.make(&quot;capsfilter&quot;, &quot;srcfilter&quot;);<br>
<br>        Caps fltcaps = new Caps(&quot;video/x-raw-rgb, framerate=4/1&quot;<br>                + &quot;, width=&quot; + width + &quot;, height=&quot; + height<br>//                + &quot;, bpp=16, depth=16&quot;);<br>
                + &quot;, bpp=32, depth=24, endianness=4321, red_mask=(int)0xFF, green_mask=(int)0xFF00, blue_mask=(int)0xFF0000&quot;);<br>        srcfilter.setCaps(fltcaps);<br><br>        final Element colorspace = ElementFactory.make(&quot;ffmpegcolorspace&quot;, &quot;ffmpegcolorspace&quot;);<br>
<br>        final Element enc = ElementFactory.make(&quot;ffenc_mpeg4&quot;, &quot;ffenc_mpeg4&quot;);<br><br>        final Element gdppay = ElementFactory.make(&quot;gdppay&quot;, &quot;gdppay&quot;);<br><br>        final Element tcp = ElementFactory.make(&quot;tcpserversink&quot;, &quot;tcpserversink&quot;);<br>
        tcp.set(&quot;port&quot;, 3000);<br><br>        pipeline.addMany(appsrc, srcfilter, colorspace, enc, gdppay, tcp);<br>        Element.linkMany(appsrc, srcfilter, colorspace, enc, gdppay, tcp);<br>        appsrc.set(&quot;emit-signals&quot;, true);<br>
        appsrc.setLive(true);<br>        appsrc.connect(new AppSrc.NEED_DATA()<br>            {<br>            byte color = 0;<br>            byte[] data = new byte[width * height * 4];<br>            public void needData(Element elem, int size, Pointer userData)<br>
                {<br>                System.out.println(&quot;Enter needData - buffer = &quot; + data.length);<br>                System.out.println(&quot;NEED_DATA: Element=&quot; + elem.getNativeAddress()<br>                                + &quot; size=&quot; + size + &quot; color=&quot; + color);<br>
                color++;<br>                for(int i = 0; i &lt; width * height * 4; i += 4)<br>                    {<br>                    data[i] = 0;         // blue<br>                    data[i + 1] = 0;     // green<br>
                    data[i + 2] = color; // red<br>                    data[i + 3] = 0;<br>                    }<br>                Buffer buffer = new Buffer(data.length);<br>                buffer.getByteBuffer().put(data);<br>
                appsrc.pushBuffer(buffer);<br>                }<br>            });<br>        appsrc.connect(new AppSrc.ENOUGH_DATA()<br>            {<br>            public void enoughData(Element elem, Pointer userData)<br>
                {<br>                System.out.println(&quot;Enter enoughData&quot;);<br>                }<br>            });<br>        pipeline.setState(State.PLAYING);<br>        }<br>    }<br><br><br>