Blame gst/playback/gstplayback.c

Packit 971217
/* GStreamer
Packit 971217
 * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
Packit 971217
 *
Packit 971217
 * This library is free software; you can redistribute it and/or
Packit 971217
 * modify it under the terms of the GNU Library General Public
Packit 971217
 * License as published by the Free Software Foundation; either
Packit 971217
 * version 2 of the License, or (at your option) any later version.
Packit 971217
 *
Packit 971217
 * This library is distributed in the hope that it will be useful,
Packit 971217
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 971217
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 971217
 * Library General Public License for more details.
Packit 971217
 *
Packit 971217
 * You should have received a copy of the GNU Library General Public
Packit 971217
 * License along with this library; if not, write to the
Packit 971217
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit 971217
 * Boston, MA 02110-1301, USA.
Packit 971217
 */
Packit 971217
Packit 971217
#ifdef HAVE_CONFIG_H
Packit 971217
#include "config.h"
Packit 971217
#endif
Packit 971217
Packit 971217
#include <string.h>
Packit 971217
#include <gst/gst.h>
Packit 971217
Packit 971217
#include <gst/gst-i18n-plugin.h>
Packit 971217
#include <gst/pbutils/pbutils.h>
Packit 971217
Packit 971217
#include "gstplayback.h"
Packit 971217
#include "gstplaysink.h"
Packit 971217
#include "gstsubtitleoverlay.h"
Packit 971217
#include "gststreamsynchronizer.h"
Packit 971217
Packit 971217
static gboolean
Packit 971217
plugin_init (GstPlugin * plugin)
Packit 971217
{
Packit 971217
  gboolean res;
Packit 971217
Packit 971217
  gst_pb_utils_init ();
Packit 971217
Packit 971217
#ifdef ENABLE_NLS
Packit 971217
  GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
Packit 971217
      LOCALEDIR);
Packit 971217
  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
Packit 971217
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
Packit 971217
#endif /* ENABLE_NLS */
Packit 971217
Packit 971217
  /* Swap in playbin3 as 'playbin' if USE_PLAYBIN3=1 */
Packit 971217
  {
Packit 971217
    const gchar *env = g_getenv ("USE_PLAYBIN3");
Packit 971217
    if (env && g_str_has_prefix (env, "1"))
Packit 971217
      res = gst_play_bin3_plugin_init (plugin, TRUE);
Packit 971217
    else
Packit 971217
      res = gst_play_bin2_plugin_init (plugin);
Packit 971217
  }
Packit 971217
Packit 971217
  res &= gst_play_bin3_plugin_init (plugin, FALSE);
Packit 971217
  res &= gst_play_sink_plugin_init (plugin);
Packit 971217
  res &= gst_subtitle_overlay_plugin_init (plugin);
Packit 971217
  res &= gst_stream_synchronizer_plugin_init (plugin);
Packit 971217
Packit 971217
  res &= gst_decode_bin_plugin_init (plugin);
Packit 971217
  res &= gst_decodebin3_plugin_init (plugin);
Packit 971217
  res &= gst_uri_decode_bin_plugin_init (plugin);
Packit 971217
  res &= gst_uri_decode_bin3_plugin_init (plugin);
Packit 971217
  res &= gst_uri_source_bin_plugin_init (plugin);
Packit 971217
  res &= gst_parse_bin_plugin_init (plugin);
Packit 971217
Packit 971217
  return res;
Packit 971217
}
Packit 971217
Packit 971217
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
Packit 971217
    GST_VERSION_MINOR,
Packit 971217
    playback,
Packit 971217
    "various playback elements", plugin_init, VERSION, GST_LICENSE,
Packit 971217
    GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)