DVBLink Remote API C# library

DVBLink Remote API clients and tools

DVBLink Remote API C# library

Postby Oberon » Wed Apr 11, 2012 3:09 pm

The attachment of this topic contains a set of C# classes that we use in our products to work with DVBLink Connect! Server using its Remote API.
With this library we would like to provide kick-start experience for our users who would like to write their own client for DVBLink Connect! Server.

At the moment there is not much documentation or sample code for this library. We will add them at a later stage. In the meanwhile I will provide a very short introduction to the code, hoping that it is largely self-explaining.

The core class is DataProvider.

This calss has a number of functions that directly correspond to the Remote API commands - like GetChannels, SearchEpg etc. Each of this functions takes an appropriate command object as input - ChannelsRequest object in case of GetChannels function, EpgSearcher object in case of SearchEpg function etc.

The result is returned asynchronously via IDataProvider interface implementation. DataProcessing function is called in case of success and ErrorProcessing in case of error. DataProcessing function returns a response object of a type that directly corresponds to the type of request: ChannelIdWithPrograms SearchEpg request, Channels in case of GetChannels request etc.

Stream can be requested from the server using PlayChannel function. The returned Streamer object contains url that can be used to retrieve a stream and a handle, which should be used to stop streaming using StopChannel function.

The code published "as is" without any guarantees, warranties or obligations. You may use this code in modified or unmodified form in any kind of application.
Attachments
dvblink_remote_api_c_sharp_lib.zip
(9.99 KiB) Downloaded 649 times
Server: Synology DS212j, TBS5980CI (Dutch CanalDigitaal), TeVii s660 unicable Astra 28.2E, DVBLink TVSource 4.6.0, all DVBLink EPG Loaders
Clients: AsRock ION 330 Win7 MediaCenter, Samsung DLNA TV, IPad, Samsung Galaxy S, Nexus 7
Oberon
 
Posts: 7152
Joined: Thu Sep 06, 2007 5:04 am


Re: DVBLink Remote API C# library

Postby Koen Zomers » Thu Apr 26, 2012 3:12 pm

Awesome stuff Oberon, thanks for sharing! Will play around with it to see what it can do. Keep the good .NET stuff coming!
Server: Asus DSBV-D,Intel Xeon L5410,24GB,Win2012
Tuners: Digital Devices CineCTV6 quad DVB-C, 1x Terratec Cinergy DVB-C
Software: DVBLogic 4.6.0 Server b9301, Connect b9336, IPTV b8916, TVSource b9301, Acamd 0.6.2
Clients: Win8Pro,WinPhone 8,Android,DLNA
Koen Zomers
 
Posts: 38
Joined: Sat Jan 29, 2011 11:18 pm

Re: DVBLink Remote API C# library

Postby Oberon » Thu Apr 26, 2012 3:17 pm

I forgot to mention in my original post (I will update it as well) that this code requires silverlight and may not wok with a generic .net
Server: Synology DS212j, TBS5980CI (Dutch CanalDigitaal), TeVii s660 unicable Astra 28.2E, DVBLink TVSource 4.6.0, all DVBLink EPG Loaders
Clients: AsRock ION 330 Win7 MediaCenter, Samsung DLNA TV, IPad, Samsung Galaxy S, Nexus 7
Oberon
 
Posts: 7152
Joined: Thu Sep 06, 2007 5:04 am

Re: DVBLink Remote API C# library

Postby tiernano » Tue Jun 05, 2012 10:03 am

might be an idea to stick this up on GitHub or CodePlex... makes it easier to update, and easier to contribute too also...
tiernano
 
Posts: 13
Joined: Tue Jan 18, 2011 10:08 pm

Re: DVBLink Remote API C# library

Postby remcoploeg » Thu Jun 21, 2012 9:37 pm

Any update on more sample code and documentation?

thanks!
remcoploeg
 
Posts: 18
Joined: Thu Sep 29, 2011 7:04 pm

Re: DVBLink Remote API C# library

Postby Neil__C » Mon Aug 20, 2012 3:48 pm

Hi Oberon,

Same sort of question here - are there any code updates and, specifically, any further documentation and/or sample c# projects that would give examples of how to use the classes you've provided and the apis themselves?

I know you must be very busy but what I would find really helpful is a simple, non-pretty c# project that showed simply how each part of the api would be used in practice.

Regards
Neil__C
 
Posts: 18
Joined: Sun Aug 31, 2008 5:40 pm

Re: DVBLink Remote API C# library

Postby freddie216 » Thu Sep 13, 2012 7:38 pm

These two lines in HttpDataProvider.cs are in the wrong order
Code: Select all
web_client_.Credentials = credential;
web_client_.UseDefaultCredentials = false;

should be
Code: Select all
web_client_.UseDefaultCredentials = false;
web_client_.Credentials = credential;

This fixes the STATUS_UNAUTHORISED error (At least in .NET 2.0)
Setting UseDefaultCredentials to false seems to reset the Credentials to null.
freddie216
 
Posts: 1
Joined: Thu Sep 13, 2012 7:28 pm

Re: DVBLink Remote API C# library

Postby Oberon » Fri Sep 14, 2012 11:24 am

@freddie216
Thanks.
Server: Synology DS212j, TBS5980CI (Dutch CanalDigitaal), TeVii s660 unicable Astra 28.2E, DVBLink TVSource 4.6.0, all DVBLink EPG Loaders
Clients: AsRock ION 330 Win7 MediaCenter, Samsung DLNA TV, IPad, Samsung Galaxy S, Nexus 7
Oberon
 
Posts: 7152
Joined: Thu Sep 06, 2007 5:04 am

Re: DVBLink Remote API C# library

Postby genius280 » Thu Jan 31, 2013 2:01 am

Hello,

we are testing your C# lib to develop an MS Outlook Addon to:
-display Epg in Outlook Calendars
-Manage recordings
-Active/Watch live streams from Outlook Epg

Problem is we are getting very little info per Program from SearchEpg call. the only columns with data are :
Program.ShortDesc
Program.StartTime
Program.ID

all other columns are empty/false/null.

We need at least Title.
DVBLink Server version 4.5.2

Is there a new version of API?

Thanks,

Radek
genius280
 
Posts: 36
Joined: Tue Nov 10, 2009 5:20 pm

Re: DVBLink Remote API C# library

Postby Oberon » Thu Jan 31, 2013 3:00 pm

genius280 wrote:Hello,

we are testing your C# lib to develop an MS Outlook Addon to:
-display Epg in Outlook Calendars
-Manage recordings
-Active/Watch live streams from Outlook Epg

Problem is we are getting very little info per Program from SearchEpg call. the only columns with data are :
Program.ShortDesc
Program.StartTime
Program.ID

all other columns are empty/false/null.

We need at least Title.
DVBLink Server version 4.5.2

Is there a new version of API?

Thanks,

Radek


The C# library, attached to this topic, is developed to work with silverlight. Under usual .NET DataContractSerializer class requires xml tags to be sorted. And this is the reason why it does not work as it should.
On all other C# compatible platforms we use XmlSerializer, but it does not exist on silverlight.
So the options for you at the moment are:
- re-wrire (de)serialization part of the library
- use silverlight
Server: Synology DS212j, TBS5980CI (Dutch CanalDigitaal), TeVii s660 unicable Astra 28.2E, DVBLink TVSource 4.6.0, all DVBLink EPG Loaders
Clients: AsRock ION 330 Win7 MediaCenter, Samsung DLNA TV, IPad, Samsung Galaxy S, Nexus 7
Oberon
 
Posts: 7152
Joined: Thu Sep 06, 2007 5:04 am

Re: DVBLink Remote API C# library

Postby genius280 » Thu Jan 31, 2013 3:20 pm

Thanks,

Radek
genius280
 
Posts: 36
Joined: Tue Nov 10, 2009 5:20 pm


Return to Development corner

Who is online

Users browsing this forum: No registered users and 0 guests