This patch starts a code mutualisation for a RAIL server-side
implementation. The file rail_common.c contains code that is shared
by both client and server.
- Fixes#1166
- Fixed a possible segfault caused by invalid command line parameters
- Removed serial->in_event which had no effect at all on the program logic
* tsmf audio volume fixes
* The first audio volume message is received before everything is
initialized. Cache this data until we're ready.
* Handle the cases of gstreamer unitialized/partially ready/
fully ready.
* Default to 50% as a fallback if the above fails.
* Improved detection of the primary monitor.
* Fix an unexpected shutdown when the server asks us to resize the media
overlay to (width=0,height=0).
* Permit multiple presentations - required for repeat of audio files
and also is seen in some video cases.
* Several leak fixes.
* Fix logging related compile warnings and other usage of PRIu64.
If dynamic channels are not completely initialized, the server will
reuse those channel numbers for new channels.
This causes interesting problems when the server asks for a channel
by number, as we can end up with multiple channels with the same number.
Log example of the problem:
DBG_DVC drdynvc_process_receive (341): Cmd=0x1
DBG_DVC drdynvc_process_create_request (249): ChannelId=0 ChannelName=PNPDR
DBG_DVC drdynvc_process_create_request (265): no listener
DBG_DVC drdynvc_process_receive (341): Cmd=0x1
DBG_DVC drdynvc_process_create_request (249): ChannelId=0 ChannelName=TSMF
DBG_DVC tsmf_on_new_channel_connection (378):
DBG_DVC dvcman_create_channel (415): listener TSMF created new channel 0
DBG_DVC drdynvc_process_create_request (260): channel created
DBG_DVC drdynvc_process_receive (341): Cmd=0x3
DBG_DVC drdynvc_process_data (311): ChannelId=0
Warning dvcman_receive_channel_data (517): ChannelId 0 not ready!
In this log, we received data intended for TSMF, but the channel lookup
found the incompletely initialized PNPDR.