pf_validate is supposed to tell if the regions need to be redone or not.
But since pf_update is going to write the regions, it can also reset the
container by itself. It's the owner of these regions.
With the new `close` callback exposed in the v-table it becomes possible
to create empty sout objects. Those allow to programmatically create
custom stream outputs without having to declare them as shared modules.
This will be used to replace the current `chromecast-proxy`
implementation or to forward PCR properly in duplicate (we need specific
sout filters here to catch PCR at the end of each duplicated stream).
Let's switch to the ops initializer used in most C++ modules. This is
preparation work to switch to the sout close callback in ops. The close
callback in this context cannot be owned by the SDIOutput class as it
needs to have a complete definition of the object implementing this
interface.
Adding the close callback in the object v-table instead of relying on
the module to do so.
This remove module dependency from the stream output object. From now
on, it will be possible to allocate and set-up stream outputs
programmatically without having to declare a module.
This is useful in scenario where a very contextual stream output filter
implementation is needed and we don't want to expose a module that the
user can manipulate. A good example of that is the current
`chromecast-proxy` submodule which inherit from it's parent internals
and drop data until the first I-Frame.
This approach of delegating object deletion to the v-table is already
taken by most modern module types.
It is now less likely to happen.
It's better to do nothing if it happens since the writing is already
paced via the callback and pa_stream_writable_size().
Keep a fifo block in the module and send blocks to pulse via the
write_callback.
Pulse is now uncorked sooner (on the first play), silence is sent via
the data callback to reach for the start date.
This fixes overflow when sending more then 5 seconds of audio.