我在瓦拉玩mjpeg流有问题。
我已经构建了我的管道,它只与两个元素(videotestsrc和cluttersink)一起工作,但是如果我想添加更多,我会得到一个“内部数据流错误”和“流任务暂停,原因未链接(-1)”。
如果我手动运行管道,它会工作:

gst-launch souphttpsrc location=http://mjpeg.sanford.io/count.mjpeg !  multipartdemux ! jpegdec ! autovideosink

这是我的流媒体课程:
public class Stream : Clutter.Actor {

    Clutter.Texture video;

    public dynamic Gst.Element playbin;


    public Gst.Pipeline pipeline;
    public  Gst.Element demux;
    public  Gst.Element jpegdec;
    public  Gst.Element outputsink;

    public  dynamic Gst.Element src;
    public  dynamic Gst.Element video_sink;

    public Stream(){

        print("stream");
        video = new Clutter.Texture ();

        this.pipeline = new Gst.Pipeline("videopipeline");
        this.src = Gst.ElementFactory.make ("souphttpsrc","httpsrc");
        this.demux = Gst.ElementFactory.make ("multipartdemux","demux");
        this.jpegdec = Gst.ElementFactory.make ("jpegdec","jpegdec");
        this.outputsink = Gst.ElementFactory.make("autovideosink","output");
        this.video_sink = Gst.ElementFactory.make ("cluttersink", "source");

        this.video_sink.texture = video;

        this.src.set("location","http://mjpeg.sanford.io/count.mjpeg");


        this.pipeline.add_many(this.src,this.demux,this.jpegdec,this.outputsink,this.video_sink);
        this.src.link(this.demux);
        this.demux.link(this.jpegdec);
        this.jpegdec.link(this.outputsink);
        this.outputsink.link(this.video_sink);

        this.add_child (video);

        this.pipeline.set_state(Gst.State.PLAYING);

    }





}

以下是完整的错误日志:
http://pastebin.com/b9GnA5ke

最佳答案

不能将两个接收器元素附加到jpegdec。如果需要这样做,应该使用“tee”元素,同时确保使用向tee的每个分支添加“queue”。
从jpegdec到cluttersink也可能存在caps问题。我会把它结构如下:

souphttpsrc !  multipartdemux ! jpegdec ! tee name=t ! queue ! videoconvert ! autovideosink

t. ! queue ! videoconvert ! cluttersink

08-19 00:48