Commit 7172a585 authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

Remove libgstplay, playbin is now the official successor.

Original commit message from CVS:
* configure.ac:
* examples/Makefile.am:
* examples/gstplay/.cvsignore:
* examples/gstplay/Makefile.am:
* examples/gstplay/player.c:
* gst-libs/gst/Makefile.am:
* gst-libs/gst/play/.cvsignore:
* gst-libs/gst/play/Makefile.am:
* gst-libs/gst/play/play.c:
* gst-libs/gst/play/play.h:
* gst-libs/gst/play/play.vcproj:
* pkgconfig/Makefile.am:
* pkgconfig/gstreamer-play-uninstalled.pc.in:
* pkgconfig/gstreamer-play.pc.in:
Remove libgstplay, playbin is now the official successor.
parent 3420e480
2005-04-25 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* configure.ac:
* examples/Makefile.am:
* examples/gstplay/.cvsignore:
* examples/gstplay/Makefile.am:
* examples/gstplay/player.c:
* gst-libs/gst/Makefile.am:
* gst-libs/gst/play/.cvsignore:
* gst-libs/gst/play/Makefile.am:
* gst-libs/gst/play/play.c:
* gst-libs/gst/play/play.h:
* gst-libs/gst/play/play.vcproj:
* pkgconfig/Makefile.am:
* pkgconfig/gstreamer-play-uninstalled.pc.in:
* pkgconfig/gstreamer-play.pc.in:
Remove libgstplay, playbin is now the official successor.
2005-04-25 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
 
* configure.ac:
......
......@@ -905,7 +905,6 @@ gst-libs/gst/gconf/Makefile
gst-libs/gst/media-info/Makefile
gst-libs/gst/mixer/Makefile
gst-libs/gst/navigation/Makefile
gst-libs/gst/play/Makefile
gst-libs/gst/propertyprobe/Makefile
gst-libs/gst/riff/Makefile
gst-libs/gst/tag/Makefile
......@@ -917,7 +916,6 @@ examples/dynparams/Makefile
examples/capsfilter/Makefile
examples/seeking/Makefile
examples/indexing/Makefile
examples/gstplay/Makefile
examples/switch/Makefile
examples/Makefile
testsuite/embed/Makefile
......@@ -935,8 +933,6 @@ pkgconfig/gstreamer-libs.pc
pkgconfig/gstreamer-libs-uninstalled.pc
pkgconfig/gstreamer-media-info.pc
pkgconfig/gstreamer-media-info-uninstalled.pc
pkgconfig/gstreamer-play.pc
pkgconfig/gstreamer-play-uninstalled.pc
pkgconfig/gstreamer-plugins.pc
pkgconfig/gstreamer-plugins-uninstalled.pc
po/Makefile.in
......
......@@ -10,11 +10,5 @@ else
GTK_SUBDIRS=
endif
if USE_GCONF
GCONF_SUBDIRS=gstplay
else
GCONF_SUBDIRS=
endif
SUBDIRS=$(GTK_SUBDIRS) $(GCONF_SUBDIRS) switch
DIST_SUBDIRS=capsfilter dynparams seeking indexing gstplay switch
SUBDIRS=$(GTK_SUBDIRS) switch
DIST_SUBDIRS=capsfilter dynparams seeking indexing switch
noinst_PROGRAMS = player
player_SOURCES = player.c
player_CFLAGS = $(GST_CFLAGS) $(GCONF_CFLAGS)
player_LDFLAGS = \
$(GST_LIBS) \
$(top_builddir)/gst-libs/gst/gconf/libgstgconf-@GST_MAJORMINOR@.la \
$(top_builddir)/gst-libs/gst/play/libgstplay-@GST_MAJORMINOR@.la \
$(top_builddir)/gst-libs/gst/libgstinterfaces-$(GST_MAJORMINOR).la
/* GStreamer
* Copyright (C) 2003 Julien Moutte <julien@moutte.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <gst/play/play.h>
#include <gst/gconf/gconf.h>
static GMainLoop *loop = NULL;
static gint64 length = 0;
static void
print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
{
gint i, count;
count = gst_tag_list_get_tag_size (list, tag);
for (i = 0; i < count; i++) {
gchar *str;
if (gst_tag_get_type (tag) == G_TYPE_STRING) {
if (!gst_tag_list_get_string_index (list, tag, i, &str))
g_assert_not_reached ();
} else {
str =
g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i));
}
if (i == 0) {
g_print ("%15s: %s\n", gst_tag_get_nick (tag), str);
} else {
g_print (" : %s\n", str);
}
g_free (str);
}
}
static void
got_found_tag (GstPlay * play, GstElement * source, GstTagList * tag_list)
{
gst_tag_list_foreach (tag_list, print_tag, NULL);
}
static void
got_time_tick (GstPlay * play, gint64 time_nanos)
{
g_print ("time tick %f\n", time_nanos / (float) GST_SECOND);
}
static void
got_stream_length (GstPlay * play, gint64 length_nanos)
{
g_print ("got length %" G_GUINT64_FORMAT "\n", length_nanos);
length = length_nanos;
}
static void
got_video_size (GstPlay * play, gint width, gint height)
{
g_print ("got video size %d, %d\n", width, height);
}
static void
got_eos (GstPlay * play)
{
g_print ("End Of Stream\n");
g_main_loop_quit (loop);
}
static gboolean
seek_timer (GstPlay * play)
{
gst_play_seek_to_time (play, length / 2);
return FALSE;
}
int
main (int argc, char *argv[])
{
GstPlay *play;
GstElement *data_src, *video_sink, *audio_sink, *vis_element;
GError *error = NULL;
/* Initing GStreamer library */
gst_init (&argc, &argv);
if (argc != 2) {
g_print ("usage: %s <video filename>\n", argv[0]);
exit (-1);
}
loop = g_main_loop_new (NULL, FALSE);
/* Creating the GstPlay object */
play = gst_play_new (&error);
if (error) {
g_print ("Error: could not create play object:\n%s\n", error->message);
g_error_free (error);
return 1;
}
/* Getting default audio and video plugins from GConf */
vis_element = gst_element_factory_make ("goom", "vis_element");
data_src = gst_element_factory_make ("gnomevfssrc", "source");
audio_sink = gst_gconf_get_default_audio_sink ();
if (!GST_IS_ELEMENT (audio_sink))
g_error ("Could not get default audio sink from GConf");
video_sink = gst_gconf_get_default_video_sink ();
if (!GST_IS_ELEMENT (video_sink))
g_error ("Could not get default video sink from GConf");
/* Let's send them to GstPlay object */
if (!gst_play_set_audio_sink (play, audio_sink))
g_warning ("Could not set audio sink");
if (!gst_play_set_video_sink (play, video_sink))
g_warning ("Could not set video sink");
if (!gst_play_set_data_src (play, data_src))
g_warning ("Could not set data src");
if (!gst_play_set_visualization (play, vis_element))
g_warning ("Could not set visualisation");
/* Setting location we want to play */
if (!gst_play_set_location (play, argv[1]))
g_warning ("Could not set location");
/* Uncomment that line to get an XML dump of the pipeline */
/* gst_xml_write_file (GST_ELEMENT (play), stdout); */
g_signal_connect (G_OBJECT (play), "time_tick",
G_CALLBACK (got_time_tick), NULL);
g_signal_connect (G_OBJECT (play), "stream_length",
G_CALLBACK (got_stream_length), NULL);
g_signal_connect (G_OBJECT (play), "have_video_size",
G_CALLBACK (got_video_size), NULL);
g_signal_connect (G_OBJECT (play), "found_tag",
G_CALLBACK (got_found_tag), NULL);
g_signal_connect (G_OBJECT (play), "error",
G_CALLBACK (gst_element_default_error), NULL);
g_signal_connect (G_OBJECT (play), "eos", G_CALLBACK (got_eos), NULL);
/* Change state to PLAYING */
if (gst_element_set_state (GST_ELEMENT (play),
GST_STATE_PLAYING) == GST_STATE_FAILURE)
g_error ("Could not set state to PLAYING");
g_timeout_add (20000, (GSourceFunc) seek_timer, play);
g_main_loop_run (loop);
g_print ("setting pipeline to ready\n");
gst_element_set_state (GST_ELEMENT (play), GST_STATE_READY);
/* unref
gst_object_unref (GST_OBJECT (play)); */
exit (0);
}
......@@ -18,8 +18,7 @@ SUBDIRS = \
tuner \
video \
xoverlay \
. \
play
.
DIST_SUBDIRS = \
audio \
......@@ -29,7 +28,6 @@ DIST_SUBDIRS = \
media-info \
mixer \
navigation \
play \
propertyprobe \
riff \
tag \
......
play-enumtypes.[ch]
play-marshal.[ch]
play-marshal.list
# variables used for enum generation
glib_enum_headers=$(play_headers)
glib_enum_define=GST_PLAY
glib_enum_prefix=gst_play
librarydir = $(libdir)
play_headers = \
play.h
built_headers = \
play-enumtypes.h
library_LTLIBRARIES = libgstplay-@GST_MAJORMINOR@.la
libgstplay_@GST_MAJORMINOR@_la_SOURCES = play.c
nodist_libgstplay_@GST_MAJORMINOR@_la_SOURCES = play-enumtypes.c
libgstplay_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/play
libgstplay_@GST_MAJORMINOR@include_HEADERS = $(play_headers)
nodist_libgstplay_@GST_MAJORMINOR@include_HEADERS = $(built_headers)
libgstplay_@GST_MAJORMINOR@_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_CFLAGS)
libgstplay_@GST_MAJORMINOR@_la_LIBADD = \
$(GST_LIBS) $(GST_PLUGINS_LIBS) \
$(GST_CONTROL_LIBS) \
$(top_builddir)/gst-libs/gst/libgstinterfaces-$(GST_MAJORMINOR).la
libgstplay_@GST_MAJORMINOR@_la_LDFLAGS = \
-version-info @GST_PLUGINS_LIBVERSION@
BUILT_SOURCES = \
play-enumtypes.c \
$(built_headers)
CLEANFILES = $(BUILT_SOURCES)
include $(top_srcdir)/common/glib-gen.mak
This diff is collapsed.
/* GStreamer
* Copyright (C) 2003 Julien Moutte <julien@moutte.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_PLAY_H__
#define __GST_PLAY_H__
#include <gst/gst.h>
#include <gst/xoverlay/xoverlay.h>
#include <gst/play/play-enumtypes.h>
G_BEGIN_DECLS
/* GError stuff */
#define GST_PLAY_ERROR gst_play_error_quark ()
/* GObject stuff */
#define GST_TYPE_PLAY (gst_play_get_type())
#define GST_PLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLAY, GstPlay))
#define GST_PLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLAY, GstPlayClass))
#define GST_IS_PLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLAY))
#define GST_IS_PLAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLAY))
#define GST_PLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PLAY, GstPlayClass))
typedef enum
{
GST_PLAY_SINK_TYPE_AUDIO,
GST_PLAY_SINK_TYPE_VIDEO,
GST_PLAY_SINK_TYPE_ANY,
} GstPlaySinkType;
typedef struct _GstPlay GstPlay;
typedef struct _GstPlayClass GstPlayClass;
typedef struct _GstPlayPrivate GstPlayPrivate;
struct _GstPlay
{
GstPipeline pipeline;
GstPlayPrivate *priv;
gpointer _gst_reserved[GST_PADDING];
};
struct _GstPlayClass
{
GstPipelineClass parent_class;
void (*time_tick) (GstPlay *play, gint64 time_nanos);
void (*stream_length) (GstPlay *play, gint64 length_nanos);
void (*have_video_size) (GstPlay *play, gint width, gint height);
gpointer _gst_reserved[GST_PADDING];
};
GType gst_play_get_type (void);
GstPlay * gst_play_new (GError **error);
gboolean gst_play_set_data_src (GstPlay *play,
GstElement *data_src);
gboolean gst_play_set_video_sink (GstPlay *play,
GstElement *video_sink);
gboolean gst_play_set_audio_sink (GstPlay *play,
GstElement *audio_sink);
gboolean gst_play_set_visualization (GstPlay *play,
GstElement *element);
gboolean gst_play_connect_visualization (GstPlay *play,
gboolean connect);
gboolean gst_play_set_location (GstPlay *play,
const char *location);
char * gst_play_get_location (GstPlay *play);
gboolean gst_play_seek_to_time (GstPlay *play,
gint64 time_nanos);
GstElement * gst_play_get_sink_element (GstPlay *play,
GstElement *element,
GstPlaySinkType sink_type);
GList * gst_play_get_all_by_interface (GstPlay *play,
GType interface);
gdouble gst_play_get_framerate (GstPlay *play);
G_END_DECLS
#endif /* __GST_PLAY_H__ */
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="play"
ProjectGUID="{979C216F-0ACF-4956-AE00-055A42D67899}"
RootNamespace="play"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../../win32/Debug"
IntermediateDirectory="../../../win32/Debug"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;&quot;../../../gst-libs&quot;;../../../../popt/include;../../../../libxml2/include/libxml2"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
OutputFile="$(OutDir)/gstplay.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="../../../../gstreamer/win32/Debug;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
ModuleDefinitionFile="play.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/play.pdb"
SubSystem="2"
OptimizeReferences="2"
ImportLibrary="$(OutDir)/gstplay.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../../win32/Release"
IntermediateDirectory="../../../win32/Release"
ConfigurationType="2"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;&quot;../../../gst-libs&quot;;../../../../popt/include;../../../../libxml2/include/libxml2"
PreprocessorDefinitions="WIN32;NDEBUG;GST_DISABLE_GST_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
OutputFile="$(OutDir)/gstplay.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../gstreamer/win32/Release;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
ModuleDefinitionFile="play.def"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/gstplay.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\play.c">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath=".\play.h">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
......@@ -12,14 +12,12 @@ pcverfiles = \
gstreamer-interfaces-@GST_MAJORMINOR@.pc \
gstreamer-libs-@GST_MAJORMINOR@.pc \
gstreamer-media-info-@GST_MAJORMINOR@.pc \
gstreamer-play-@GST_MAJORMINOR@.pc \
gstreamer-plugins-@GST_MAJORMINOR@.pc
pcverfiles_uninstalled = \
$(GCONF_PC_UNINSTALLED) \
gstreamer-interfaces-@GST_MAJORMINOR@-uninstalled.pc \
gstreamer-libs-@GST_MAJORMINOR@-uninstalled.pc \
gstreamer-media-info-@GST_MAJORMINOR@-uninstalled.pc \
gstreamer-play-@GST_MAJORMINOR@-uninstalled.pc \
gstreamer-plugins-@GST_MAJORMINOR@-uninstalled.pc
pcverfiles_gconf = $(GCONF_PC) $(GCONF_PC_UNINSTALLED)
......@@ -40,7 +38,6 @@ pcinfiles = \
gstreamer-interfaces.pc.in gstreamer-interfaces-uninstalled.pc.in \
gstreamer-libs.pc.in gstreamer-libs-uninstalled.pc.in \
gstreamer-media-info.pc.in gstreamer-media-info-uninstalled.pc.in \
gstreamer-play.pc.in gstreamer-play-uninstalled.pc.in \
gstreamer-plugins.pc.in gstreamer-plugins-uninstalled.pc.in
DISTCLEANFILES = $(pcinfiles:.in=)
......
prefix=
exec_prefix=
libdir=${pcfiledir}/../gst-libs/gst/play
includedir=${pcfiledir}/../gst-libs
Name: GStreamer Play Library, uninstalled
Description: Streaming-media framework, play libraries, not installed
Requires: gstreamer-@GST_MAJORMINOR@ \
gstreamer-interfaces-@GST_MAJORMINOR@ >= @VERSION@
gstreamer-control-@GST_MAJORMINOR@ >= @VERSION@
Version: @VERSION@
Libs: ${libdir}/libgstplay-@GST_MAJORMINOR@.la
Cflags: -I${includedir}
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@/gstreamer-@GST_MAJORMINOR@
Name: GStreamer Play Library
Description: Streaming-media framework, play libraries
Requires: gstreamer-@GST_MAJORMINOR@ gstreamer-interfaces-@GST_MAJORMINOR@ gstreamer-control-@GST_MAJORMINOR@
Version: @VERSION@
Libs: -L${libdir} -lgstplay-@GST_MAJORMINOR@
Cflags: -I${includedir}
......@@ -10,11 +10,5 @@ else
GTK_SUBDIRS=
endif