webmux: fix linking with shout2send element

Shout2send only accepts webm format, not matroska, but due
to a bug in matroskamux, webmmux's source pad is also created
with the matroska source pad template as pad template, which
makes the link function think it can't link webmmux to shout2send.

Also add unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=689336
shout2send: accept audio/webm as well as video/webm

https://bugzilla.gnome.org/show_bug.cgi?id=689336
v4l2src: link against -lrt for clock_gettime()

Need to explicitly link against -lrt for clock_gettime(), which
we don't get in the libs any more, because core moved the
gmodule-no-export-2.0 bit into Requires.Private.

Not required for newer glibc, but for older ones, so check for that.
osxvideosink: Fix resizing the Cocoa window on receiving new caps

Fixes bug #689732.
rtspsrc: do not change state to PLAYING if currently chaning state

* gst/rtsp/gstrtspsrc.c (gst_rtspsrc_play): state change might be
  happening in the application thread, so we don't change the state to
  PLAYING in the gstrtspsrc thread unless it is safe.

  A specific case is when chaning the state to NULL from the application
  thread. This will synchronously try to stop the task (with the element
  state lock acquired), but we will try a gst_element_set_state from
  gstrtspsrc thread which will block on the element state lock causing a
  deadlock.

  https://bugzilla.gnome.org/show_bug.cgi?id=684312
deinterlace: add support for strides

Implement stride support correctly by taking it from the GstVideoFrame.
Propose a bufferpool upstream when not operating in passthrough.
udpsrc: improve timeouts

Make it possible to set the timeout after we went to the READY state by using
the timeout when checking the condition. This also makes it possible to set the
timeout with a higher granularity than seconds.
rtspsrc: timeout on udpsrc is in nanoseconds
deinterleave: properly set srcpad channel position

The src pad caps always describe a single audio channel so only the
first position matters if deinterleave is configured to keep channel
positions in its src pads.
ext/sys: Fix some compilation errors caused by circular includes
directsound, waveform: fix compilation errors caused by circular includes

https://bugzilla.gnome.org/show_bug.cgi?id=690124
rtspsrc: fix TCP reconnect

Ignore other commands when reconnecting, otherwise the loop function would pause
and the reconnection would not happen. Continue looping after doing a reconnect
so that we have a chance to actually read the new data.
jitterbuffer: bundle together late lost-events

The scenario where you have a gap in a steady flow of packets of
say 10 seconds (500 packets of with duration of 20ms), the jitterbuffer
will idle up until it receives the first buffer after the gap, but will
then go on to produce 499 lost-events, to "cover up" the gap.

Now this is obviously wrong, since the last possible time for the earliest
lost-events to be played out has obviously expired, but the fact that
the jitterbuffer has a "length", represented with its own latency combined
with the total latency downstream, allows for covering up at least some
of this gap.

So in the case of the "length" being 200ms, while having received packet
500, the jitterbuffer should still create a timeout for packet 491, which
will have its time expire at 10,02 seconds, specially since it might
actually arrive in time! But obviously, waiting for packet 100, that had
its time expire at 2 seconds, (remembering that the current time is 10)
is useless...

The patch will create one "big" lost-event for the first 490 packets,
and then go on to create single ones if they can reach their
playout deadline.

See https://bugzilla.gnome.org/show_bug.cgi?id=667838
check: add (but disable) more rtp jitterbuffer tests

Tests need to be ported to 1.0 before they can be enabled but added here so they
don't get forgotten.

See https://bugzilla.gnome.org/show_bug.cgi?id=667838
Add scaletempo plugin, which allows to scale the speed of audio without changing the pitch by handling seeks with a r...

Original commit message from CVS:
Patch by: Rov Juvano <rovjuvano at users dot sourceforge dot net>
* configure.ac:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
* docs/plugins/inspect/plugin-scaletempo.xml:
* examples/scaletempo/Makefile.am:
* examples/scaletempo/demo-gui.c: (pop_status_bar),
(status_bar_printf), (demo_gui_seek_bar_format), (update_position),
(demo_gui_seek_bar_change), (demo_gui_do_change_rate),
(demo_gui_do_set_rate), (demo_gui_do_rate_entered),
(demo_gui_do_toggle_advanced), (demo_gui_do_toggle_disabled),
(demo_gui_do_seek), (demo_gui_do_play), (demo_gui_do_pause),
(demo_gui_do_play_pause), (demo_gui_do_open_file),
(demo_gui_do_playlist_prev), (demo_gui_do_playlist_next),
(demo_gui_do_about_dialog), (demo_gui_do_quit),
(demo_gui_request_set_stride), (demo_gui_request_set_overlap),
(demo_gui_request_set_search), (demo_gui_rate_changed),
(demo_gui_playing_started), (demo_gui_playing_paused),
(demo_gui_playing_ended), (demo_gui_player_errored),
(demo_gui_stride_changed), (demo_gui_overlap_changed),
(demo_gui_search_changed), (demo_gui_set_player_func),
(demo_gui_set_playlist_func), (build_gvalue_array),
(create_action), (demo_gui_show_func), (demo_gui_set_player),
(demo_gui_set_playlist), (demo_gui_show), (demo_gui_get_property),
(demo_gui_set_property), (demo_gui_init), (demo_gui_class_init),
(demo_gui_get_type):
* examples/scaletempo/demo-gui.h:
* examples/scaletempo/demo-main.c: (handle_error_message),
(handle_quit), (main):
* examples/scaletempo/demo-player.c: (no_pipeline),
(demo_player_event_listener), (demo_player_state_changed_cb),
(demo_player_eos_cb), (demo_player_build_pipeline), (_set_rate),
(demo_player_scale_rate_func), (demo_player_set_rate_func),
(_set_state_and_wait), (demo_player_load_uri_func),
(demo_player_play_func), (demo_player_pause_func), (_seek_to),
(demo_player_seek_by_func), (demo_player_seek_to_func),
(demo_player_get_position_func), (demo_player_get_duration_func),
(demo_player_scale_rate), (demo_player_set_rate),
(demo_player_load_uri), (demo_player_play), (demo_player_pause),
(demo_player_seek_by), (demo_player_seek_to),
(demo_player_get_position), (demo_player_get_duration),
(demo_player_get_property), (demo_player_set_property),
(demo_player_init), (demo_player_class_init),
(demo_player_get_type):
* examples/scaletempo/demo-player.h:
* gst/audiofx/Makefile.am:
* gst/audiofx/gstscaletempo.c: (best_overlap_offset_float),
(best_overlap_offset_s16), (output_overlap_float),
(output_overlap_s16), (fill_queue), (reinit_buffers),
(gst_scaletempo_transform), (gst_scaletempo_transform_size),
(gst_scaletempo_sink_event), (gst_scaletempo_set_caps),
(gst_scaletempo_get_property), (gst_scaletempo_set_property),
(gst_scaletempo_base_init), (gst_scaletempo_class_init),
(gst_scaletempo_init):
* gst/audiofx/gstscaletempo.h:
* gst/audiofx/gstscaletempoplugin.c: (plugin_init):
Add scaletempo plugin, which allows to scale the speed of audio without
changing the pitch by handling seeks with a rate!=1.0.
Integrate it into the docs and add the example application for it.
Fixes bug #537700.
scaletempo: Return the result of parent_class->event()

Original commit message from CVS:
* gst/audiofx/gstscaletempo.c:
Return the result of parent_class->event().
scaletempo: Do not use void pointer arithmetic.
scaletempo: Explicitely cast to signed integers to fix a segfault

Fixes bug #585660.
scaletempo: properly update new segments

Scaletempo was missing an update of 'stop' in
new segment parameters when pushing it downstream,
which caused files to end earlier when rate < 1.

Fixes #599903

Based on patch by: Bastian Hecht <hechtb@gmail.com>
scaletempo: gst_element_class_set_details => gst_element_class_set_details_simple