Hi all,
could you show me the right way to configure Visual Studio (2010 in my case) in order to create a simple GStreamer example? Thanks, -Antonio |
Hi Antonio.
# I can speek English a little. # If I use funny English, I'm sorry. 1.install OK? ----------------------------------------- GTK & GStreamer-WinBuilds & GStreamer-WinBuilds-SDK installed, OK? 2.environment OK? ----------------------------------------- GST_PLUGIN_PATH C:\Program Files\OSSBuild\GStreamer\v0.10.6\lib\gstreamer-0.10 OSSBUILD_GSTREAMER_DIR C:\Program Files\OSSBuild\GStreamer\v0.10.6\ Path C:\Program Files\OSSBuild\GStreamer\v0.10.6\bin 3.check OK? ----------------------------------------- CommandPrompt > gst-launch videotestsrc ! ffmpegcolorspace ! autovideosink 4.configure VC express 2008 in my case ----------------------------------------- # I use VC with Japanese. I don't know VC with English. # I skip write configuration when you install GTK. [property-page] [property(not common)] [c/c++] [general] [add include dir] C:\Program Files\OSSBuild\GStreamer\v0.10.6\sdk\include\gstreamer-0.10 [property-page] [property(not common)] [linker] [general] C:\GTK\lib C:\Program Files\OSSBuild\GStreamer\v0.10.6\sdk\lib [property-page] [property(not common)] [linker] [input] gstreamer-0.10.lib 5.src (music-player.exe) ----------------------------------------- #include <gst/gst.h> /**************************************************************************** * call back * ****************************************************************************/ static void bus_call(GstBus *bus, GstMessage *msg, GMainLoop *mainloop ) { switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_EOS: g_print("EOS\n"); g_main_loop_quit(mainloop); break; case GST_MESSAGE_ERROR:{ gchar *debug; GError *error; gst_message_parse_error(msg, &error, &debug); g_free(debug); g_printerr("Error: %s\n", error->message); g_error_free(error); break; } case GST_MESSAGE_WARNING:{ gchar *debug; GError *error; gst_message_parse_warning(msg, &error, &debug); g_printerr("WARNING: %s (%s)\n", error->message, (debug) ? debug : "no details"); g_error_free(error); g_free(debug); break; } default: break; } } /**************************************************************************** * main * ****************************************************************************/ int main( int argc, char *argv[] ) { GstElement *playbin; GstElement *pipeline; GMainLoop *loop; GstBus *bus; if(argc!=2){ g_printerr("usage: tinyPlayer [mediafile]\n"); exit(1); } gst_init(&argc, &argv); pipeline = gst_pipeline_new( NULL ); /* Create gstreamer elements */ playbin = gst_element_factory_make( "playbin2", NULL ); gst_bin_add( GST_BIN(pipeline), playbin ); g_object_set( G_OBJECT(playbin), "uri", argv[1], NULL ); /* bus callbacks */ loop = g_main_loop_new( NULL, FALSE ); bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline) ); gst_bus_add_watch( bus, (GstBusFunc)bus_call, loop ); gst_element_set_state(pipeline, GST_STATE_PLAYING); g_print("g_main_loop_run start \n"); /* Iterate */ g_main_loop_run(loop); g_print("g_main_loop_run end \n"); /* Out of the main loop, clean up nicely */ gst_element_set_state( pipeline, GST_STATE_NULL ); gst_object_unref( GST_OBJECT(pipeline) ); return 0; } 6.test ----------------------------------------- CommandPrompt > music-player file://d/test/hogehoge.ogg Kei 2011/9/11 jam <[hidden email]> Hi all, _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
If you need python26.dll, download from http://sourceforge.jp/projects/sfnet_ciphergeekcube/releases/
2011/9/12 Kei Naga <[hidden email]> Hi Antonio. _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thank you. Probably the configuration in Visual Studio 2010 is a little bit different because after point 4 if I compile a simple project it tells me:
Errore 1 error C1083: Impossibile aprire il file inclusione 'glib.h': No such file or directory C:\Programmi\ OSSBuild\GStreamer\v0.10.6\sdk\include\gstreamer-0.10\gst\gst.h 27 1 TestGS |
install GTK OK?
------------------------- http://sourceforge.net/projects/gladewin32/files/gtk%2B-win32-devel/2.12.9/ gtk-dev-2.12.9-win32-2.exe configure when GTK install OK? ------------------------- [property-page] [property(not common)] [c/c++] [general] [add include dir] C:\GTK\include\libxml2 C:\GTK\include\libglade-2.0 C:\GTK\lib\gtkglext-1.0\include C:\GTK\lib\glib-2.0\include C:\GTK\lib\gtk-2.0\include C:\GTK\include\gtkglext-1.0 C:\GTK\include\atk-1.0 C:\GTK\include\cairo C:\GTK\include\pango-1.0 C:\GTK\include\glib-2.0 C:\GTK\include\gtk-2.0 C:\GTK\include [property-page] [property(not common)] [linker] [general] [add lib dir] C:\GTK\lib [property-page] [property(not common)] [linker] [input] [add dependence file] glb-2.0.lib gobject-2.0.lib gtk-win32-2.0.lib install GStreamer OK? ------------------------- GStreamer-WinBuilds-GPL-x86.msi GStreamer-WinBuilds-SDK-GPL-x86.msi 2011/9/12 jam <[hidden email]> Thank you. Probably the configuration in Visual Studio 2010 is a little bit Errore 1 error C1083: Impossibile aprire il file inclusione 'glib.h': No _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
I followed these steps and it seems to work know. I tryed it without GTK installed. Is GTK necessary in each application? Maybe I'll try your suggestion later. |
Free forum by Nabble | Edit this page |