Windows 7 GStreamer基础教程1 Visual Studio 2010 C++;

Windows 7 GStreamer基础教程1 Visual Studio 2010 C++;,windows-7,gstreamer,playbin2,Windows 7,Gstreamer,Playbin2,您好,我对Windows 7 64位(使用32位gstreamer)上的gstreamer-0.10有一些问题 请参见以下教程1的代码(针对VS2010进行了修改): 我还使用了--gst debug level=4(下面选择的输出): 我还尝试将“playbin2”重命名为“playbin”,以及一些更常规的管道(在命令行上工作) 我将不胜感激 您能否对错误处理进行以下更改,以便我们看到gst\u parse\u启动失败的地方?GError*error=NULL;管道=gst_解析_启动(“…

您好,我对Windows 7 64位(使用32位gstreamer)上的gstreamer-0.10有一些问题

请参见以下教程1的代码(针对VS2010进行了修改):

我还使用了--gst debug level=4(下面选择的输出):

我还尝试将“playbin2”重命名为“playbin”,以及一些更常规的管道(在命令行上工作)


我将不胜感激

您能否对错误处理进行以下更改,以便我们看到gst\u parse\u启动失败的地方?GError*error=NULL;管道=gst_解析_启动(“…”,&错误);iff(pipeline==NULL | | error!=NULL){printf(“解析错误:%s\n,error->message)}
解析错误:没有元素“playbin2”
-通过将环境变量GST_PLUGIN_PATH设置到我的库位置C:\gstreamer sdk\0.10\x86\lib\gstreamer-0.10来修复此问题。非常感谢@mpr:)同样的问题,同样的解决方案。谢谢你们,我的窗户还没露出来。有什么想法吗?您可以对错误处理进行以下更改,以便我们看到gst_parse_启动失败的地方吗?GError*error=NULL;管道=gst_解析_启动(“…”,&错误);iff(pipeline==NULL | | error!=NULL){printf(“解析错误:%s\n,error->message)}
解析错误:没有元素“playbin2”
-通过将环境变量GST_PLUGIN_PATH设置到我的库位置C:\gstreamer sdk\0.10\x86\lib\gstreamer-0.10来修复此问题。非常感谢@mpr:)同样的问题,同样的解决方案。谢谢你们,我的窗户还没露出来。有什么想法吗?
#include <gst/gst.h>

int main(int argc, char *argv[]) {
  GstElement *pipeline;
  GstBus *bus;
  GstMessage *msg;
  // Added GError to catch pipeline problems?
  // http://stackoverflow.com/questions/14923306/gstreamer-with-visual-c-express-2010-tutorial-1
  GError **errorMsg = NULL;

  /* Initialize GStreamer */
  gst_init (&argc, &argv);

  /* Build the pipeline */
  pipeline = gst_parse_launch ("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", errorMsg);
  // pipeline = gst_parse_launch ("playbin uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", errorMsg);
  // pipeline = gst_parse_launch ("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);
  // pipeline = gst_parse_launch ("playbin uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);
  // pipeline = gst_parse_launch ("videotestsrc ! autovideosink", errorMsg);

  /* Start playing */
  gst_element_set_state (pipeline, GST_STATE_PLAYING);

  /* Wait until error or EOS */
  bus = gst_element_get_bus (pipeline);

  /* MSVC Compiler is more strict with enum type casting hence the (GstMessageType) cast on the second parameter */
  msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, (GstMessageType)(GST_MESSAGE_ERROR | GST_MESSAGE_EOS));
  // msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);

  /* Free resources */
  if (msg != NULL)
    gst_message_unref (msg);
    gst_object_unref (bus);
    gst_element_set_state (pipeline, GST_STATE_NULL);
    gst_object_unref (pipeline);
  return 0;
}
(basic-tutorial-1_debug.exe:8700): GStreamer-CRITICAL **: gst_element_set_state:
 assertion `GST_IS_ELEMENT (element)' failed

(basic-tutorial-1_debug.exe:8700): GStreamer-CRITICAL **: gst_element_get_bus: a
ssertion `GST_IS_ELEMENT (element)' failed

(basic-tutorial-1_debug.exe:8700): GStreamer-CRITICAL **: gst_bus_timed_pop_filt
ered: assertion `GST_IS_BUS (bus)' failed

(basic-tutorial-1_debug.exe:8700): GStreamer-CRITICAL **: gst_object_unref: asse
rtion `object != NULL' failed

(basic-tutorial-1_debug.exe:8700): GStreamer-CRITICAL **: gst_element_set_state:
 assertion `GST_IS_ELEMENT (element)' failed

(basic-tutorial-1_debug.exe:8700): GStreamer-CRITICAL **: gst_object_unref: asse
rtion `object != NULL' failed
it_check: initialized GStreamer successfully
0:00:00.358921084  8236   004D5000 INFO            GST_PIPELINE gstparse.c:334:g
st_parse_launch_full: parsing pipeline description 'playbin2 uri=http://docs.gst
reamer.com/media/sintel_trailer-480p.webm'
0:00:00.368644038  8236   004D5000 DEBUG           GST_PIPELINE parse.l:107:priv
_gst_parse_yylex: flex: IDENTIFIER: playbin2
0:00:00.375062362  8236   004D5000 INFO     GST_ELEMENT_FACTORY gstelementfactor
y.c:467:gst_element_factory_make: no such element factory "playbin2"!
0:00:00.381743480  8236   004D5000 ERROR           GST_PIPELINE ./grammar.y:661:
priv_gst_parse_yyparse: no element "playbin2"
0:00:00.387568465  8236   004D5000 ERROR           GST_PIPELINE ./grammar.y:929:
priv_gst_parse_launch: Unrecoverable syntax error while parsing pipeline playbin
2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm