Hi Antonio.<br><br># I can speek English a little.<br># If I use funny English, I'm sorry.<br><br><br>1.install OK?<br>-----------------------------------------<br> GTK & GStreamer-WinBuilds & GStreamer-WinBuilds-SDK installed, OK?<br>
<br>2.environment OK?<br>-----------------------------------------<br> GST_PLUGIN_PATH C:\Program Files\OSSBuild\GStreamer\v0.10.6\lib\gstreamer-0.10<br> OSSBUILD_GSTREAMER_DIR C:\Program Files\OSSBuild\GStreamer\v0.10.6\<br>
Path C:\Program Files\OSSBuild\GStreamer\v0.10.6\bin<br><br>3.check OK?<br>-----------------------------------------<br> CommandPrompt > gst-launch videotestsrc ! ffmpegcolorspace ! autovideosink<br>
<br><br>4.configure VC express 2008 in my case<br>-----------------------------------------<br># I use VC with Japanese. I don't know VC with English.<br># I skip write configuration when you install GTK. <br><br> [property-page]<br>
[property(not common)]<br> [c/c++]<br> [general]<br> [add include dir]<br> C:\Program Files\OSSBuild\GStreamer\v0.10.6\sdk\include\gstreamer-0.10<br><br> [property-page]<br>
[property(not common)]<br> [linker]<br> [general]<br> C:\GTK\lib<br> C:\Program Files\OSSBuild\GStreamer\v0.10.6\sdk\lib<br><br> [property-page]<br> [property(not common)]<br>
[linker]<br> [input]<br> gstreamer-0.10.lib<br><br>5.src (music-player.exe)<br>-----------------------------------------<br>#include <gst/gst.h><br><br>/****************************************************************************<br>
* call back *<br>****************************************************************************/<br>static void bus_call(GstBus *bus, GstMessage *msg, GMainLoop *mainloop )<br>
{<br> switch (GST_MESSAGE_TYPE (msg)) {<br> case GST_MESSAGE_EOS:<br> g_print("EOS\n");<br> g_main_loop_quit(mainloop);<br> break;<br> case GST_MESSAGE_ERROR:{<br> gchar *debug;<br>
GError *error;<br> gst_message_parse_error(msg, &error, &debug);<br> g_free(debug);<br> g_printerr("Error: %s\n", error->message);<br> g_error_free(error);<br> break;<br>
}<br> case GST_MESSAGE_WARNING:{<br> gchar *debug;<br> GError *error;<br> gst_message_parse_warning(msg, &error, &debug);<br> g_printerr("WARNING: %s (%s)\n", error->message, (debug) ? debug : "no details");<br>
g_error_free(error);<br> g_free(debug);<br> break;<br> }<br> default:<br> break;<br> }<br>}<br><br>/****************************************************************************<br>* main *<br>
****************************************************************************/<br>int main( int argc, char *argv[] )<br>{<br> GstElement *playbin;<br> GstElement *pipeline;<br> GMainLoop *loop;<br> GstBus *bus;<br>
<br> if(argc!=2){<br> g_printerr("usage: tinyPlayer [mediafile]\n");<br> exit(1);<br> }<br><br> gst_init(&argc, &argv);<br> pipeline = gst_pipeline_new( NULL );<br><br> /* Create gstreamer elements */<br>
playbin = gst_element_factory_make( "playbin2", NULL );<br> gst_bin_add( GST_BIN(pipeline), playbin );<br> g_object_set( G_OBJECT(playbin), "uri", argv[1], NULL );<br><br> /* bus callbacks */<br>
loop = g_main_loop_new( NULL, FALSE );<br> bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline) );<br> gst_bus_add_watch( bus, (GstBusFunc)bus_call, loop );<br> gst_element_set_state(pipeline, GST_STATE_PLAYING);<br>
<br> g_print("g_main_loop_run start \n");<br><br> /* Iterate */<br> g_main_loop_run(loop);<br><br> g_print("g_main_loop_run end \n");<br><br> /* Out of the main loop, clean up nicely */<br>
gst_element_set_state( pipeline, GST_STATE_NULL );<br> gst_object_unref( GST_OBJECT(pipeline) );<br><br> return 0;<br>}<br><br>6.test<br>-----------------------------------------<br> CommandPrompt > music-player file://d/test/hogehoge.ogg<br>
<br>Kei<br><br><br><br><div class="gmail_quote">2011/9/11 jam <span dir="ltr"><<a href="mailto:nunzianteantonio@gmail.com">nunzianteantonio@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<br>
<br>
could you show me the right way to configure Visual Studio (2010 in my case)<br>
in order to create a simple GStreamer example?<br>
<br>
Thanks,<br>
-Antonio<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Configure-Visual-Studio-2010-for-GStreamer-tp3804989p3804989.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Configure-Visual-Studio-2010-for-GStreamer-tp3804989p3804989.html</a><br>
Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</font></blockquote></div><br>