Vala의 응용 프로그램에서 GStreamer를 사용하여 .mp4 비디오를 재생하고 있습니다. 튜토리얼에서 파일 파이프 라인을 만들려고합니다 : filesrc -> decodebin -> 펄스 링크,하지만 항상 내 응용 프로그램이 충돌합니다. 내 코드는 다음과 같습니다.Vala에서 GStreamer 파이프 라인이 충돌 함
this.pipeline = new Pipeline ("mypipeline");
this.src = ElementFactory.make ("filesrc", "video");
src.set("location", downloadFileName);
this.decode = ElementFactory.make ("decodebin", "decode");
this.sink = ElementFactory.make ("autoaudiosink", "sink");
this.pipeline.add_many (this.src, this.decode, this.sink);
if (this.src == null)
error("Gstreamer element init error 1");
if (this.decode == null)
error("Gstreamer element init error 2");
if (this.sink == null)
error("Gstreamer element init error 3");
if (!this.src.link (this.decode))
error("GStreamer linking problems.");
if (!this.decode.link (this.sink))
error("GStreamer linking problems 2.");
this.pipeline.set_state (State.PLAYING);
내 응용 프로그램은 항상 "GStreamer linking problems 2"와 충돌합니다.
gst-launch-1.0 filesrc location=<filename> ! decodebin ! pulsesink
정상적으로 작동하므로 Vala 관련 문제 (내 실제 파일명입니다)라고 생각합니다.
내가 잘못하고있는 것을 말해 줄 수 있습니까?