Commit 55006f63 authored by Wim Taymans's avatar Wim Taymans

Merged the AUTOPLUG2 branch

Original commit message from CVS:
Merged the AUTOPLUG2 branch
parent 031e0a3a
......@@ -597,6 +597,7 @@ AM_CONDITIONAL(HAVE_LIBSHOUT, test "x$HAVE_LIBSHOUT" = "xyes")
AM_CONDITIONAL(HAVE_LIBESD, test "x$HAVE_LIBESD" = "xyes")
AM_CONDITIONAL(HAVE_LIBASOUND, test "x$HAVE_LIBASOUND" = "xyes")
AM_CONDITIONAL(HAVE_MPEG2DEC, test "x$HAVE_MPEG2DEC" = "xyes")
AM_CONDITIONAL(HAVE_LIBXMMS, test "x$HAVE_LIBXMMS" = "xyes")
......@@ -680,6 +681,7 @@ gst/Makefile
gst/types/Makefile
gst/meta/Makefile
gst/elements/Makefile
gst/autoplug/Makefile
libs/Makefile
libs/riff/Makefile
libs/colorspace/Makefile
......
......@@ -15,60 +15,18 @@ to convert a certain GstCaps to another one.
</para>
<!-- ##### MACRO GST_AUTOPLUG_MAX_COST ##### -->
<para>
The maximum cost of a certain connection.
</para>
<!-- ##### USER_FUNCTION GstAutoplugCostFunction ##### -->
<para>
Calculate the cost between two elements.
</para>
@src: the source element
@dest: the destination element
@data: optional user data
@Returns: the cost for a connection between the two elements
<!-- ##### USER_FUNCTION GstAutoplugListFunction ##### -->
<para>
Get a list of all elements. These elements will be used in autoplugging.
</para>
@data: user data
@Returns: a GList of elements
<!-- ##### FUNCTION gst_autoplug_caps ##### -->
<para>
</para>
@srccaps:
@sinkcaps:
@Returns:
<!-- ##### FUNCTION gst_autoplug_pads ##### -->
<!-- ##### FUNCTION gst_autoplug_caps_list ##### -->
<para>
</para>
@autoplug:
@srcpad:
@sinkpad:
@Varargs:
@Returns:
<!-- ##### FUNCTION gst_autoplug_caps_list ##### -->
<para>
</para>
<!-- # Unused Parameters # -->
@srccaps:
@sinkcaps:
@Returns:
......@@ -133,6 +133,8 @@ a start/stop timecode pair.
@offset: the offset of the region to get
@len: the length of the region to get
@Returns: a #GstBuffer
<!-- # Unused Parameters # -->
@size: the size of the region to get
<!-- ##### USER_FUNCTION GstPadQoSFunction ##### -->
......
......@@ -38,33 +38,6 @@ pipeline figure out what plugins to use.
@Returns:
<!-- ##### FUNCTION gst_pipeline_add_sink ##### -->
<para>
</para>
@pipeline:
@sink:
<!-- ##### FUNCTION gst_pipeline_add_src ##### -->
<para>
</para>
@pipeline:
@src:
<!-- ##### FUNCTION gst_pipeline_autoplug ##### -->
<para>
</para>
@pipeline:
@Returns:
<!-- ##### MACRO gst_pipeline_destroy ##### -->
<para>
Destroys the pipeline.
......
......@@ -27,6 +27,8 @@ GStreamer is extensible so <classname>GstElements</classname> can be loaded at r
@numtypes:
@elements:
@numelements:
@autopluggers:
@numautopluggers:
@loaded:
<!-- ##### STRUCT GstPluginElement ##### -->
......@@ -203,15 +205,6 @@ by the loader at statup.
@Returns:
<!-- ##### FUNCTION gst_plugin_find_elementfactory ##### -->
<para>
</para>
@name:
@Returns:
<!-- ##### FUNCTION gst_plugin_load_elementfactory ##### -->
<para>
......
......@@ -780,10 +780,6 @@ Query whether this object has multiple input pads.
</para>
<!-- ##### SECTION ./tmpl/gstasyncdisksrc.sgml:Short_Description ##### -->
Asynchronous disk reader. (asyncdisksrc)
<!-- ##### FUNCTION gst_src_signal_eos ##### -->
<para>
......@@ -1383,11 +1379,15 @@ The start point of a filter graph
@klass:
<<<<<<< gstreamer-unused.sgml
<!-- ##### SECTION ./tmpl/gstasyncdisksrc.sgml:Title ##### -->
GstAsyncDiskSrc
<!-- ##### MACRO GST_TYPE_ASYNCDISKSRC ##### -->
=======
<!-- ##### MACRO GST_TYPE_ASYNCDISKSRC ##### -->
>>>>>>> 1.23.2.3
<para>
</para>
......@@ -2009,6 +2009,7 @@ GstFilter
</para>
<<<<<<< gstreamer-unused.sgml
<!-- ##### ENUM GstSrcFlags ##### -->
<para>
Flags for the GstSrc element
......@@ -2024,6 +2025,18 @@ Flags for the GstSrc element
<!-- ##### MACRO GST_HTTPSRC ##### -->
=======
<!-- ##### ENUM GstSrcFlags ##### -->
<para>
Flags for the GstSrc element
</para>
@GST_SRC_ASYNC: Indicates that this src is asynchronous
@GST_SRC_FLAG_LAST: subclasses can use this to number their flags
<!-- ##### MACRO GST_HTTPSRC ##### -->
>>>>>>> 1.23.2.3
<para>
</para>
......
Face it, the plugins/ directory hierarchy is crap. We want to propose a
better layout for it now. Some things to consider:
- Elements have a klass member in the factory that is used to
denote the functional type of the element. For example, the
mp3 encoder has a klass of Filter/Encoder/Audio
- The plugins can be grouped together by the media type they
operate on or by the way they work (decoder/encoder)
In GStreamer all plugins are techically filters, the only way they
can be considered sources or sinks (input/output) elements is
by the absence of src/sink pads. At first sight the source/filter/
sink distinction is quite useless because most of the plugins
will go into the filters category anyway.
We don't want to make the hierarchy too deep, yet provide a
clean way to ask for a mp3 decoder element..
Anyway this is a rough proposal to fire off the discussions...
Wim
Source
Disk
disksrc
fdsrc
multifilesrc
Network
HTTPsrc
RTPsrc
CDDA
cdparanoia
XMMS
..
DVD
dvdsrc
Audio
ASLA
OSS
Capture
v4lsrc
firewire
Demuxer
AVI
MPEG1
MPEG2
QT
Muxer
AVI
MPEG1
QT
Aggregator
Tee
gsttee
Connection
queue
CORBA
Parser
MPEG1
MPEG2
AC3
Mixer
Audio
Merge
Video
Subtitles
Merge
Filters
Audio
ladspa
resample
Video
colorspace
Effect
Audio
stereo
volume
delay
chorus
Video
median
smooth
XMMS
Decoder
MPEG1
MPEG2
MP3
mpg123
xing
win32
AU
WAV
JPEG
AC3
ac3dec
RTJPEG
vorbis
Encoder
MPEG1
MPEG2
MP3
lame
mpegaudio
win32
JPEG
AU
WAV
RTJPEG
Vorbis
Visualisation
Video
histogram
Audio
smoothwave
spectrum
synaesthesia
vumeter
XMMS
Sink
Disk
filesink
multifilesink
Network
ICECASTsink
FTPsink
RTPsink
XMMS
ESD
Video
videosink
SDLsink
Audio
OSSsink
ALSAsink
......@@ -42,22 +42,26 @@ any intermediate steps to accomplish this conversion.
The API for the user apps should be no more then this:
GstElement* gst_autoplug_construct (GstAutoplug *autoplug,
GstCaps *incaps,
GstCaps *outcaps, ...);
GstElement* gst_autoplug_caps_list (GstAutoplug *autoplug,
GList *incaps,
GList *outcaps, ...);
autoplug is a reference to the autoplug implementation
incaps is a GstCaps handle for the source pad, the last set
of arguments is a va_list of destination caps.
incaps is a GList of GstCaps* for the source pad, the last set
of arguments is a va_list of destination caps lists.
A handle to the autoplugger implementation can be obtained
with
GList* gst_autoplug_get_list (void);
GList* gst_autoplugfactory_get_list (void);
which will return a GList* of autopluggers.
GstAutoplug* gst_autoplug_get ("name");
GstAutoplug* gst_autoplugfactory_make ("name");
or
GstAutoplug* gst_autoplugfactory_create (GstAutoplugFactory *autoplug);
is used to get an autoplugger.
......@@ -72,11 +76,12 @@ overriding various methods.
the autoplugger can be registered with:
gst_plugin_add_autoplugger (GstPlugin *plugin,
GstAutoplug *autoplug);
GstAutoplugFactory *autoplug);
This will allow us to only load the autoplugger when needed.
4) implementation
-----------------
......@@ -108,11 +113,9 @@ properties:
- name, description, more text to identify the autoplugger.
- a class method autoplug_construct that has to be implemented by
- a class method autoplug_caps_list that has to be implemented by
the real autoplugger.
- possible PadTemplates that this autoplugger can handle well?
optionally, the core autoplugger code can provide convenience
functions to implement custom autopluggers. The shortest path
algorithm with pluggable weighting and list functions come to
......@@ -124,8 +127,9 @@ A possible use case would be to let gstmediaplay perform an
autoplug on the media stream and insert a custom sound/video
effect in the pipeline when an appropriate element is created.
the "new_object" signal will be fired by the autoplugger whenever
a new object has been created. This signal can be caught by the
user app to perform an introspection on the newly created object.
comments?
Wim
......@@ -155,14 +155,14 @@ struct _GstEditorElement {
struct _GstEditorElementClass {
GnomeCanvasGroupClass parent_class;
void (*name_changed) (GstEditorElement *element);
void (*position_changed) (GstEditorElement *element);
void (*size_changed) (GstEditorElement *element);
void (*realize) (GstEditorElement *element);
gint (*event) (GnomeCanvasItem *item,GdkEvent *event,
GstEditorElement *element);
gint (*button_event) (GnomeCanvasItem *item,GdkEvent *event,
GstEditorElement *element);
void (*name_changed) (GstEditorElement *element);
void (*position_changed) (GstEditorElement *element);
void (*size_changed) (GstEditorElement *element);
void (*realize) (GstEditorElement *element);
gint (*event) (GnomeCanvasItem *item,GdkEvent *event,
GstEditorElement *element);
gint (*button_event) (GnomeCanvasItem *item,GdkEvent *event,
GstEditorElement *element);
};
......@@ -188,11 +188,11 @@ const gchar *gst_editor_element_get_name(GstEditorElement *element);
(GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_BIN))
#define GST_IS_EDITOR_BIN_CLASS(obj) \
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_BIN))
struct _GstEditorBin {
GstEditorElement element;
/* lists of GUI elements and connections */
/* lists of GUI elements and connections */
GList *elements, *connections;
/* connection state */
......@@ -213,11 +213,11 @@ struct _GstEditorBinClass {
GtkType gst_editor_bin_get_type();
GstEditorBin* gst_editor_bin_new (GstBin *bin, const gchar *first_arg_name,...);
void gst_editor_bin_add (GstEditorBin *bin, GstEditorElement *element);
void gst_editor_bin_connection_drag (GstEditorBin *bin,
gdouble wx,gdouble wy);
void gst_editor_bin_start_banding (GstEditorBin *bin,GstEditorPad *pad);
void gst_editor_bin_add (GstEditorBin *bin, GstEditorElement *element);
void gst_editor_bin_connection_drag (GstEditorBin *bin,
gdouble wx,gdouble wy);
void gst_editor_bin_start_banding (GstEditorBin *bin,GstEditorPad *pad);
#define GST_TYPE_EDITOR_CANVAS \
......@@ -246,8 +246,8 @@ struct _GstEditorCanvasClass {
GstEditorCanvas* gst_editor_canvas_new (void);
GstEditorCanvas* gst_editor_canvas_new_with_bin (GstEditorBin *bin);
void gst_editor_canvas_set_bin (GstEditorCanvas *canvas,
GstEditorBin *element);
void gst_editor_canvas_set_bin (GstEditorCanvas *canvas,
GstEditorBin *element);
GstEditorElement* gst_editor_canvas_get_bin (GstEditorCanvas *canvas);
......@@ -263,7 +263,7 @@ GstEditorElement* gst_editor_canvas_get_bin (GstEditorCanvas *canvas);
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PAD))
struct _GstEditorPad {
GtkObject object;
GtkObject object;
/* parent element */
GstEditorElement *parent;
......@@ -291,7 +291,7 @@ struct _GstEditorPad {
gdouble width,height; // actual size
gdouble boxwidth,boxheight; // size of pad box
gboolean resize; // does it need resizing?
/* interaction state */
gboolean dragging,resizing,moved;
gdouble dragx,dragy;
......@@ -300,13 +300,13 @@ struct _GstEditorPad {
// GnomeCanvasItem *connection; // can't use
//GstEditorConnection
};
struct _GstEditorPadClass {
GtkObjectClass parent_class;
void (*realize) (GstEditorPad *pad);
};
GtkType gst_editor_pad_get_type();
GstEditorPad *gst_editor_pad_new(GstEditorElement *parent,GstPad *pad,
const gchar *first_arg_name, ...);
......@@ -329,7 +329,7 @@ void gst_editor_pad_repack(GstEditorPad *pad);
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PADTEMPLATE))
struct _GstEditorPadTemplate {
GtkObject object;
GtkObject object;
/* parent element */
GstEditorElement *parent;
......@@ -361,7 +361,7 @@ struct _GstEditorPadTemplate {
gdouble width,height; // actual size
gdouble boxwidth,boxheight; // size of padtemplate box
gboolean resize; // does it need resizing?
/* interaction state */
gboolean dragging,resizing,moved;
gdouble dragx,dragy;
......@@ -370,13 +370,13 @@ struct _GstEditorPadTemplate {
// GnomeCanvasItem *connection; // can't use
//GstEditorConnection
};
struct _GstEditorPadTemplateClass {
GtkObjectClass parent_class;
void (*realize) (GstEditorPadTemplate *padtemplate);
};
GtkType gst_editor_padtemplate_get_type();
GstEditorPadTemplate *gst_editor_padtemplate_new(GstEditorElement *parent,GstPadTemplate *padtemplate,
const gchar *first_arg_name, ...);
......
......@@ -31,8 +31,6 @@ int main(int argc,char *argv[])
exit(-1);
}
/* create a new bin to hold the elements */
pipeline = gst_pipeline_new("pipeline");
g_assert(pipeline != NULL);
......@@ -59,6 +57,7 @@ int main(int argc,char *argv[])
gtk_widget_show_all(appwindow);
/* add objects to the main pipeline */
/*
gst_pipeline_add_src(GST_PIPELINE(pipeline), disksrc);
gst_pipeline_add_sink(GST_PIPELINE(pipeline), videosink);
gst_pipeline_add_sink(GST_PIPELINE(pipeline), audiosink);
......@@ -67,6 +66,7 @@ int main(int argc,char *argv[])
g_print("unable to handle stream\n");
exit(-1);
}
*/
xmlSaveFile("xmlTest.gst", gst_xml_write(GST_ELEMENT(pipeline)));
......
......@@ -41,6 +41,7 @@ int main(int argc,char *argv[])
g_assert(audiosink != NULL);
/* add objects to the main pipeline */
/*
gst_pipeline_add_src(GST_PIPELINE(pipeline), disksrc);
gst_pipeline_add_sink(GST_PIPELINE(pipeline), audiosink);
......@@ -48,6 +49,7 @@ int main(int argc,char *argv[])
g_print("unable to handle stream\n");
exit(-1);
}
*/
// hmmmm hack? FIXME
GST_FLAG_UNSET (pipeline, GST_BIN_FLAG_MANAGER);
......
......@@ -46,11 +46,12 @@ int main(int argc,char *argv[])
g_assert(audiosink != NULL);
/* add objects to the main pipeline */
/*
gst_pipeline_add_src(GST_PIPELINE(pipeline), disksrc);
gst_pipeline_add_sink(GST_PIPELINE(pipeline), queue);
gst_bin_add(GST_BIN(thread), audiosink);
gst_pad_connect(gst_element_get_pad(queue,"src"),
gst_element_get_pad(audiosink,"sink"));
......@@ -58,6 +59,7 @@ int main(int argc,char *argv[])
g_print("cannot autoplug pipeline\n");
exit(-1);
}
*/
gst_bin_add(GST_BIN(pipeline), thread);
......
......@@ -45,6 +45,7 @@ int main(int argc,char *argv[])
g_assert(audiosink != NULL);
/* add objects to the main pipeline */
/*
gst_pipeline_add_src(GST_PIPELINE(pipeline), disksrc);
gst_pipeline_add_sink(GST_PIPELINE(pipeline), audiosink);
......@@ -52,6 +53,7 @@ int main(int argc,char *argv[])
g_print("unable to handle stream\n");
exit(-1);
}
*/
//gst_bin_remove(GST_BIN(pipeline), disksrc);
......