ENV:
- Gstreamer1.0
reference : http://docs.gstreamer.com/pages/viewpage.action?pageId=327735
And the codes are same as of Basic tutorial 1 web page
The one thing, that different is playbin2 -> playbin.
At very first time, I got a error.
I googled, as a result I got following information at https://wiki.ubuntu.com/Novacut/GStreamer1.0#playbin2
At finally,

reference : http://docs.gstreamer.com/pages/viewpage.action?pageId=327735
I build the tutorial code with CMake.
Following CMakeLists.txt is a template, so it is not optimize for tutorial code.
[seungrye@localpc example]$ cat CMakeLists.txt
cmake_minimum_required (VERSION 2.6)
set (EXECUTABLE example)
project (${EXECUTABLE})
include_directories(${CMAKE_CURRENT_BINARY_DIR}
/usr/include/gstreamer-1.0
/usr/include/glib-2.0
/usr/lib/glib-2.0/include)
set (SRCS
main.c)
set(CMAKE_C_FLAGS "-g -Wall")
add_executable (${EXECUTABLE} ${SRCS})
target_link_libraries (${EXECUTABLE}
gstreamer-1.0
glib-2.0)
And the codes are same as of Basic tutorial 1 web page
#include <gst/gst.h>#include <stdio.h>int main(int argc, char *argv[]) {GstElement *pipeline;GstBus *bus;GstMessage *msg;GError *error = NULL;/* Initialize GStreamer */gst_init (&argc, &argv);/* Build the pipeline */pipeline = gst_parse_launch ("playbin uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm",&error);if (!pipeline) {fprintf(stderr, "gst_parse_launch F");if (error != NULL) fprintf(stderr, ": %s", error->message);fprintf(stderr, "\n");g_error_free(error);return -1;}/* Start playing */gst_element_set_state (pipeline, GST_STATE_PLAYING);/* Wait until error or EOS */bus = gst_element_get_bus (pipeline);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;}
The one thing, that different is playbin2 -> playbin.
At very first time, I got a error.
[seungrye@localpc example]$ ./example
gst_parse_launch F: no element "playbin2"
I googled, as a result I got following information at https://wiki.ubuntu.com/Novacut/GStreamer1.0#playbin2
playbin2
The "playbin2" element has been renamed to "playbin", and the old "playbin" element has been removed.
At finally,

It plays Well : )
덧글