でも、まずはEmacsに慣れたいのでcode::blocksは我慢。


4.1. Simple initialization

#include <gst/gst.h>

int
main (int   argc,
      char *argv[])
{
  const gchar *nano_str;
  guint major, minor, micro, nano;

  gst_init (&argc, &argv);

  gst_version (&major, &minor, &micro, &nano);

  if (nano == 1)
    nano_str = "(CVS)";
  else if (nano == 2)
    nano_str = "(Prerelease)";
  else
    nano_str = "";

  printf ("This program is linked against GStreamer %d.%d.%d %s\n",
          major, minor, micro, nano_str);

  return 0;
}

著作権は以下。

Copyright (c) by Wim Taymans, Steve Baker, Andy Wingo, Ronald S. Bultje, Stefan Kost. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/).

コンパイルは以下。(gst-hello.c がソースファイル。gst-helloが実行バイナリ。)

gcc gst-hello.c -o gst-hello `pkg-config --cflags --libs gstreamer-0.10`