diff --git a/ChangeLog b/ChangeLog index 13284946c4..e5920b26b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2005-11-26 Julien MOUTTE + + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-base-plugins-docs.sgml: + * docs/plugins/gst-plugins-base-plugins-sections.txt: + * docs/plugins/inspect/plugin-adder.xml: + * docs/plugins/inspect/plugin-alsa.xml: + * docs/plugins/inspect/plugin-audioconvert.xml: + * docs/plugins/inspect/plugin-audiorate.xml: + * docs/plugins/inspect/plugin-audioresample.xml: + * docs/plugins/inspect/plugin-audiotestsrc.xml: + * docs/plugins/inspect/plugin-decodebin.xml: + * docs/plugins/inspect/plugin-ffmpegcolorspace.xml: + * docs/plugins/inspect/plugin-gnomevfs.xml: + * docs/plugins/inspect/plugin-ogg.xml: + * docs/plugins/inspect/plugin-playbin.xml: + * docs/plugins/inspect/plugin-subparse.xml: + * docs/plugins/inspect/plugin-tcp.xml: + * docs/plugins/inspect/plugin-theora.xml: + * docs/plugins/inspect/plugin-typefindfunctions.xml: + * docs/plugins/inspect/plugin-video4linux.xml: + * docs/plugins/inspect/plugin-videorate.xml: + * docs/plugins/inspect/plugin-videoscale.xml: + * docs/plugins/inspect/plugin-videotestsrc.xml: + * docs/plugins/inspect/plugin-volume.xml: + * docs/plugins/inspect/plugin-vorbis.xml: + * docs/plugins/inspect/plugin-ximagesink.xml: + * docs/plugins/inspect/plugin-xvimagesink.xml: Updated version. + * sys/ximage/ximagesink.c: Adding documentation for ximagesink. + 2005-11-26 Edward Hervey * gst/audiorate/gstaudiorate.c: (gst_audiorate_chain): diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index ed33f56009..30cf67545a 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -84,7 +84,8 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/tcp/gstmultifdsink.h \ $(top_srcdir)/gst/tcp/gsttcpserversink.h \ $(top_srcdir)/gst/videotestsrc/gstvideotestsrc.h \ - $(top_srcdir)/gst/volume/gstvolume.h + $(top_srcdir)/gst/volume/gstvolume.h \ + $(top_srcdir)/sys/ximage/ximagesink.h # Images to copy into HTML directory. HTML_IMAGES = diff --git a/docs/plugins/gst-plugins-base-plugins-docs.sgml b/docs/plugins/gst-plugins-base-plugins-docs.sgml index 3ca0955f7b..402feeedfb 100644 --- a/docs/plugins/gst-plugins-base-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-base-plugins-docs.sgml @@ -24,6 +24,7 @@ + diff --git a/docs/plugins/gst-plugins-base-plugins-sections.txt b/docs/plugins/gst-plugins-base-plugins-sections.txt index a94ed38499..1e90049241 100644 --- a/docs/plugins/gst-plugins-base-plugins-sections.txt +++ b/docs/plugins/gst-plugins-base-plugins-sections.txt @@ -87,6 +87,13 @@ GstVorbisEnc GstVorbisEncClass +
+element-ximagesink +ximagesink +GstXImageSink + +GstXImagesSinkClass +
private diff --git a/docs/plugins/inspect/plugin-adder.xml b/docs/plugins/inspect/plugin-adder.xml index a4d9ad106e..2a9a3f2bf3 100644 --- a/docs/plugins/inspect/plugin-adder.xml +++ b/docs/plugins/inspect/plugin-adder.xml @@ -3,10 +3,10 @@ Adds multiple streams ../../gst/adder/.libs/libgstadder.so libgstadder.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-alsa.xml b/docs/plugins/inspect/plugin-alsa.xml index 1514496db2..f94029609d 100644 --- a/docs/plugins/inspect/plugin-alsa.xml +++ b/docs/plugins/inspect/plugin-alsa.xml @@ -3,10 +3,10 @@ ALSA plugin library ../../ext/alsa/.libs/libgstalsa.so libgstalsa.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-audioconvert.xml b/docs/plugins/inspect/plugin-audioconvert.xml index 762581660f..83b47e0f19 100644 --- a/docs/plugins/inspect/plugin-audioconvert.xml +++ b/docs/plugins/inspect/plugin-audioconvert.xml @@ -3,10 +3,10 @@ Convert audio to different formats ../../gst/audioconvert/.libs/libgstaudioconvert.so libgstaudioconvert.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-audiorate.xml b/docs/plugins/inspect/plugin-audiorate.xml index 352e869dfa..d4a3879765 100644 --- a/docs/plugins/inspect/plugin-audiorate.xml +++ b/docs/plugins/inspect/plugin-audiorate.xml @@ -3,10 +3,10 @@ Adjusts audio frames ../../gst/audiorate/.libs/libgstaudiorate.so libgstaudiorate.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-audioresample.xml b/docs/plugins/inspect/plugin-audioresample.xml index f1a2f46bd3..76633918e0 100644 --- a/docs/plugins/inspect/plugin-audioresample.xml +++ b/docs/plugins/inspect/plugin-audioresample.xml @@ -3,10 +3,10 @@ Resamples audio ../../gst/audioresample/.libs/libgstaudioresample.so libgstaudioresample.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-audiotestsrc.xml b/docs/plugins/inspect/plugin-audiotestsrc.xml index c9ef2f65d1..330266df23 100644 --- a/docs/plugins/inspect/plugin-audiotestsrc.xml +++ b/docs/plugins/inspect/plugin-audiotestsrc.xml @@ -3,10 +3,10 @@ Creates audio test signals of given frequency and volume ../../gst/audiotestsrc/.libs/libgstaudiotestsrc.so libgstaudiotestsrc.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-decodebin.xml b/docs/plugins/inspect/plugin-decodebin.xml index b0a9500f83..c3a4a80a3a 100644 --- a/docs/plugins/inspect/plugin-decodebin.xml +++ b/docs/plugins/inspect/plugin-decodebin.xml @@ -3,10 +3,10 @@ decoder bin ../../gst/playback/.libs/libgstdecodebin.so libgstdecodebin.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-ffmpegcolorspace.xml b/docs/plugins/inspect/plugin-ffmpegcolorspace.xml index d84cae7cb4..fc1f99f5e9 100644 --- a/docs/plugins/inspect/plugin-ffmpegcolorspace.xml +++ b/docs/plugins/inspect/plugin-ffmpegcolorspace.xml @@ -3,7 +3,7 @@ colorspace conversion copied from FFMpeg 0.4.9-pre1 ../../gst/ffmpegcolorspace/.libs/libgstffmpegcolorspace.so libgstffmpegcolorspace.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base FFMpeg diff --git a/docs/plugins/inspect/plugin-gnomevfs.xml b/docs/plugins/inspect/plugin-gnomevfs.xml index b20bd1f78c..e0a608ad83 100644 --- a/docs/plugins/inspect/plugin-gnomevfs.xml +++ b/docs/plugins/inspect/plugin-gnomevfs.xml @@ -3,10 +3,10 @@ elements to read from and write to Gnome-VFS uri's ../../ext/gnomevfs/.libs/libgstgnomevfs.so libgstgnomevfs.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-ogg.xml b/docs/plugins/inspect/plugin-ogg.xml index 091a3bdeab..0c51d57e35 100644 --- a/docs/plugins/inspect/plugin-ogg.xml +++ b/docs/plugins/inspect/plugin-ogg.xml @@ -3,10 +3,10 @@ ogg stream manipulation (info about ogg: http://xiph.org) ../../ext/ogg/.libs/libgstogg.so libgstogg.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-playbin.xml b/docs/plugins/inspect/plugin-playbin.xml index e898100c64..aed3e8beb5 100644 --- a/docs/plugins/inspect/plugin-playbin.xml +++ b/docs/plugins/inspect/plugin-playbin.xml @@ -3,10 +3,10 @@ player bin ../../gst/playback/.libs/libgstplaybin.so libgstplaybin.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-subparse.xml b/docs/plugins/inspect/plugin-subparse.xml index 18f959344c..e9667bd291 100644 --- a/docs/plugins/inspect/plugin-subparse.xml +++ b/docs/plugins/inspect/plugin-subparse.xml @@ -3,10 +3,10 @@ Subtitle (.sub) file parsing ../../gst/subparse/.libs/libgstsubparse.so libgstsubparse.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-tcp.xml b/docs/plugins/inspect/plugin-tcp.xml index 1d8cf93f21..7cea840be7 100644 --- a/docs/plugins/inspect/plugin-tcp.xml +++ b/docs/plugins/inspect/plugin-tcp.xml @@ -3,10 +3,10 @@ transfer data over the network via TCP ../../gst/tcp/.libs/libgsttcp.so libgsttcp.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-theora.xml b/docs/plugins/inspect/plugin-theora.xml index a9b3c4aafb..2218357068 100644 --- a/docs/plugins/inspect/plugin-theora.xml +++ b/docs/plugins/inspect/plugin-theora.xml @@ -3,10 +3,10 @@ Theora plugin library ../../ext/theora/.libs/libgsttheora.so libgsttheora.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-typefindfunctions.xml b/docs/plugins/inspect/plugin-typefindfunctions.xml index 4936ac9bf3..01a27c6bcd 100644 --- a/docs/plugins/inspect/plugin-typefindfunctions.xml +++ b/docs/plugins/inspect/plugin-typefindfunctions.xml @@ -3,10 +3,10 @@ default typefind functions ../../gst/typefind/.libs/libgsttypefindfunctions.so libgsttypefindfunctions.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-video4linux.xml b/docs/plugins/inspect/plugin-video4linux.xml index 44b6091f6b..7437385cae 100644 --- a/docs/plugins/inspect/plugin-video4linux.xml +++ b/docs/plugins/inspect/plugin-video4linux.xml @@ -3,10 +3,10 @@ elements for Video 4 Linux ../../sys/v4l/.libs/libgstvideo4linux.so libgstvideo4linux.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-videorate.xml b/docs/plugins/inspect/plugin-videorate.xml index aec57a160a..f0aea59477 100644 --- a/docs/plugins/inspect/plugin-videorate.xml +++ b/docs/plugins/inspect/plugin-videorate.xml @@ -3,10 +3,10 @@ Adjusts video frames ../../gst/videorate/.libs/libgstvideorate.so libgstvideorate.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-videoscale.xml b/docs/plugins/inspect/plugin-videoscale.xml index 22e9852aed..74571c0b6b 100644 --- a/docs/plugins/inspect/plugin-videoscale.xml +++ b/docs/plugins/inspect/plugin-videoscale.xml @@ -3,10 +3,10 @@ Resizes video ../../gst/videoscale/.libs/libgstvideoscale.so libgstvideoscale.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-videotestsrc.xml b/docs/plugins/inspect/plugin-videotestsrc.xml index 415c8ae27f..d8f6e6e769 100644 --- a/docs/plugins/inspect/plugin-videotestsrc.xml +++ b/docs/plugins/inspect/plugin-videotestsrc.xml @@ -3,10 +3,10 @@ Creates a test video stream ../../gst/videotestsrc/.libs/libgstvideotestsrc.so libgstvideotestsrc.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-volume.xml b/docs/plugins/inspect/plugin-volume.xml index d628d1b166..95f79f3a5c 100644 --- a/docs/plugins/inspect/plugin-volume.xml +++ b/docs/plugins/inspect/plugin-volume.xml @@ -3,10 +3,10 @@ element for controlling audio volume ../../gst/volume/.libs/libgstvolume.so libgstvolume.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-vorbis.xml b/docs/plugins/inspect/plugin-vorbis.xml index 1f2debe376..de3eaa8453 100644 --- a/docs/plugins/inspect/plugin-vorbis.xml +++ b/docs/plugins/inspect/plugin-vorbis.xml @@ -3,10 +3,10 @@ Vorbis plugin library ../../ext/vorbis/.libs/libgstvorbis.so libgstvorbis.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-ximagesink.xml b/docs/plugins/inspect/plugin-ximagesink.xml index 512e34d0e3..5f5853f837 100644 --- a/docs/plugins/inspect/plugin-ximagesink.xml +++ b/docs/plugins/inspect/plugin-ximagesink.xml @@ -3,10 +3,10 @@ X11 video output element based on standard Xlib calls ../../sys/ximage/.libs/libgstximagesink.so libgstximagesink.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/docs/plugins/inspect/plugin-xvimagesink.xml b/docs/plugins/inspect/plugin-xvimagesink.xml index d382fc846b..977cc1190b 100644 --- a/docs/plugins/inspect/plugin-xvimagesink.xml +++ b/docs/plugins/inspect/plugin-xvimagesink.xml @@ -3,10 +3,10 @@ XFree86 video output plugin using Xv extension ../../sys/xvimage/.libs/libgstxvimagesink.so libgstxvimagesink.so - 0.9.6 + 0.9.6.1 LGPL gst-plugins-base - GStreamer Base Plug-ins source release + GStreamer Base Plug-ins CVS/prerelease Unknown package origin diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index d468f4a1ec..4322345ff8 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -17,6 +17,96 @@ * Boston, MA 02111-1307, USA. */ +/** + * SECTION:element-ximagesink + * + * + * + * XImageSink renders video frames to a drawable (XWindow) on a local or remote + * display. This element can receive a Window ID from the application through + * the XOverlay interface and will then render video frames in this drawable. + * If no Window ID was provided by the application, the element will create its + * own internal window and render into it. + * + * Scaling + * + * As standard XImage rendering to a drawable is not scaled, XImageSink will use + * reverse caps negotiation to try to get scaled video frames for the drawable. + * This is accomplished by asking the peer pad if it accepts some different caps + * which in most cases implies that there is a scaling element in the pipeline, + * or that an element generating the video frames can generate them with a + * different geometry. This mechanism is handled during buffer allocations, for + * each allocation request the video sink will check the drawable geometry, look + * at the + * force-aspect-ratio + * property, calculate the geometry of desired video frames and then check that + * the peer pad accept those new caps. If it does it will then allocate a buffer + * in video memory with this new geometry and return it with the new caps. + * + * Events + * + * XImageSink creates a thread to handle events coming from the drawable. There + * are several kind of events that can be grouped in 2 big categories: input + * events and window state related events. Input events will be translated to + * navigation events and pushed upstream for other elements to react on them. + * This includes events such as pointer moves, key press/release, clicks etc... + * Other events are used to handle the drawable appearance even when the data + * is not flowing (GST_STATE_PAUSED). That means that even when the element is + * paused, it will receive expose events from the drawable and draw the latest + * frame with correct borders/aspect-ratio. + * + * Pixel aspect ratio + * + * When changing state to GST_STATE_READY, XImageSink will open a connection to + * the display specified in the + * display property or the default + * display if nothing specified. Once this connection is open it will inspect + * the display configuration including the physical display geometry and + * then calculate the pixel aspect ratio. When caps negotiation will occur, the + * video sink will set the calculated pixel aspect ratio on the caps to make + * sure that incoming video frames will have the correct pixel aspect ratio for + * this display. Sometimes the calculated pixel aspect ratio can be wrong, it is + * then possible to enforce a specific pixel aspect ratio using the + * pixel-aspect-ratio + * property. + * + * Examples + * + * Here is a simple pipeline to test reverse negotiation : + * + * gst-launch -v videotestsrc ! queue ! ximagesink + * + * When the test video signal appears you can resize the window and see that + * scaled buffers of the desired size are going to arrive with a short delay. + * This illustrates how buffers of desired size are allocated along the way. + * If you take away the queue, scaling will happen almost immediately. + * + * + * Here is a simple pipeline to test navigation events : + * + * gst-launch -v videotestsrc ! navigationtest ! ffmpegcolorspace ! ximagesink + * + * While moving the mouse pointer over the test signal you will see a black box + * following the mouse pointer. If you press the mouse button somewhere on the + * video and release it somewhere else a green box will appear where you pressed + * the button and a red one where you released it. (The navigationtest element + * is part of gst-plugins-good.) + * + * + * Here is a simple pipeline to test pixel aspect ratio : + * + * gst-launch -v videotestsrc ! video/x-raw-rgb, pixel-aspect-ratio=(fraction)4/3 ! videoscale ! ximagesink + * + * This is faking a 4/3 pixel aspect ratio caps on video frames produced by + * videotestsrc, in most cases the pixel aspect ratio of the display will be + * 1/1. This means that videoscale will have to do the scaling to convert + * incoming frames to a size that will match the display pixel aspect ratio + * (from 320x240 to 320x180 in this case). Note that you might have to escape + * some characters for your shell like '\(fraction\)'. + * + * + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif