DVBViewer Recording Service / MDAPI DVB Api Plugin
Function:
The plugin connects via dvbapi protocol directly with an oscam in the local network.
This allows you to use the oscam dvbapi on Windows DVB software.
Now all EMMs come through!
For multiple tuners, you can use multiple mdvbapi.dll. These connect internally so it works with oscam.
In oscam you also need the "listen_port".
thx schwa226
Version: v0.18
by schwa226
Special THX to Appiemulder the author of Acamd!
This is a dvbapi plugin for the DVBViewer Recording Service or an MDAPI DVB software.
It will work also with DVBViewer but it is optimized for the DVBViewer Recording Service.
You can get the DVBViewer Recording Service at www.dvbviewer.com.
v0.03:
Fixed filter & mask issue
Added adaptation field support for filter
v0.04:
Add fix for wrong cluster size in decrypt
Add fix for corrupt data (table len) in EMM data.
v0.05:
Add MDAPI 184/188 Bytes support
v0.06:
Fixed PMT parsing (TNTSat, Digi TV,...)
v0.07:
Code cleanup
Changed plugin name to mdvbapi
v0.08:
Improved tranponder stream handling for decryption
Added SID to PMT filter
v0.09:
FFdecsa performance improvement:
MMX_64: +30%
SSE2_128: +55%
Fixed Long ECM data handling (tested on TNTSat Cherie 25)
v0.10:
Fixed MDAPI filter handling of tables > 181 bytes
Added support for oscam dvbapi protocol 2 (oscam revision equal or higher than 10653 is required)
Added function to filter multiple tables in single ts packet (like ORF)
v0.11:
Fixed FFdecsa memory allocate
Moved filter actions to a separate thread for better performance
v0.12:
Fixed MDAPI Plus support
Performance improvements
v0.13:
Fixed MDAPI Plus timing issue on plugin init
v0.14:
Added DVBViewer plugin menu entry to activate/deactivate mdvbapi
Changed caPMT list item to dynamic size by PMT size
Changed socket handling
Changed internal IPC handling
Changed filter handling
Fixed DVBViewer timing issue on plugin init
Fixed filter to be able to filter PMT pid and PAT pid
Added filter crc32 check on data with section_syntax_indicator flag
Added one shot cache on filter data, cache get cleared by changing/removing the filter
Fixed filter to filter data splitted in packets with PUSI flag
Changed default number of adapters to 16, can be changed by setting the parameter adapters=< number of adapters > in the ini file
Fixed blocking deadlock on shutdown by Sendmessage
Added support of KeepAlive and 188 byte mode on filter data with MDAPI Plus version equal or higher than 0.9.0.1615
v0.14.1
Hotfix for creating caPMT item by PMT size between 245 to 267 bytes
v0.14.2
Hotfix for MDAPI 184 byte filter
v0.15
Added ProgDVB MDAPI 188 byte mode
Added special 188 byte mode for DVBLink/TVSource MDAPI
Changed at mdvbapi.ini "ip" to "host", it will be changed automatically on the first start
Added IPv6 support, see HowTo at "mdvbapi.ini"
v0.15.1
Hotfix for overlapped socket receive
v0.15.2
Fixed FFdecsa SSE2_128 boost for INT_32 mode
v0.16
Removed MMX64 version because of working SSE2_128
SSE2_128 FFdecsa performance improvement: +65% against original INT_32 (again +10% to v0.09)
Added special SSE2_128 FFdecsa version for SAT>IP: +105% against original INT_32
Fixed socket receive
v0.17
Fixed possible crash on closing the plugin
Changed config folder destination to %ALLUSERSPROFILE%\mdvbapi (example: C:\ProgramData\mdvbapi).
Existing config mdvbapi.ini or mdvbapi.log is getting moved to the new config folder on the first start.
v0.17.1
Changed log entries for DVBLink
Fixed filter for data with a length of 180 bytes
v0.18
Added extended CW API (PowerVu, DES & AES) (only usable for DVBViewer - untested!)
How to install:
Plugin prerequisites:
Microsoft Visual C++ 2010 Redistributable Package (x86), Download Microsoft Visual C++ 2010 Redistributable Package (x86) from Official Microsoft Download Center
The INI-File:
%ALLUSERSPROFILE%\mdvbapi (example: C:\ProgramData\mdvbapi)
There is only one INI-File for all mdvbapi.dll plugins which make it easier for the user.
DVBViewer Recording Service:
Install DVBViewer and DVBViewer Recording Service on the PC.
The plugin(s) have to be in ../DVBViewer/Plugins/Plugins[1 - 32]
For each tuner one plugin folder is used.
So if you have 4 tuners in DVBViewer Recording Service you will have folder "Plugins1" to "Plugins4".
DVBViewer:
Install DVBViewer on the PC.
The plugin have to be in ../DVBViewer/Plugins
The plugin makes a connection to oscam dvbapi by a inet socket TCP.
mdvbapi.ini:
Section:
[oscam]
host=< hostname, IPv4 or IPv6 where oscam can be reached >
port=< listen_port of the oscam dvbapi >
[options]
debug=< debug level in decimal >
active=< 0 to deactivate, 1 to activate (Default) >
adapters=< number of adapters, adapter number have to be between 2 to 65, default 16 >
IPv6=< 0 to use IPv4 (Default), 1 to use IPv6 >
Please take a look to oscam wiki:
OSCam/en/Config/oscam.conf – Streamboard Wiki
Possible debug values:
D_PLUGIN 0x0001 1 Log transfer from/to DVB software
D_FILTER 0x0002 2 Log filter actions
D_OSCAM 0x0004 4 Log transfer from/to oscam
D_DECSA 0x0008 8 Log FFdecsa infos
D_PIPE 0x0010 16 Log internal pipe transfer
D_ECMINFO 0x0020 32 Log ECM infos provided by oscam
Example for debug level:
D_PLUGIN and D_OSCAM: 1 OR 4 == 5
The log file is saved in %ALLUSERSPROFILE%\mdvbapi (example: C:\ProgramData\mdvbapi).
oscam:
You will need a oscam supporting dvbapi protocol minimum 1.
About the FFdecsa boost:
As the INT_32 mode is the mode with the lowest CPU usage for live TV this mode got modfied with SSE2_128 instructions.
Like there are a lot of loops handling 4 single integers these loops where be replaced by a single SSE2 instruction.
Fore sure the original SSE2 version will be the fastest but the CPU usage against INT_32 will be 2-6 times higher.
With these modifications this leeds to a speed improvement +65% against the original INT_32 mode for standard packet count.
For low packet count (maximum 7 TS packets) the SAT>IP SSE2 version code got optimized again and this leeds
to +105% against the original INT_32 mode. But using this version for other DVB hardware with more than 7 TS packets
will lead to a lower performance than the SSE2 modified for standard packet count version.
Tests on a low power Atom CPU with ~15MBit/s
Original INT_32 mode: ~55-65% CPU usage
INT_32 with SSE2 mode: ~35-45% CPU usage
INT_32 with SSE2 SAT>IP mode: ~20-30% CPU usage
Function:
The plugin connects via dvbapi protocol directly with an oscam in the local network.
This allows you to use the oscam dvbapi on Windows DVB software.
Now all EMMs come through!
For multiple tuners, you can use multiple mdvbapi.dll. These connect internally so it works with oscam.
In oscam you also need the "listen_port".
thx schwa226