platform/upstream/gstreamer.git
12 years agoAdd new GstTocSetter interface
Alexander Saprykin [Wed, 14 Mar 2012 16:45:35 +0000 (20:45 +0400)]
Add new GstTocSetter interface

12 years agoAdd new TOC query
Alexander Saprykin [Wed, 14 Mar 2012 16:42:56 +0000 (20:42 +0400)]
Add new TOC query

12 years agoAdd new TOC message
Alexander Saprykin [Wed, 14 Mar 2012 16:41:48 +0000 (20:41 +0400)]
Add new TOC message

12 years agoAdd new TOC and TOC select events
Alexander Saprykin [Wed, 14 Mar 2012 16:40:32 +0000 (20:40 +0400)]
Add new TOC and TOC select events

12 years agoAdd generic table of contents (TOC) support
Alexander Saprykin [Wed, 14 Mar 2012 16:01:51 +0000 (20:01 +0400)]
Add generic table of contents (TOC) support

12 years agobuffer: reuse more code
Wim Taymans [Sun, 1 Apr 2012 10:01:34 +0000 (12:01 +0200)]
buffer: reuse more code

12 years agobuffer: make function to find memory in a buffer
Wim Taymans [Sun, 1 Apr 2012 09:42:52 +0000 (11:42 +0200)]
buffer: make function to find memory in a buffer

Make a function to find the memory blocks for a region in a buffer.

12 years agochildproxy: fix more missing GST_OBJECT -> G_OBJECT use
Stefan Sauer [Sat, 31 Mar 2012 19:26:22 +0000 (21:26 +0200)]
childproxy: fix more missing GST_OBJECT -> G_OBJECT use

12 years agoadapter: use buffer_wrap
Wim Taymans [Sat, 31 Mar 2012 16:34:23 +0000 (18:34 +0200)]
adapter: use buffer_wrap

12 years agobuffer: add peek_memory method
Wim Taymans [Sat, 31 Mar 2012 15:10:35 +0000 (17:10 +0200)]
buffer: add peek_memory method

Add a peerk_memory method that simply fetches the memory at an offset without
refcounting or merging.

12 years agogrammar.y: fix childproxy code
Wim Taymans [Sat, 31 Mar 2012 10:00:56 +0000 (12:00 +0200)]
grammar.y: fix childproxy code

It takes GObject and not GstObject now

12 years agochildproxy: include the child name in the signal
Stefan Sauer [Fri, 30 Mar 2012 20:46:02 +0000 (22:46 +0200)]
childproxy: include the child name in the signal

12 years agoparser: update for childproxy api changes
Stefan Sauer [Fri, 30 Mar 2012 20:44:31 +0000 (22:44 +0200)]
parser: update for childproxy api changes

12 years agochildproxy: fix signal parameter types
Stefan Sauer [Fri, 30 Mar 2012 20:36:35 +0000 (22:36 +0200)]
childproxy: fix signal parameter types

12 years agochildproxy: use GObject instead of GstObject
Stefan Sauer [Fri, 30 Mar 2012 20:17:09 +0000 (22:17 +0200)]
childproxy: use GObject instead of GstObject

This makes it prossible to be used more widely. Fix implementations for the API
change.

12 years agochildproxy: make get_child_by_name virtual
Stefan Sauer [Fri, 30 Mar 2012 20:01:55 +0000 (22:01 +0200)]
childproxy: make get_child_by_name virtual

Allows implementations to use custom name->object mappings.

12 years agochildproxy: fix indentation
Stefan Sauer [Fri, 30 Mar 2012 20:01:26 +0000 (22:01 +0200)]
childproxy: fix indentation

12 years agobuffer: improve the buffer memory methods
Wim Taymans [Fri, 30 Mar 2012 16:04:51 +0000 (18:04 +0200)]
buffer: improve the buffer memory methods

gst_buffer_take_memory -> gst_buffer_insert_memory because insert is what the
method does.
Make all methods deal with ranges so that we can replace, merge, remove and map
a certain subset of the memory in a buffer. With the new methods we can make
some code nicer and reuse more code. Being able to deal with a subset of the
buffer memory allows us to optimize more cases later (most notably RTP headers
and payload that could be in different memory objects).
Make some more convenient macros that call the more generic range methods.

12 years agotypefindelement: plug caps leaks
Mark Nauwelaerts [Fri, 30 Mar 2012 14:53:09 +0000 (16:53 +0200)]
typefindelement: plug caps leaks

12 years agotypefindhelper: also unmap collected mapped buffers
Mark Nauwelaerts [Fri, 30 Mar 2012 14:53:05 +0000 (16:53 +0200)]
typefindhelper: also unmap collected mapped buffers

12 years agobasetransform: plug caps leak
Mark Nauwelaerts [Fri, 30 Mar 2012 14:53:00 +0000 (16:53 +0200)]
basetransform: plug caps leak

12 years agobaseparse: Rename ::event() to ::sink_event() for consistency
Sebastian Dröge [Fri, 30 Mar 2012 09:58:20 +0000 (11:58 +0200)]
baseparse: Rename ::event() to ::sink_event() for consistency

12 years agobasesink: lower GST_BASE_SRC_FLAG_LAST
Edward Hervey [Fri, 30 Mar 2012 09:49:16 +0000 (11:49 +0200)]
basesink: lower GST_BASE_SRC_FLAG_LAST

It wouldn't leave that much room for subclass users

12 years agowin32: Update defs file
Edward Hervey [Fri, 30 Mar 2012 06:55:33 +0000 (08:55 +0200)]
win32: Update defs file

12 years agobytewriter: Actually commit the .c file changes too
Sebastian Dröge [Thu, 29 Mar 2012 16:03:35 +0000 (18:03 +0200)]
bytewriter: Actually commit the .c file changes too

12 years agobytewriter: Add unchecked/inline variant of gst_byte_writer_put_buffer()
Sebastian Dröge [Thu, 29 Mar 2012 15:59:28 +0000 (17:59 +0200)]
bytewriter: Add unchecked/inline variant of gst_byte_writer_put_buffer()

12 years agogstquery: Fix annotation
Edward Hervey [Thu, 29 Mar 2012 15:53:47 +0000 (17:53 +0200)]
gstquery: Fix annotation

12 years agoqueue: Flush the internal queue when we see GST_FLOW_FLUSHING
Edward Hervey [Thu, 29 Mar 2012 15:44:02 +0000 (17:44 +0200)]
queue: Flush the internal queue when we see GST_FLOW_FLUSHING

Ensures that we don't end up with stale contents (like GstQuery) in
the internal GQueue after any blocking upstream thread returns.

12 years agoqueue: Don't unref GstQuery travelling through the queue
Edward Hervey [Thu, 29 Mar 2012 15:43:17 +0000 (17:43 +0200)]
queue: Don't unref GstQuery travelling through the queue

Unlike events and buffers, the reference is not given to us

12 years agoquery: parsing allocation query need not provide reffed caps
Mark Nauwelaerts [Thu, 29 Mar 2012 15:08:49 +0000 (17:08 +0200)]
query: parsing allocation query need not provide reffed caps

... in line with other query parsing function.

12 years agocaps: spelling fixes
Fabrizio (Misto) Milo [Thu, 29 Mar 2012 13:45:00 +0000 (15:45 +0200)]
caps: spelling fixes

12 years agogstelement: lower GST_ELEMENT_FLAG_LAST
Edward Hervey [Thu, 29 Mar 2012 13:28:44 +0000 (15:28 +0200)]
gstelement: lower GST_ELEMENT_FLAG_LAST

It wouldn't leave that much room for subclass users

12 years agogstbuffer: Fix unitialized variable
Edward Hervey [Thu, 29 Mar 2012 13:18:33 +0000 (15:18 +0200)]
gstbuffer: Fix unitialized variable

gcc 4.5 complains otherwise :(

12 years agoMerge remote-tracking branch 'origin/0.10'
Sebastian Dröge [Thu, 29 Mar 2012 12:54:53 +0000 (14:54 +0200)]
Merge remote-tracking branch 'origin/0.10'

Conflicts:
plugins/elements/gstmultiqueue.c

12 years agomultiqueue: Wake up all not-linked streams when a stream switches from linked to...
Sebastian Dröge [Thu, 29 Mar 2012 12:45:41 +0000 (14:45 +0200)]
multiqueue: Wake up all not-linked streams when a stream switches from linked to not-linked

We reset all the waiting streams, let them push another buffer to
see if they're now active again. This allows faster switching
between streams and prevents deadlocks if downstream does any
waiting too.

Also improve locking a bit, srcresult must be protected by the
multiqueue lock too because it's used/set from random threads.

12 years agomultiqueue: Recompute high-time too when flushing, not only high-id
Sebastian Dröge [Thu, 29 Mar 2012 12:32:24 +0000 (14:32 +0200)]
multiqueue: Recompute high-time too when flushing, not only high-id

12 years agoinputselector: Only wait until the active pad's running time is reached if the active...
Sebastian Dröge [Thu, 29 Mar 2012 11:39:40 +0000 (13:39 +0200)]
inputselector: Only wait until the active pad's running time is reached if the active pad already saw data

Otherwise we might block forever because upstream (e.g. multiqueue) is waiting
for the previously active stream to return forever (which is waiting here
in inputselector) before pushing something on the newly selected stream.

12 years agodocs: update more documentation
Wim Taymans [Thu, 29 Mar 2012 11:34:50 +0000 (13:34 +0200)]
docs: update more documentation

12 years agoreview some docs
Wim Taymans [Wed, 28 Mar 2012 16:12:23 +0000 (18:12 +0200)]
review some docs

12 years agobuffer: simplify and refactor _span and _merge
Wim Taymans [Wed, 28 Mar 2012 14:44:34 +0000 (16:44 +0200)]
buffer: simplify and refactor _span and _merge

Unify the _span and _merge code paths and simplify now that we only use this
internally.

12 years agobuffer: we always call _span with the buffer size
Wim Taymans [Wed, 28 Mar 2012 13:16:01 +0000 (15:16 +0200)]
buffer: we always call _span with the buffer size

12 years agobuffer: move some code around
Wim Taymans [Wed, 28 Mar 2012 13:12:05 +0000 (15:12 +0200)]
buffer: move some code around

12 years agobuffer: we call _span always with 0 offset
Wim Taymans [Wed, 28 Mar 2012 13:08:44 +0000 (15:08 +0200)]
buffer: we call _span always with 0 offset

12 years agobuffer: remove always FALSE function argument
Wim Taymans [Wed, 28 Mar 2012 11:08:59 +0000 (13:08 +0200)]
buffer: remove always FALSE function argument

12 years agobuffer: delay buffer unref until buffer no longer needed
Mark Nauwelaerts [Wed, 28 Mar 2012 14:39:54 +0000 (16:39 +0200)]
buffer: delay buffer unref until buffer no longer needed

12 years agobuffer: unify buffer merge methods
Wim Taymans [Wed, 28 Mar 2012 10:44:44 +0000 (12:44 +0200)]
buffer: unify buffer merge methods

Add gst_buffer_append() which appends the memory blocks from one buffer to
another. Remove the old inefficient _merge() and _join() methods which forced a
premature memcpy in most cases.
Remove the _is_span() and _span() methods they are not needed anymore now that
we can _append(). Merging and spanning will be delayed until mapping or maybe
not at all when the element can deal with the different memory blocks.

12 years agogstpad: Fix typo in docstring
Olivier Crête [Tue, 27 Mar 2012 19:24:49 +0000 (15:24 -0400)]
gstpad: Fix typo in docstring

12 years agogstpad: Fix typo in docstring
Olivier Crête [Tue, 27 Mar 2012 19:24:49 +0000 (15:24 -0400)]
gstpad: Fix typo in docstring

12 years agobuffer: re-enable _span offset calculations
Wim Taymans [Tue, 27 Mar 2012 13:16:55 +0000 (15:16 +0200)]
buffer: re-enable _span offset calculations

when we _span two complete buffers, we can copy offsets and timestamps.

12 years agotrace: add refcount to trace debug
Wim Taymans [Tue, 27 Mar 2012 13:00:38 +0000 (15:00 +0200)]
trace: add refcount to trace debug

12 years agobuffer: add more _is_writable checks
Wim Taymans [Tue, 27 Mar 2012 12:59:06 +0000 (14:59 +0200)]
buffer: add more _is_writable checks

Add some checks to assert on writability for functions that modify metadata.

12 years agobufferpool: remove const from get/set_param
Wim Taymans [Tue, 27 Mar 2012 10:40:36 +0000 (12:40 +0200)]
bufferpool: remove const from get/set_param

Remove the const from the GstCaps in get/set_param. set_param modifies
the refcount of the caps.
Don't increment the refcount of the caps result of get_param like we
do with other objects.
Update some annotiations.

12 years agobufferpool: fix annotation for _release
Wim Taymans [Tue, 27 Mar 2012 10:39:53 +0000 (12:39 +0200)]
bufferpool: fix annotation for _release

_release takes ownership of the buffer

12 years agobus: Change the timeout argument type of gst_bus_poll() from GstClockTimeDiff to...
Sebastian Dröge [Tue, 27 Mar 2012 10:31:18 +0000 (12:31 +0200)]
bus: Change the timeout argument type of gst_bus_poll() from GstClockTimeDiff to GstClockTime

This is more consistent with the other GstBus methods that have a timeout.

12 years agocaps: remove old code
Wim Taymans [Mon, 26 Mar 2012 17:13:21 +0000 (19:13 +0200)]
caps: remove old code

Remove attempt to delay _make_writable

12 years agocaps: ensure writable caps prior to modification
Mark Nauwelaerts [Mon, 26 Mar 2012 16:07:35 +0000 (18:07 +0200)]
caps: ensure writable caps prior to modification

12 years agobufferpool: check min/max_buffers
Wim Taymans [Mon, 26 Mar 2012 15:38:50 +0000 (17:38 +0200)]
bufferpool: check min/max_buffers

12 years agoquery:fix copy-and-paste problem
Wim Taymans [Mon, 26 Mar 2012 15:35:18 +0000 (17:35 +0200)]
query:fix copy-and-paste problem

12 years agoReplace master with 0.11
Wim Taymans [Mon, 26 Mar 2012 09:54:59 +0000 (11:54 +0200)]
Replace master with 0.11

12 years agoutils: add and improve debug messages
Mark Nauwelaerts [Fri, 23 Mar 2012 17:51:52 +0000 (18:51 +0100)]
utils: add and improve debug messages

... so they end up in a more expected debug category rather than oblivion.

12 years agoback to devel
Wim Taymans [Thu, 22 Mar 2012 14:54:55 +0000 (15:54 +0100)]
back to devel

12 years agoRelease 0.11.3
Wim Taymans [Thu, 22 Mar 2012 14:49:36 +0000 (15:49 +0100)]
Release 0.11.3

12 years agobasetransform: remove automatic and undocumented setting of always_in_place
Mark Nauwelaerts [Thu, 22 Mar 2012 14:22:57 +0000 (15:22 +0100)]
basetransform: remove automatic and undocumented setting of always_in_place

... which controls how to (forcibly) deal with (non-)writable data and
is not necessarily related to identical caps.

In particular, it is also not so helpful anymore with a more advanced
GstVideoFilter subclass which always has a transform_ip method currently,
even though its subclass may not have a corresponding _ip method.

12 years agoMerge branch 'master' into 0.11
Wim Taymans [Thu, 22 Mar 2012 09:45:06 +0000 (10:45 +0100)]
Merge branch 'master' into 0.11

Conflicts:
configure.ac

12 years agogst-launch: don't shadow global variable
Stefan Sauer [Thu, 22 Mar 2012 07:35:25 +0000 (08:35 +0100)]
gst-launch: don't shadow global variable

12 years agodist net directory only once
Wim Taymans [Wed, 21 Mar 2012 11:10:21 +0000 (12:10 +0100)]
dist net directory only once

12 years agoquery: Only allow fixed caps in the accept-caps query
Sebastian Dröge [Wed, 21 Mar 2012 08:00:45 +0000 (09:00 +0100)]
query: Only allow fixed caps in the accept-caps query

12 years agobaseparse: do queries more directly
Wim Taymans [Tue, 20 Mar 2012 16:08:28 +0000 (17:08 +0100)]
baseparse: do queries more directly

Just call our internal query function instead of going through the pad and the
query handler etc.

12 years agoadapter: add some performance debug
Wim Taymans [Tue, 20 Mar 2012 16:08:00 +0000 (17:08 +0100)]
adapter: add some performance debug

12 years agopad: improve docs of get/pull_range
Wim Taymans [Tue, 20 Mar 2012 12:14:55 +0000 (13:14 +0100)]
pad: improve docs of get/pull_range

Improve the docs of the get/pull_range functions, define the lifetime of the
buffer in case of errors and short reads.
Make sure the code does what the docs say.

12 years agobuffer: improve gst_buffer_new_wrapped_full()
Wim Taymans [Tue, 20 Mar 2012 09:20:29 +0000 (10:20 +0100)]
buffer: improve gst_buffer_new_wrapped_full()

Make it possible to wrap all kinds of memory by exposing all properties to
gst_buffer_new_wrapped_full(). This makes it possible to also create writable
memory without a free function or memory with extra padding.

12 years agomultiqueue: handle serialized queries
Wim Taymans [Mon, 19 Mar 2012 10:45:27 +0000 (11:45 +0100)]
multiqueue: handle serialized queries

12 years agobasetransform: make more stuff private
Wim Taymans [Fri, 16 Mar 2012 21:51:14 +0000 (22:51 +0100)]
basetransform: make more stuff private

12 years agobasetransform: small cleanups
Wim Taymans [Fri, 16 Mar 2012 21:25:38 +0000 (22:25 +0100)]
basetransform: small cleanups

12 years agopad: change the semantics of get/pull_range a little
Wim Taymans [Fri, 16 Mar 2012 20:37:10 +0000 (21:37 +0100)]
pad: change the semantics of get/pull_range a little

Make it so that one can specify a buffer for get/pull_range where the downstream
element should write into. When passing NULL, upstream should allocate a buffer,
like in 0.10.
We also need to change the probes a little because before the pull probe, there
could already be a buffer passed. This then allows us to use the same PROBE
macro for before and after pulling.
While we're at the probes, make the query probe more powerful by handling the
GST_PAD_PROBE_DROP return value. Returning _DROP from a query probe will now
return TRUE upstream and will not forward the probe to the peer or handler.
Also handle _DROP for get/pull_range properly by not dispatching to the
peer/handler or by generating EOS when the probe returns DROP and no buffer.
Make filesrc handle the non-NULL buffer passed in the get_range function and
skip the allocation in that case, writing directly into the downstream provided
buffer.
Update tests because now we need to make sure to not pass a random value in the
buffer pointer to get/pull_range

12 years agotypefind: proxy allocation query
Wim Taymans [Fri, 16 Mar 2012 20:36:33 +0000 (21:36 +0100)]
typefind: proxy allocation query

12 years agoevent: fix docs a little, alloc_buffer is gone
Wim Taymans [Fri, 16 Mar 2012 17:39:08 +0000 (18:39 +0100)]
event: fix docs a little, alloc_buffer is gone

12 years agobufferpool: split bufferpool configuration
Wim Taymans [Thu, 15 Mar 2012 21:09:02 +0000 (22:09 +0100)]
bufferpool: split bufferpool configuration

Make separate methods to control the bufferpool and the allocator used by the
bufferpool.
Make it possible to change the allocator of a pool.

12 years agoquery: rework the ALLOCATION query
Wim Taymans [Thu, 15 Mar 2012 19:23:59 +0000 (20:23 +0100)]
query: rework the ALLOCATION query

Separate the bufferpool and allocator hints in the allocation query, some
of the values don't always make sense together.
Keep the bufferpool and its configuration together.
Keep the allocator and its parameters together.
Allow for multiple bufferpool configurations in the query.

12 years agopad: comment and debug improvement
Wim Taymans [Thu, 15 Mar 2012 15:50:31 +0000 (16:50 +0100)]
pad: comment and debug improvement

12 years agoutils: improve debug
Wim Taymans [Thu, 15 Mar 2012 15:49:33 +0000 (16:49 +0100)]
utils: improve debug

also fix a potential memory leak

12 years agodefs: update
Wim Taymans [Thu, 15 Mar 2012 13:28:22 +0000 (14:28 +0100)]
defs: update

12 years agoGstBufferPoolParams -> GstBufferPoolAcquireParams
Wim Taymans [Thu, 15 Mar 2012 13:01:44 +0000 (14:01 +0100)]
GstBufferPoolParams -> GstBufferPoolAcquireParams

Because those flags are not from the bufferpool but for the acquire function.

12 years agomemory: group allocation parameters in a struct
Wim Taymans [Thu, 15 Mar 2012 12:28:28 +0000 (13:28 +0100)]
memory: group allocation parameters in a struct

Group the extra allocation parameters in a GstAllocationParams structure to make
it easier to deal with them and so that we can extend them later if needed.
Make gst_buffer_new_allocate() take the GstAllocationParams for added
functionality.
Add boxed type for GstAllocationParams.

12 years agofilesrc: only update buffer size on short read
Wim Taymans [Wed, 14 Mar 2012 23:25:50 +0000 (00:25 +0100)]
filesrc: only update buffer size on short read

12 years agoquery: fix copy function
Wim Taymans [Wed, 14 Mar 2012 23:24:40 +0000 (00:24 +0100)]
query: fix copy function

Copy the structure too.

12 years agomemory: fix maxsize after align
Wim Taymans [Wed, 14 Mar 2012 23:23:57 +0000 (00:23 +0100)]
memory: fix maxsize after align

when we align the data pointer, make sure to update the maxsize.
Add some more debug

12 years agoqueue: remove useless PROXY_ALLOCATION flag
Wim Taymans [Wed, 14 Mar 2012 21:58:34 +0000 (22:58 +0100)]
queue: remove useless PROXY_ALLOCATION flag

12 years agomemory: Add 0 padding
Wim Taymans [Wed, 14 Mar 2012 20:32:22 +0000 (21:32 +0100)]
memory: Add 0 padding

Change gst_allocator_alloc() so that we can also spicify flags and padding.
Add 2 new flags to mark the memory 0 prefixed/padded. This allows us to
remove some resizes in the base classes.
When allocating memory, memset prefix and padding with 0 when the flags tell
us to.
On resize, clear the zero padding flags if we can't guarantee the memory is
still 0 filled.
Update tests.

12 years agoquery: also include padding in ALLOCATION query
Wim Taymans [Wed, 14 Mar 2012 18:37:22 +0000 (19:37 +0100)]
query: also include padding in ALLOCATION query

Negotiating padding is needed on second thought so include it in the
ALLOCATION query.
Make the bufferpool take padding into account when allocating.
Make basesrc take padding into account.
Use padding and prefix when allocating in basetransform.

12 years agobasesrc: take prefix into account when allocating
Wim Taymans [Wed, 14 Mar 2012 17:45:55 +0000 (18:45 +0100)]
basesrc: take prefix into account when allocating

Take into account the prefix that we received from the allocation query and use
it to allocate and resize a larger buffer.

12 years agobufferpool: free owned discarded pool config
Mark Nauwelaerts [Wed, 14 Mar 2012 16:16:36 +0000 (17:16 +0100)]
bufferpool: free owned discarded pool config

12 years agopad: implement DRAIN handling
Wim Taymans [Wed, 14 Mar 2012 15:27:31 +0000 (16:27 +0100)]
pad: implement DRAIN handling

When we forward the DRAIN query and there is nothing to forward it to, assume we
are drained.
When a basesink receives a drain query, reply with TRUE.

12 years agoquery: add new drain query
Wim Taymans [Wed, 14 Mar 2012 15:14:12 +0000 (16:14 +0100)]
query: add new drain query

With the new serialized downstream queries we can implement a drain query that
makes an element waits until a downstream element replies to the query.

12 years agopad: make serialized queries push sticky events first
Wim Taymans [Wed, 14 Mar 2012 15:01:15 +0000 (16:01 +0100)]
pad: make serialized queries push sticky events first

Before we can proceed with a serialized query, we need to be sure that all
sticky events were pushed.

12 years agoqueues: warn when receiving a serialized event
Wim Taymans [Wed, 14 Mar 2012 14:42:47 +0000 (15:42 +0100)]
queues: warn when receiving a serialized event

.. until we implement it.

12 years agoqueue: add support for serialized queries
Wim Taymans [Wed, 14 Mar 2012 14:42:33 +0000 (15:42 +0100)]
queue: add support for serialized queries

12 years agopad: take stream lock on serialized queries
Wim Taymans [Wed, 14 Mar 2012 14:29:12 +0000 (15:29 +0100)]
pad: take stream lock on serialized queries

12 years agopad: enforce correct query direction
Wim Taymans [Wed, 14 Mar 2012 14:16:56 +0000 (15:16 +0100)]
pad: enforce correct query direction

12 years agoquery: register queries like events
Wim Taymans [Wed, 14 Mar 2012 13:51:16 +0000 (14:51 +0100)]
query: register queries like events

Also register queries with a QueryType that allows us to check if the event is
sent in the right direction. Add a serialized query type because we will need
this for the allocation query.
Remove the QueryTypeDefinition stuff, it is not used anymore and we now use
custom queries and separate API for them.
Update defs.