From 9f8ab3ed2f0e4ac4394060209e4c715d7487627b Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sun, 8 Sep 2002 21:17:16 +0000 Subject: [PATCH] whitespace fixes Original commit message from CVS: whitespace fixes --- docs/manual/advanced-autoplugging.xml | 23 ++++++------- docs/manual/advanced-dparams.xml | 10 +++--- docs/manual/advanced-schedulers.xml | 14 ++++---- docs/manual/advanced-threads.xml | 24 +++++++------- docs/manual/appendix-programs.xml | 17 +++++----- docs/manual/autoplugging.xml | 53 ++++++++++++++++-------------- docs/manual/basics-bins.xml | 40 +++++++++++----------- docs/manual/basics-data.xml | 15 +++++---- docs/manual/basics-elements.xml | 6 ++-- docs/manual/basics-helloworld.xml | 32 +++++++++--------- docs/manual/basics-pads.xml | 62 +++++++++++++++++++---------------- docs/manual/bins.xml | 40 +++++++++++----------- docs/manual/buffers.xml | 15 +++++---- docs/manual/connections.xml | 21 ++++++------ docs/manual/cothreads.xml | 28 +++++++++------- docs/manual/dparams-app.xml | 10 +++--- docs/manual/dynamic.xml | 12 +++---- docs/manual/elements.xml | 6 ++-- docs/manual/factories.xml | 23 ++++++------- docs/manual/gstreamer-manual.xml | 4 +-- docs/manual/helloworld.xml | 32 +++++++++--------- docs/manual/highlevel-xml.xml | 17 +++++----- docs/manual/pads.xml | 62 +++++++++++++++++++---------------- docs/manual/programs.xml | 17 +++++----- docs/manual/queues.xml | 4 +-- docs/manual/schedulers.xml | 14 ++++---- docs/manual/states.xml | 23 ++++++------- docs/manual/threads.xml | 24 +++++++------- docs/manual/typedetection.xml | 20 +++++------ docs/manual/xml.xml | 17 +++++----- 30 files changed, 366 insertions(+), 319 deletions(-) diff --git a/docs/manual/advanced-autoplugging.xml b/docs/manual/advanced-autoplugging.xml index e27b032..f5112c1 100644 --- a/docs/manual/advanced-autoplugging.xml +++ b/docs/manual/advanced-autoplugging.xml @@ -27,12 +27,12 @@ While this mechanism is quite effective it also has some big problems: - The elements are created based on their name. Indeed, we create an - element mad by explicitly stating the mad element's name. - Our little program therefore always uses the mad decoder element - to decode the MP3 audio stream, even if there are 3 other MP3 decoders - in the system. We will see how we can use a more general way to create - an MP3 decoder element. + The elements are created based on their name. Indeed, we create an + element mad by explicitly stating the mad element's name. Our little + program therefore always uses the mad decoder element to decode + the MP3 audio stream, even if there are 3 other MP3 decoders in the + system. We will see how we can use a more general way to create an + MP3 decoder element. We have to introduce the concept of MIME types and capabilities @@ -124,8 +124,8 @@ the given MIME type. - There is also an association between a MIME type and a file extension, but the use of typefind - functions (similar to file(1)) is preferred.. + There is also an association between a MIME type and a file extension, + but the use of typefind functions (similar to file(1)) is preferred.. The type information is maintained in a list of @@ -147,9 +147,10 @@ struct _GstType { }; - All operations on GstType occur via their - guint16 id numbers, with GstType - structure private to the GStreamer library. + All operations on GstType occur + via their guint16 id numbers, with + GstType structure private to the GStreamer + library. diff --git a/docs/manual/advanced-dparams.xml b/docs/manual/advanced-dparams.xml index 91d348e..2140ce0 100644 --- a/docs/manual/advanced-dparams.xml +++ b/docs/manual/advanced-dparams.xml @@ -4,8 +4,9 @@ Getting Started - The dparams subsystem is contained within the gstcontrol library. - + The dparams subsystem is contained within the + gstcontrol library. + You need to include the header in your applications's source file: @@ -18,8 +19,9 @@ Your application should link to the shared library gstcontrol. - The gstcontrol library needs to be initialised when your application is run. - This can be done after the the GStreamer library has been initialised. + The gstcontrol library needs to be initialised + when your application is run. This can be done after the the GStreamer + library has been initialised. ... diff --git a/docs/manual/advanced-schedulers.xml b/docs/manual/advanced-schedulers.xml index 87adf3a..8323aab 100644 --- a/docs/manual/advanced-schedulers.xml +++ b/docs/manual/advanced-schedulers.xml @@ -28,15 +28,15 @@ - The scheduler is a plugable component, this means that alternative schedulers - can be written and plugged into GStreamer. The default scheduler uses cothreads - to schedule the plugins in a pipeline. Cothreads are fast and lightweight - user-space threads. + The scheduler is a plugable component, this means that alternative + schedulers can be written and plugged into GStreamer. The default scheduler + uses cothreads to schedule the plugins in a pipeline. Cothreads are fast + and lightweight user-space threads. - There is usually no need to interact with the scheduler directly, however it some - cases it is feasable to set a specific clock or force a specific plugin as the - entry point in the pipeline. + There is usually no need to interact with the scheduler directly, however + it some cases it is feasable to set a specific clock or force a specific + plugin as the entry point in the pipeline. diff --git a/docs/manual/advanced-threads.xml b/docs/manual/advanced-threads.xml index 40fe7ee..2f0ebaa 100644 --- a/docs/manual/advanced-threads.xml +++ b/docs/manual/advanced-threads.xml @@ -31,22 +31,24 @@ - The above program will create a thread with two elements in it. As soon as it is set to the - PLAYING state, the thread will start to iterate itself. You never need to manually iterate a - thread. + The above program will create a thread with two elements in it. As soon + as it is set to the PLAYING state, the thread will start to iterate + itself. You never need to manually iterate a thread. Constraints placed on the pipeline by the GstThread - Within the pipeline, everything is the same as in any other bin. The difference lies at the - thread boundary, at the connection between the thread and the outside world (containing bin). - Since GStreamer is fundamentally buffer-oriented rather than byte-oriented, the natural - solution to this problem is an element that can "buffer" the buffers between the threads, in a - thread-safe fashion. This element is the queue, described more fully in . It doesn't matter if the queue is placed in the containing bin or in - the thread itself, but it needs to be present on one side of the other to enable inter-thread - communication. + Within the pipeline, everything is the same as in any other bin. The + difference lies at the thread boundary, at the connection between the + thread and the outside world (containing bin). Since GStreamer is + fundamentally buffer-oriented rather than byte-oriented, the natural + solution to this problem is an element that can "buffer" the buffers + between the threads, in a thread-safe fashion. This element is the + queue, described more fully in . It doesn't + matter if the queue is placed in the containing bin or in the thread + itself, but it needs to be present on one side of the other to enable + inter-thread communication. diff --git a/docs/manual/appendix-programs.xml b/docs/manual/appendix-programs.xml index 87becba..b7a692f 100644 --- a/docs/manual/appendix-programs.xml +++ b/docs/manual/appendix-programs.xml @@ -35,10 +35,11 @@ gst-launch filesrc location=redpill.vob ! mpegdemux name=demux \ - You can also use the the parser in you own code. GStreamer - provides a function gst_parse_launch () that you can use to construt a pipeline. - The following programs lets you create an mp3 pipeline using the gst_parse_launch () - function: + You can also use the the parser in you own + code. GStreamer provides a function + gst_parse_launch () that you can use to construt a pipeline. + The following programs lets you create an mp3 pipeline using the + gst_parse_launch () function: #include <gst/gst.h> @@ -92,10 +93,10 @@ main (int argc, char *argv[]) ... mad ... - A bare identifier (a string beginning with a letter and containing only letters, - numbers, dashes, underscores, percent signs, or colons) will create an element from a - given elementfactory. In this example, an instance of the "mad" mp3 decoding plugin will - be created. + A bare identifier (a string beginning with a letter and containing + only letters, numbers, dashes, underscores, percent signs, or colons) + will create an element from a given elementfactory. In this example, + an instance of the "mad" mp3 decoding plugin will be created. diff --git a/docs/manual/autoplugging.xml b/docs/manual/autoplugging.xml index b771191..8eba750 100644 --- a/docs/manual/autoplugging.xml +++ b/docs/manual/autoplugging.xml @@ -9,12 +9,13 @@ elements needed for the conversion. - The autoplugger API is implemented in an abstract class. Autoplugger implementations - reside in plugins and are therefore optional and can be optimized for a specific - task. Two types of autopluggers exist: renderer ones and non - renderer ones. the renderer autopluggers will not have any src pads while the - non renderer ones do. The renderer autopluggers are mainly used for media - playback while the non renderer ones are used for arbitrary format conversion. + The autoplugger API is implemented in an abstract class. Autoplugger + implementations reside in plugins and are therefore optional and can be + optimized for a specific task. Two types of autopluggers exist: renderer + ones and non renderer ones. the renderer autopluggers will not have any + src pads while the non renderer ones do. The renderer autopluggers are + mainly used for media playback while the non renderer ones are used for + arbitrary format conversion. @@ -27,9 +28,10 @@ A list of all available autopluggers can be obtained with gst_autoplug_factory_get_list(). - If the autoplugger supports the RENDERER API, use gst_autoplug_to_renderers() call to - create a bin that connects the src caps to the specified render elements. You can - then add the bin to a pipeline and run it. + If the autoplugger supports the RENDERER API, use + gst_autoplug_to_renderers() call to create a bin that connects the + src caps to the specified render elements. You can then add the bin + to a pipeline and run it. @@ -58,9 +60,9 @@ - If the autoplugger supports the CAPS API, use the gst_autoplug_to_caps() function to - connect the src caps to the destination caps. The created bin will have src and sink - pads compatible with the provided caps. + If the autoplugger supports the CAPS API, use the gst_autoplug_to_caps() + function to connect the src caps to the destination caps. The created + bin will have src and sink pads compatible with the provided caps. @@ -105,14 +107,14 @@ - Add the autoplugcache element to a bin and connect the sink pad to the src - pad of an element with unknown caps. + Add the autoplugcache element to a bin and connect the sink pad + to the src pad of an element with unknown caps. - Connect the src pad of the autoplugcache to the sink pad of the typefind - element. + Connect the src pad of the autoplugcache to the sink pad of the + typefind element. @@ -122,8 +124,8 @@ - Remove the typefind element and add the plugins needed to play back the discovered - media type to the autoplugcache src pad. + Remove the typefind element and add the plugins needed to play + back the discovered media type to the autoplugcache src pad. @@ -148,9 +150,10 @@ Another approach to autoplugging - The autoplug API is interesting, but often impractical. It is static; it cannot deal with - dynamic pipelines (insert ref here). What one often wants is just an element to stick into a - pipeline that will DWIM (ref). Enter the spider. + The autoplug API is interesting, but often impractical. It is static; + it cannot deal with dynamic pipelines (insert ref here). What one + often wants is just an element to stick into a pipeline that will DWIM + (ref). Enter the spider. The spider element @@ -176,9 +179,11 @@ - Has request pads on the src side. This means that it can autoplug one source stream - into many sink streams. For example, a MPEG1 system stream can have audio as well as - video; that pipeline would be represented in gst-launch syntax as + Has request pads on the src side. This means that it can autoplug + one source stream into many sink streams. For example, a MPEG1 + system stream can have audio as well as video; that pipeline + would be represented in gst-launch syntax as + $ gst-launch filesrc location=my.mpeg1 ! spider ! { queue ! osssink } spider.src_%d! { queue ! xvideosink } diff --git a/docs/manual/basics-bins.xml b/docs/manual/basics-bins.xml index b6a650f..51da78a 100644 --- a/docs/manual/basics-bins.xml +++ b/docs/manual/basics-bins.xml @@ -49,7 +49,8 @@ Creating a bin - Bins register themselves in the GStreamer registry, so they can be created in the normal way: + Bins register themselves in the GStreamer registry, so they can be + created in the normal way: GstElement *bin, *thread, *pipeline; @@ -97,9 +98,9 @@ ... - You can see that the name of the element becomes very handy for retrieving the - element from an bin by using the element's name. gst_bin_get_by_name () will - recursively search nested bins. + You can see that the name of the element becomes very handy + for retrieving the element from an bin by using the element's + name. gst_bin_get_by_name () will recursively search nested bins. To get a list of elements in a bin, use: @@ -128,8 +129,8 @@ ... - To add many elements to a bin at the same time, try the gst_bin_add_many () API. Remember to - pass NULL as the last argument. + To add many elements to a bin at the same time, try the gst_bin_add_many + () API. Remember to pass NULL as the last argument. GstElement *filesrc, *decoder, *audiosink; @@ -144,9 +145,9 @@ Custom bins - The application programmer can create custom bins packed with elements to perform a - specific task. This allow you to write an MPEG audio decoder with just the follwing lines - of code: + The application programmer can create custom bins packed with elements + to perform a specific task. This allow you to write an MPEG audio + decoder with just the follwing lines of code: @@ -164,13 +165,14 @@ gst_element_set_state (GST_ELEMENT (mp3player), GST_STATE_NULL); - Note that the above code assumes that the mp3player bin derives itself from a - GstThread, which begins to play as soon as its state is set to PLAYING. - Other bin types may need explicit iteration. For more information, see . - - Custom bins can be created with a plugin or an XML description. You will find more - information about creating custom bin in the Plugin Writers Guide (FIXME ref). + Note that the above code assumes that the mp3player bin derives itself + from a GstThread, which begins to play as soon + as its state is set to PLAYING. Other bin types may need explicit + iteration. For more information, see . + + Custom bins can be created with a plugin or an XML description. You + will find more information about creating custom bin in the Plugin + Writers Guide (FIXME ref). @@ -224,9 +226,9 @@ - In the above example, the bin now also has a pad: the pad called 'sink' of the - given element. We can now, for example, connect the srcpad of a filesrc to the - bin with: + In the above example, the bin now also has a pad: the pad called 'sink' + of the given element. We can now, for example, connect the srcpad of + a filesrc to the bin with: GstElement *filesrc; diff --git a/docs/manual/basics-data.xml b/docs/manual/basics-data.xml index 043a8fa..b908b4e 100644 --- a/docs/manual/basics-data.xml +++ b/docs/manual/basics-data.xml @@ -1,11 +1,11 @@ Buffers - Buffers contain the data that will flow through the pipeline you have created. A source - element will typically create a new buffer and pass it through the pad to the next - element in the chain. - When using the GStreamer infrastructure to create a media pipeline you will not have - to deal with buffers yourself; the elements will do that for you. + Buffers contain the data that will flow through the pipeline you have + created. A source element will typically create a new buffer and pass + it through the pad to the next element in the chain. When using the + GStreamer infrastructure to create a media pipeline you will not have + to deal with buffers yourself; the elements will do that for you. The most important information in the buffer is: @@ -23,8 +23,9 @@ - A refcount that indicates how many elements are using this buffer. This refcount - will be used to destroy the buffer when no element is having a reference to it. + A refcount that indicates how many elements are using this + buffer. This refcount will be used to destroy the buffer when no + element is having a reference to it. diff --git a/docs/manual/basics-elements.xml b/docs/manual/basics-elements.xml index 2b2d8b8..9b6994f 100644 --- a/docs/manual/basics-elements.xml +++ b/docs/manual/basics-elements.xml @@ -39,9 +39,9 @@ - Source elements do not accept data, they only generate data. You can see - this in the figure because it only has a src pad. A src pad can only - generate data. + Source elements do not accept data, they only generate data. You can + see this in the figure because it only has a src pad. A src pad can + only generate data. diff --git a/docs/manual/basics-helloworld.xml b/docs/manual/basics-helloworld.xml index 7f7ba23..293937a 100644 --- a/docs/manual/basics-helloworld.xml +++ b/docs/manual/basics-helloworld.xml @@ -1,17 +1,18 @@ Your first application - This chapter describes the most rudimentary aspects of a GStreamer application, - including initializing the libraries, creating elements, packing them into - a pipeline and playing, pause and stop the pipeline. + This chapter describes the most rudimentary aspects of a + GStreamer application, including initializing + the libraries, creating elements, packing them into a pipeline and playing, + pause and stop the pipeline. Hello world - We will create a simple first application, a complete MP3 player, using standard - GStreamer components. The player will read from a file that is - given as the first argument of the program. + We will create a simple first application, a complete MP3 player, using + standard GStreamer components. The player + will read from a file that is given as the first argument of the program. @@ -90,8 +91,9 @@ main (int argc, char *argv[]) - We are going to create 3 elements and one pipeline. Since all elements share the same base - type, GstElement, we can define them as: + We are going to create 3 elements and one pipeline. Since all elements + share the same base type, GstElement, we can + define them as: ... @@ -100,9 +102,9 @@ main (int argc, char *argv[]) - Next, we are going to create an empty pipeline. As you have seen in the basic - introduction, this pipeline will hold and manage all the elements we are - going to stuff into it. + Next, we are going to create an empty pipeline. As you have seen in + the basic introduction, this pipeline will hold and manage all the + elements we are going to stuff into it. /* create a new pipeline to hold the elements */ @@ -208,9 +210,9 @@ main (int argc, char *argv[]) while (gst_bin_iterate (GST_BIN (pipeline))); - The gst_bin_iterate() function will return TRUE as long as something interesting - happended inside the pipeline. When the end-of-file has been reached the _iterate - function will return FALSE and we can end the loop. + The gst_bin_iterate() function will return TRUE as long as something + interesting happended inside the pipeline. When the end-of-file has been + reached the _iterate function will return FALSE and we can end the loop. /* stop the pipeline */ @@ -259,7 +261,7 @@ main (int argc, char *argv[]) you can create a custom MP3 element with a more high level API. - It should be clear from the example that we can very easily replace the + It should be clear from the example that we can very easily replace the filesrc element with an httpsrc, giving you instant network streaming. An element could be build to handle icecast connections, for example. diff --git a/docs/manual/basics-pads.xml b/docs/manual/basics-pads.xml index 5c5478d..8353326 100644 --- a/docs/manual/basics-pads.xml +++ b/docs/manual/basics-pads.xml @@ -24,8 +24,9 @@ This function will get the pad named "src" from the given element. - Alternatively, you can also request a GList of pads from the element. The following - code example will print the names of all the pads of an element. + Alternatively, you can also request a GList of pads from the element. The + following code example will print the names of all the pads of an + element. GList *pads; @@ -47,9 +48,9 @@ get_pad_set_name(). - gst_pad_get_direction (GstPad *pad) can be used to query if the pad is a sink - or a src pad. Remember a src pad is a pad that can output data and a sink pad is - one that accepts data. + gst_pad_get_direction (GstPad *pad) can be used to query if the pad + is a sink or a src pad. Remember a src pad is a pad that can output + data and a sink pad is one that accepts data. You can get the parent of the pad, this is the element that this pad belongs to, @@ -60,10 +61,10 @@ Dynamic pads - Some elements might not have their pads when they are created. This can, for - example, happen with an MPEG2 system demuxer. The demuxer will create its - pads at runtime when it detects the different elementary streams in the MPEG2 - system stream. + Some elements might not have their pads when they are created. This + can, for example, happen with an MPEG2 system demuxer. The demuxer will + create its pads at runtime when it detects the different elementary + streams in the MPEG2 system stream. Running gst-inspect mpegdemux will show that @@ -122,9 +123,9 @@ main(int argc, char *argv[]) Request pads - An element can also have request pads. These pads are not created automatically - but are only created on demand. This is very usefull for muxers, aggregators - and tee elements. + An element can also have request pads. These pads are not created + automatically but are only created on demand. This is very usefull + for muxers, aggregators and tee elements. The tee element, for example, has one input pad and a request padtemplate for the @@ -151,10 +152,10 @@ main(int argc, char *argv[]) It is also possible to request a pad that is compatible with another - padtemplate. This is very usefull if you want to connect an element to - a muxer element and you need to request a pad that is compatible. The - gst_element_get_compatible_pad is used to request a compatible pad, as - is shown in the next example. + padtemplate. This is very usefull if you want to connect an element to + a muxer element and you need to request a pad that is compatible. The + gst_element_get_compatible_pad is used to request a compatible pad, + as is shown in the next example. ... @@ -216,8 +217,9 @@ struct _GstCaps { three properties: layer, bitrate and framed. - The src pad (output pad) is called 'src' and outputs data of MIME type 'audio/raw'. It also has - four properties: format, depth, rate and channels. + The src pad (output pad) is called 'src' and outputs data of MIME + type 'audio/raw'. It also has four properties: format, depth, rate + and channels. Pads: @@ -245,9 +247,9 @@ Pads: What are properties - Properties are used to describe extra information for the capabilities. The properties - basically exist of a key (a string) and a value. There are different possibile value types - that can be used: + Properties are used to describe extra information for the + capabilities. The properties basically exist of a key (a string) and + a value. There are different possibile value types that can be used: @@ -258,8 +260,9 @@ Pads: - An integer range value. The property denotes a range of possible values. In the case - of the mad element: the src pad has a property rate that can go from 11025 to 48000. + An integer range value. The property denotes a range of possible + values. In the case of the mad element: the src pad has a property + rate that can go from 11025 to 48000. @@ -342,13 +345,16 @@ Pads: Creating capabilities structures - While the capabilities are mainly used inside the plugin to describe the media type of the - pads, the application programmer also has to have basic understanding of caps in order to - interface with the plugins, specially when using the autopluggers. + While the capabilities are mainly used inside the plugin to describe + the media type of the pads, the application programmer also has + to have basic understanding of caps in order to interface with the + plugins, specially when using the autopluggers. - As we said, a capability has a name, a mime-type and some properties. The signature of the - function to create a new GstCaps structure is like: + As we said, a capability has a name, a mime-type and some + properties. The signature of the function to create a new + GstCaps structure is like: + GstCaps* gst_caps_new (const gchar *name, const gchar *mime, GstProps *props); diff --git a/docs/manual/bins.xml b/docs/manual/bins.xml index b6a650f..51da78a 100644 --- a/docs/manual/bins.xml +++ b/docs/manual/bins.xml @@ -49,7 +49,8 @@ Creating a bin - Bins register themselves in the GStreamer registry, so they can be created in the normal way: + Bins register themselves in the GStreamer registry, so they can be + created in the normal way: GstElement *bin, *thread, *pipeline; @@ -97,9 +98,9 @@ ... - You can see that the name of the element becomes very handy for retrieving the - element from an bin by using the element's name. gst_bin_get_by_name () will - recursively search nested bins. + You can see that the name of the element becomes very handy + for retrieving the element from an bin by using the element's + name. gst_bin_get_by_name () will recursively search nested bins. To get a list of elements in a bin, use: @@ -128,8 +129,8 @@ ... - To add many elements to a bin at the same time, try the gst_bin_add_many () API. Remember to - pass NULL as the last argument. + To add many elements to a bin at the same time, try the gst_bin_add_many + () API. Remember to pass NULL as the last argument. GstElement *filesrc, *decoder, *audiosink; @@ -144,9 +145,9 @@ Custom bins - The application programmer can create custom bins packed with elements to perform a - specific task. This allow you to write an MPEG audio decoder with just the follwing lines - of code: + The application programmer can create custom bins packed with elements + to perform a specific task. This allow you to write an MPEG audio + decoder with just the follwing lines of code: @@ -164,13 +165,14 @@ gst_element_set_state (GST_ELEMENT (mp3player), GST_STATE_NULL); - Note that the above code assumes that the mp3player bin derives itself from a - GstThread, which begins to play as soon as its state is set to PLAYING. - Other bin types may need explicit iteration. For more information, see . - - Custom bins can be created with a plugin or an XML description. You will find more - information about creating custom bin in the Plugin Writers Guide (FIXME ref). + Note that the above code assumes that the mp3player bin derives itself + from a GstThread, which begins to play as soon + as its state is set to PLAYING. Other bin types may need explicit + iteration. For more information, see . + + Custom bins can be created with a plugin or an XML description. You + will find more information about creating custom bin in the Plugin + Writers Guide (FIXME ref). @@ -224,9 +226,9 @@ - In the above example, the bin now also has a pad: the pad called 'sink' of the - given element. We can now, for example, connect the srcpad of a filesrc to the - bin with: + In the above example, the bin now also has a pad: the pad called 'sink' + of the given element. We can now, for example, connect the srcpad of + a filesrc to the bin with: GstElement *filesrc; diff --git a/docs/manual/buffers.xml b/docs/manual/buffers.xml index 043a8fa..b908b4e 100644 --- a/docs/manual/buffers.xml +++ b/docs/manual/buffers.xml @@ -1,11 +1,11 @@ Buffers - Buffers contain the data that will flow through the pipeline you have created. A source - element will typically create a new buffer and pass it through the pad to the next - element in the chain. - When using the GStreamer infrastructure to create a media pipeline you will not have - to deal with buffers yourself; the elements will do that for you. + Buffers contain the data that will flow through the pipeline you have + created. A source element will typically create a new buffer and pass + it through the pad to the next element in the chain. When using the + GStreamer infrastructure to create a media pipeline you will not have + to deal with buffers yourself; the elements will do that for you. The most important information in the buffer is: @@ -23,8 +23,9 @@ - A refcount that indicates how many elements are using this buffer. This refcount - will be used to destroy the buffer when no element is having a reference to it. + A refcount that indicates how many elements are using this + buffer. This refcount will be used to destroy the buffer when no + element is having a reference to it. diff --git a/docs/manual/connections.xml b/docs/manual/connections.xml index 2504ca7..b7160c4 100644 --- a/docs/manual/connections.xml +++ b/docs/manual/connections.xml @@ -14,16 +14,17 @@ - By connecting these three elements, we have created a very simple pipeline. The effect - of this will be that the output of the source element (element1) will be used as input - for the filter element (element2). The filter element will do something with the data and - send the result to the final sink element (element3). + By connecting these three elements, we have created a very simple + pipeline. The effect of this will be that the output of the source element + (element1) will be used as input for the filter element (element2). The + filter element will do something with the data and send the result to + the final sink element (element3). - Imagine the above graph as a simple mpeg audio decoder. The source element is a - disk source, the filter element is the mpeg decoder and the sink element is your - audiocard. We will use this simple graph to construct an mpeg player later - in this manual. + Imagine the above graph as a simple mpeg audio decoder. The source + element is a disk source, the filter element is the mpeg decoder and + the sink element is your audiocard. We will use this simple graph to + construct an mpeg player later in this manual. @@ -87,8 +88,8 @@ You can query if a pad is connected with GST_PAD_IS_CONNECTED (pad). - To query for the GstPad this srcpad is connected to, use - gst_pad_get_peer (srcpad). + To query for the GstPad this srcpad is connected + to, use gst_pad_get_peer (srcpad). diff --git a/docs/manual/cothreads.xml b/docs/manual/cothreads.xml index f50f53a..f32373b 100644 --- a/docs/manual/cothreads.xml +++ b/docs/manual/cothreads.xml @@ -97,20 +97,24 @@ chain_function (GstPad *pad, GstBuffer *buffer) - When the request for a buffer cannot immediatly satisfied, the control will be given to the - source element of the loop-based element until it performs a push on its source pad. At that - time the control is handed back to the loop-based element, etc... The the execution trace can - get fairly complex using cothreads when there are multiple input/output pads for the - loop-based element. Cothread switches are performed within the call to gst_pad_pull and - gst_pad_push; from the perspective of the loop-based element, it just "appears" that - gst_pad_push (or _pull) might take a long time to return. + When the request for a buffer cannot immediatly satisfied, the control + will be given to the source element of the loop-based element until it + performs a push on its source pad. At that time the control is handed + back to the loop-based element, etc... The the execution trace can get + fairly complex using cothreads when there are multiple input/output + pads for the loop-based element. Cothread switches are performed within + the call to gst_pad_pull and gst_pad_push; from the perspective of + the loop-based element, it just "appears" that gst_pad_push (or _pull) + might take a long time to return. - Loop based elements are mainly used for the more complex elements that need a specific amount - of data before they can start to produce output. An example of such an element is the mpeg - video decoder. the element will pull a buffer, performs some decoding on it and optionally - requests more buffers to decode, when a complete video frame has been decoded, a buffer is - send out. For example, any plugin using the bytestream library will need to be loop-based. + Loop based elements are mainly used for the more complex elements + that need a specific amount of data before they can start to produce + output. An example of such an element is the mpeg video decoder. the + element will pull a buffer, performs some decoding on it and optionally + requests more buffers to decode, when a complete video frame has + been decoded, a buffer is send out. For example, any plugin using the + bytestream library will need to be loop-based. There is no problem in putting cothreaded elements into a GstThread to diff --git a/docs/manual/dparams-app.xml b/docs/manual/dparams-app.xml index 91d348e..2140ce0 100644 --- a/docs/manual/dparams-app.xml +++ b/docs/manual/dparams-app.xml @@ -4,8 +4,9 @@ Getting Started - The dparams subsystem is contained within the gstcontrol library. - + The dparams subsystem is contained within the + gstcontrol library. + You need to include the header in your applications's source file: @@ -18,8 +19,9 @@ Your application should link to the shared library gstcontrol. - The gstcontrol library needs to be initialised when your application is run. - This can be done after the the GStreamer library has been initialised. + The gstcontrol library needs to be initialised + when your application is run. This can be done after the the GStreamer + library has been initialised. ... diff --git a/docs/manual/dynamic.xml b/docs/manual/dynamic.xml index 5f58368..6b81be0 100644 --- a/docs/manual/dynamic.xml +++ b/docs/manual/dynamic.xml @@ -1,12 +1,12 @@ Dynamic pipelines - In this chapter we will see how you can create a dynamic pipeline. A dynamic - pipeline is a pipeline that is updated or created while media is flowing - through it. We will create a partial pipeline first and add more elements - while the pipeline is playing. Dynamic pipelines cause all sorts of - scheduling issues and will remain a topic of research for a long time in - GStreamer. + In this chapter we will see how you can create a dynamic pipeline. A + dynamic pipeline is a pipeline that is updated or created while media + is flowing through it. We will create a partial pipeline first and add + more elements while the pipeline is playing. Dynamic pipelines cause + all sorts of scheduling issues and will remain a topic of research for + a long time in GStreamer. We will show how to create an mpeg1 video player using dynamic pipelines. diff --git a/docs/manual/elements.xml b/docs/manual/elements.xml index 2b2d8b8..9b6994f 100644 --- a/docs/manual/elements.xml +++ b/docs/manual/elements.xml @@ -39,9 +39,9 @@ - Source elements do not accept data, they only generate data. You can see - this in the figure because it only has a src pad. A src pad can only - generate data. + Source elements do not accept data, they only generate data. You can + see this in the figure because it only has a src pad. A src pad can + only generate data. diff --git a/docs/manual/factories.xml b/docs/manual/factories.xml index e27b032..f5112c1 100644 --- a/docs/manual/factories.xml +++ b/docs/manual/factories.xml @@ -27,12 +27,12 @@ While this mechanism is quite effective it also has some big problems: - The elements are created based on their name. Indeed, we create an - element mad by explicitly stating the mad element's name. - Our little program therefore always uses the mad decoder element - to decode the MP3 audio stream, even if there are 3 other MP3 decoders - in the system. We will see how we can use a more general way to create - an MP3 decoder element. + The elements are created based on their name. Indeed, we create an + element mad by explicitly stating the mad element's name. Our little + program therefore always uses the mad decoder element to decode + the MP3 audio stream, even if there are 3 other MP3 decoders in the + system. We will see how we can use a more general way to create an + MP3 decoder element. We have to introduce the concept of MIME types and capabilities @@ -124,8 +124,8 @@ the given MIME type. - There is also an association between a MIME type and a file extension, but the use of typefind - functions (similar to file(1)) is preferred.. + There is also an association between a MIME type and a file extension, + but the use of typefind functions (similar to file(1)) is preferred.. The type information is maintained in a list of @@ -147,9 +147,10 @@ struct _GstType { }; - All operations on GstType occur via their - guint16 id numbers, with GstType - structure private to the GStreamer library. + All operations on GstType occur + via their guint16 id numbers, with + GstType structure private to the GStreamer + library. diff --git a/docs/manual/gstreamer-manual.xml b/docs/manual/gstreamer-manual.xml index 800236e..44346e7 100644 --- a/docs/manual/gstreamer-manual.xml +++ b/docs/manual/gstreamer-manual.xml @@ -231,8 +231,8 @@ - GStreamer comes prepackaged with a few programs. - and some usefull debugging options. + GStreamer comes prepackaged with a few + programs. and some usefull debugging options. diff --git a/docs/manual/helloworld.xml b/docs/manual/helloworld.xml index 7f7ba23..293937a 100644 --- a/docs/manual/helloworld.xml +++ b/docs/manual/helloworld.xml @@ -1,17 +1,18 @@ Your first application - This chapter describes the most rudimentary aspects of a GStreamer application, - including initializing the libraries, creating elements, packing them into - a pipeline and playing, pause and stop the pipeline. + This chapter describes the most rudimentary aspects of a + GStreamer application, including initializing + the libraries, creating elements, packing them into a pipeline and playing, + pause and stop the pipeline. Hello world - We will create a simple first application, a complete MP3 player, using standard - GStreamer components. The player will read from a file that is - given as the first argument of the program. + We will create a simple first application, a complete MP3 player, using + standard GStreamer components. The player + will read from a file that is given as the first argument of the program. @@ -90,8 +91,9 @@ main (int argc, char *argv[]) - We are going to create 3 elements and one pipeline. Since all elements share the same base - type, GstElement, we can define them as: + We are going to create 3 elements and one pipeline. Since all elements + share the same base type, GstElement, we can + define them as: ... @@ -100,9 +102,9 @@ main (int argc, char *argv[]) - Next, we are going to create an empty pipeline. As you have seen in the basic - introduction, this pipeline will hold and manage all the elements we are - going to stuff into it. + Next, we are going to create an empty pipeline. As you have seen in + the basic introduction, this pipeline will hold and manage all the + elements we are going to stuff into it. /* create a new pipeline to hold the elements */ @@ -208,9 +210,9 @@ main (int argc, char *argv[]) while (gst_bin_iterate (GST_BIN (pipeline))); - The gst_bin_iterate() function will return TRUE as long as something interesting - happended inside the pipeline. When the end-of-file has been reached the _iterate - function will return FALSE and we can end the loop. + The gst_bin_iterate() function will return TRUE as long as something + interesting happended inside the pipeline. When the end-of-file has been + reached the _iterate function will return FALSE and we can end the loop. /* stop the pipeline */ @@ -259,7 +261,7 @@ main (int argc, char *argv[]) you can create a custom MP3 element with a more high level API. - It should be clear from the example that we can very easily replace the + It should be clear from the example that we can very easily replace the filesrc element with an httpsrc, giving you instant network streaming. An element could be build to handle icecast connections, for example. diff --git a/docs/manual/highlevel-xml.xml b/docs/manual/highlevel-xml.xml index 633521a..460b53e 100644 --- a/docs/manual/highlevel-xml.xml +++ b/docs/manual/highlevel-xml.xml @@ -17,9 +17,10 @@ Turning GstElements into XML - We create a simple pipeline and write it to stdout with gst_xml_write_file (). The following - code constructs an mp3 player pipeline with two threads and then writes out the XML both to - stdout and to a file. Use this program with one argument: the mp3 file on disk. + We create a simple pipeline and write it to stdout with + gst_xml_write_file (). The following code constructs an mp3 player + pipeline with two threads and then writes out the XML both to stdout + and to a file. Use this program with one argument: the mp3 file on disk. @@ -167,8 +168,8 @@ main(int argc, char *argv[]) In addition to loading a file, you can also load a from a xmlDocPtr and an in memory buffer using gst_xml_parse_doc and gst_xml_parse_memory - respectivily. both of these methods return a gboolean indicating success - or failure of the requested action. + respectivily. both of these methods return a gboolean indicating + success or failure of the requested action. @@ -177,7 +178,7 @@ main(int argc, char *argv[]) It is possible to add custom XML tags to the core XML created with gst_xml_write. This feature can be used by an application to add more - information to the save plugins. the editor will for example insert + information to the save plugins. the editor will for example insert the position of the elements on the screen using the custom XML tags. @@ -254,8 +255,8 @@ object_saved (GstObject *object, xmlNodePtr parent, gpointer data) - Whenever a new object has been loaded, the xml_loaded function will be - called. this function looks like: + Whenever a new object has been loaded, the xml_loaded function will + be called. this function looks like: static void diff --git a/docs/manual/pads.xml b/docs/manual/pads.xml index 5c5478d..8353326 100644 --- a/docs/manual/pads.xml +++ b/docs/manual/pads.xml @@ -24,8 +24,9 @@ This function will get the pad named "src" from the given element. - Alternatively, you can also request a GList of pads from the element. The following - code example will print the names of all the pads of an element. + Alternatively, you can also request a GList of pads from the element. The + following code example will print the names of all the pads of an + element. GList *pads; @@ -47,9 +48,9 @@ get_pad_set_name(). - gst_pad_get_direction (GstPad *pad) can be used to query if the pad is a sink - or a src pad. Remember a src pad is a pad that can output data and a sink pad is - one that accepts data. + gst_pad_get_direction (GstPad *pad) can be used to query if the pad + is a sink or a src pad. Remember a src pad is a pad that can output + data and a sink pad is one that accepts data. You can get the parent of the pad, this is the element that this pad belongs to, @@ -60,10 +61,10 @@ Dynamic pads - Some elements might not have their pads when they are created. This can, for - example, happen with an MPEG2 system demuxer. The demuxer will create its - pads at runtime when it detects the different elementary streams in the MPEG2 - system stream. + Some elements might not have their pads when they are created. This + can, for example, happen with an MPEG2 system demuxer. The demuxer will + create its pads at runtime when it detects the different elementary + streams in the MPEG2 system stream. Running gst-inspect mpegdemux will show that @@ -122,9 +123,9 @@ main(int argc, char *argv[]) Request pads - An element can also have request pads. These pads are not created automatically - but are only created on demand. This is very usefull for muxers, aggregators - and tee elements. + An element can also have request pads. These pads are not created + automatically but are only created on demand. This is very usefull + for muxers, aggregators and tee elements. The tee element, for example, has one input pad and a request padtemplate for the @@ -151,10 +152,10 @@ main(int argc, char *argv[]) It is also possible to request a pad that is compatible with another - padtemplate. This is very usefull if you want to connect an element to - a muxer element and you need to request a pad that is compatible. The - gst_element_get_compatible_pad is used to request a compatible pad, as - is shown in the next example. + padtemplate. This is very usefull if you want to connect an element to + a muxer element and you need to request a pad that is compatible. The + gst_element_get_compatible_pad is used to request a compatible pad, + as is shown in the next example. ... @@ -216,8 +217,9 @@ struct _GstCaps { three properties: layer, bitrate and framed. - The src pad (output pad) is called 'src' and outputs data of MIME type 'audio/raw'. It also has - four properties: format, depth, rate and channels. + The src pad (output pad) is called 'src' and outputs data of MIME + type 'audio/raw'. It also has four properties: format, depth, rate + and channels. Pads: @@ -245,9 +247,9 @@ Pads: What are properties - Properties are used to describe extra information for the capabilities. The properties - basically exist of a key (a string) and a value. There are different possibile value types - that can be used: + Properties are used to describe extra information for the + capabilities. The properties basically exist of a key (a string) and + a value. There are different possibile value types that can be used: @@ -258,8 +260,9 @@ Pads: - An integer range value. The property denotes a range of possible values. In the case - of the mad element: the src pad has a property rate that can go from 11025 to 48000. + An integer range value. The property denotes a range of possible + values. In the case of the mad element: the src pad has a property + rate that can go from 11025 to 48000. @@ -342,13 +345,16 @@ Pads: Creating capabilities structures - While the capabilities are mainly used inside the plugin to describe the media type of the - pads, the application programmer also has to have basic understanding of caps in order to - interface with the plugins, specially when using the autopluggers. + While the capabilities are mainly used inside the plugin to describe + the media type of the pads, the application programmer also has + to have basic understanding of caps in order to interface with the + plugins, specially when using the autopluggers. - As we said, a capability has a name, a mime-type and some properties. The signature of the - function to create a new GstCaps structure is like: + As we said, a capability has a name, a mime-type and some + properties. The signature of the function to create a new + GstCaps structure is like: + GstCaps* gst_caps_new (const gchar *name, const gchar *mime, GstProps *props); diff --git a/docs/manual/programs.xml b/docs/manual/programs.xml index 87becba..b7a692f 100644 --- a/docs/manual/programs.xml +++ b/docs/manual/programs.xml @@ -35,10 +35,11 @@ gst-launch filesrc location=redpill.vob ! mpegdemux name=demux \ - You can also use the the parser in you own code. GStreamer - provides a function gst_parse_launch () that you can use to construt a pipeline. - The following programs lets you create an mp3 pipeline using the gst_parse_launch () - function: + You can also use the the parser in you own + code. GStreamer provides a function + gst_parse_launch () that you can use to construt a pipeline. + The following programs lets you create an mp3 pipeline using the + gst_parse_launch () function: #include <gst/gst.h> @@ -92,10 +93,10 @@ main (int argc, char *argv[]) ... mad ... - A bare identifier (a string beginning with a letter and containing only letters, - numbers, dashes, underscores, percent signs, or colons) will create an element from a - given elementfactory. In this example, an instance of the "mad" mp3 decoding plugin will - be created. + A bare identifier (a string beginning with a letter and containing + only letters, numbers, dashes, underscores, percent signs, or colons) + will create an element from a given elementfactory. In this example, + an instance of the "mad" mp3 decoding plugin will be created. diff --git a/docs/manual/queues.xml b/docs/manual/queues.xml index cc98cc6..c87fdde 100644 --- a/docs/manual/queues.xml +++ b/docs/manual/queues.xml @@ -41,8 +41,8 @@ - The following mp3 player shows you how to create the above pipeline using a - thread and a queue. + The following mp3 player shows you how to create the above pipeline + using a thread and a queue. diff --git a/docs/manual/schedulers.xml b/docs/manual/schedulers.xml index 87adf3a..8323aab 100644 --- a/docs/manual/schedulers.xml +++ b/docs/manual/schedulers.xml @@ -28,15 +28,15 @@ - The scheduler is a plugable component, this means that alternative schedulers - can be written and plugged into GStreamer. The default scheduler uses cothreads - to schedule the plugins in a pipeline. Cothreads are fast and lightweight - user-space threads. + The scheduler is a plugable component, this means that alternative + schedulers can be written and plugged into GStreamer. The default scheduler + uses cothreads to schedule the plugins in a pipeline. Cothreads are fast + and lightweight user-space threads. - There is usually no need to interact with the scheduler directly, however it some - cases it is feasable to set a specific clock or force a specific plugin as the - entry point in the pipeline. + There is usually no need to interact with the scheduler directly, however + it some cases it is feasable to set a specific clock or force a specific + plugin as the entry point in the pipeline. diff --git a/docs/manual/states.xml b/docs/manual/states.xml index 14e12f3..e158455 100644 --- a/docs/manual/states.xml +++ b/docs/manual/states.xml @@ -1,8 +1,8 @@ Element states - One you have created a pipeline packed with elements, nothing will happen yet. - This is where the different states come into play. + One you have created a pipeline packed with elements, nothing will + happen yet. This is where the different states come into play. @@ -35,9 +35,10 @@ - All elements start with the NULL state. The elements will go throught the following state changes: - NULL -> READY -> PAUSED -> PLAYING. Remember when going from PLAYING to READY GStreamer - will internally go throught the intermediate states. + All elements start with the NULL state. The elements will go throught + the following state changes: NULL -> READY -> PAUSED -> + PLAYING. Remember when going from PLAYING to READY GStreamer will + internally go throught the intermediate states. The state of an element can be changed with the following code: @@ -111,9 +112,9 @@ - You can also go from the NULL to PLAYING state directly without going through the READY - state. this is a shortcut, the framework will internally go through the READY and the - PAUSED state for you. + You can also go from the NULL to PLAYING state directly without + going through the READY state. this is a shortcut, the framework + will internally go through the READY and the PAUSED state for you. @@ -137,9 +138,9 @@ - The PAUSED state is available for temporarily freezing the pipeline. - Elements will typically not free their resources in the PAUSED state. - Use the NULL state if you want to stop the data flow permanantly. + The PAUSED state is available for temporarily freezing the pipeline. + Elements will typically not free their resources in the PAUSED state. + Use the NULL state if you want to stop the data flow permanantly. diff --git a/docs/manual/threads.xml b/docs/manual/threads.xml index 40fe7ee..2f0ebaa 100644 --- a/docs/manual/threads.xml +++ b/docs/manual/threads.xml @@ -31,22 +31,24 @@ - The above program will create a thread with two elements in it. As soon as it is set to the - PLAYING state, the thread will start to iterate itself. You never need to manually iterate a - thread. + The above program will create a thread with two elements in it. As soon + as it is set to the PLAYING state, the thread will start to iterate + itself. You never need to manually iterate a thread. Constraints placed on the pipeline by the GstThread - Within the pipeline, everything is the same as in any other bin. The difference lies at the - thread boundary, at the connection between the thread and the outside world (containing bin). - Since GStreamer is fundamentally buffer-oriented rather than byte-oriented, the natural - solution to this problem is an element that can "buffer" the buffers between the threads, in a - thread-safe fashion. This element is the queue, described more fully in . It doesn't matter if the queue is placed in the containing bin or in - the thread itself, but it needs to be present on one side of the other to enable inter-thread - communication. + Within the pipeline, everything is the same as in any other bin. The + difference lies at the thread boundary, at the connection between the + thread and the outside world (containing bin). Since GStreamer is + fundamentally buffer-oriented rather than byte-oriented, the natural + solution to this problem is an element that can "buffer" the buffers + between the threads, in a thread-safe fashion. This element is the + queue, described more fully in . It doesn't + matter if the queue is placed in the containing bin or in the thread + itself, but it needs to be present on one side of the other to enable + inter-thread communication. diff --git a/docs/manual/typedetection.xml b/docs/manual/typedetection.xml index 19997d1..36af41d 100644 --- a/docs/manual/typedetection.xml +++ b/docs/manual/typedetection.xml @@ -1,10 +1,10 @@ Typedetection - Sometimes the capabilities of a pad are not specificied. The filesrc, for - example, does not know what type of file it is reading. Before you can attach - an element to the pad of the filesrc, you need to determine the media type in - order to be able to choose a compatible element. + Sometimes the capabilities of a pad are not specificied. The filesrc, + for example, does not know what type of file it is reading. Before you + can attach an element to the pad of the filesrc, you need to determine + the media type in order to be able to choose a compatible element. To solve this problem, a plugin can provide the GStreamer @@ -102,18 +102,18 @@ main(int argc, char *argv[]) } - We create a very simple pipeline with only a filesrc and the typefind element - in it. The sinkpad of the typefind element has been connected to the src pad - of the filesrc. + We create a very simple pipeline with only a filesrc and the typefind + element in it. The sinkpad of the typefind element has been connected + to the src pad of the filesrc. We attached a signal 'have_type' to the typefind element which will be called when the type of the media stream as been detected. - the typefind function will loop over all the registered types and will execute - each of the typefind functions. As soon as a function returns a GstCaps pointer, - the type_found function will be called: + the typefind function will loop over all the registered types and will + execute each of the typefind functions. As soon as a function returns + a GstCaps pointer, the type_found function will be called: diff --git a/docs/manual/xml.xml b/docs/manual/xml.xml index 633521a..460b53e 100644 --- a/docs/manual/xml.xml +++ b/docs/manual/xml.xml @@ -17,9 +17,10 @@ Turning GstElements into XML - We create a simple pipeline and write it to stdout with gst_xml_write_file (). The following - code constructs an mp3 player pipeline with two threads and then writes out the XML both to - stdout and to a file. Use this program with one argument: the mp3 file on disk. + We create a simple pipeline and write it to stdout with + gst_xml_write_file (). The following code constructs an mp3 player + pipeline with two threads and then writes out the XML both to stdout + and to a file. Use this program with one argument: the mp3 file on disk. @@ -167,8 +168,8 @@ main(int argc, char *argv[]) In addition to loading a file, you can also load a from a xmlDocPtr and an in memory buffer using gst_xml_parse_doc and gst_xml_parse_memory - respectivily. both of these methods return a gboolean indicating success - or failure of the requested action. + respectivily. both of these methods return a gboolean indicating + success or failure of the requested action. @@ -177,7 +178,7 @@ main(int argc, char *argv[]) It is possible to add custom XML tags to the core XML created with gst_xml_write. This feature can be used by an application to add more - information to the save plugins. the editor will for example insert + information to the save plugins. the editor will for example insert the position of the elements on the screen using the custom XML tags. @@ -254,8 +255,8 @@ object_saved (GstObject *object, xmlNodePtr parent, gpointer data) - Whenever a new object has been loaded, the xml_loaded function will be - called. this function looks like: + Whenever a new object has been loaded, the xml_loaded function will + be called. this function looks like: static void -- 2.7.4