porting old DD plugins to the new api

General discussion . (Do not post bug reports or feature requests in this section!)

Moderators: Dreamer, FredB, X05

pvdeejay
Home away from home
Posts: 69
Joined: Sat Jun 24, 2006 11:02 am
Location: slovakia
Contact:

porting old DD plugins to the new api

Postby pvdeejay » Mon Jun 26, 2006 8:11 am

Hello Rel,
These days I am searching for any md plugin or other possible solution to stream the currently viewing channel over a local network. I've found a plugin on the german DD website but it's made for older DD than 1.0 so I guess this one won't work.
Are there any sources of those elder plugins awailable? how hard is it to adapt these to the new DD api?
I am not real programmer but I've done some courses of delphi and c++ so I know some basics. if it's sufficient to change some imports; follow new rules from the header files and similar stuff I would like to have a look at it if possible.
I've downloaded latest SDK you posted here in the forums some days ago. I started playing with stream recorder module which might be something to start with to get what I want.
Only difference to my request is that it rips whole transponder. I would like to receive current channel only to be able to stream it over a network. I know nothing about transport streams so I don't know if there is other filter type needed to get only audio and video pids of current channel or it's better to parse the transport stream on my own. The streaming is completelly different story, I guess I have to look for it somewhere else.
if you can I appreciate some comments on this to see what I am able to do.
if there is any existing solution to my request let me know either please.

P4 3.0GHz 1024 MB of ram, nvidia Geforce 6600, SS2 rev 2.6, WDM drivers 4.41, SG2100, always latest DVBDream with the latest FFDshow.
pvdeejay
Home away from home
Posts: 69
Joined: Sat Jun 24, 2006 11:02 am
Location: slovakia
Contact:

Postby pvdeejay » Mon Jun 26, 2006 10:53 am

I compiled some examples from DD SDK 1.5 using delphi 6 on my own and I've also updated the first post in this thread. I am posting this only for those who are looking for new post only to see what's been changed. if it violates forum rules feel free to delete this.
thanks for support
P4 3.0GHz 1024 MB of ram, nvidia Geforce 6600, SS2 rev 2.6, WDM drivers 4.41, SG2100, always latest DVBDream with the latest FFDshow.
pvdeejay
Home away from home
Posts: 69
Joined: Sat Jun 24, 2006 11:02 am
Location: slovakia
Contact:

Postby pvdeejay » Tue Jun 27, 2006 7:13 am

hello
I spent some hours playing with DD api today and I've finally realized that when capturing full ts it means transport stream of the currently viewing channel. thus my question above is irrelevant.
I'll keep playing with it and searching for anyhowto on the streaming part. I hope I can come up with some simple broadcasting module soon. I am thinking about the very simple (unicast over rtp or http if possible). there is free VLC media player which is well-developed so I'll let this one do the rest to distribute the stream over the whole network.
P4 3.0GHz 1024 MB of ram, nvidia Geforce 6600, SS2 rev 2.6, WDM drivers 4.41, SG2100, always latest DVBDream with the latest FFDshow.
User avatar
rel
relocation
Posts: 2051
Joined: Fri Jun 16, 2006 9:50 am

Postby rel » Tue Jun 27, 2006 7:31 am

hi,

that old plugin was probably for dvbcore api.


I think you will need more than basic knowledge about TS.

filter type "FT_TSFULL" = receives only the pid you specified in TStartFilterParams. (for a tv channel , you would probably need to send PMT, Video,Audio pids to client)
DVB Dream - because I have to dream about having time to code it
dmz01
Just can't stay away
Posts: 32
Joined: Sun Jun 18, 2006 8:28 pm

Postby dmz01 » Tue Jun 27, 2006 10:30 am

Your best bet is to get the audio and video pids and to generate new PAT and PMT packets for those pids. Then send all four pids A/V/Pat/Pmt to the client. You would want to generate new Pats & Pmts as opposed to reusing the old ones if you're sending just one channel instead of all the channels from the current transpoder. Been there done that. ;)
pvdeejay
Home away from home
Posts: 69
Joined: Sat Jun 24, 2006 11:02 am
Location: slovakia
Contact:

Postby pvdeejay » Tue Jun 27, 2006 12:40 pm

hello again
now I am totally confused. I have tryed playing file captured using stream recorder module in VLC media player and the channel which I'd on the DD display while recording played fine. in the delphi example stream recorder module a filter type "FT_TSFULL" is used. I tryed demuxing stream-recorded file using PVAstrumento and it can also found only 1 video and 1 audio stream there.
so what am I mis understanding?
TStartfilterparams structure has only 1 wpid so how can I combine all the audio video and other needed pids (aid1 && vid && pmid)? how do I go about generating these new infos? where can I read something about it please?
and what about DVBcore.. can those plugins still be used? where can I get latest dvbcore.dll working with DD?
P4 3.0GHz 1024 MB of ram, nvidia Geforce 6600, SS2 rev 2.6, WDM drivers 4.41, SG2100, always latest DVBDream with the latest FFDshow.
User avatar
rel
relocation
Posts: 2051
Joined: Fri Jun 16, 2006 9:50 am

Postby rel » Tue Jun 27, 2006 4:40 pm

You must setup 1 filter for each pid you need. using same callback.

the pid number 0x2000 used in stream-recorder module has special meaning. It is used to get whole TS.

dd doesnt use dvbcore. (means dvbcore modules wont work)

try to find documants / specifications for DVB Transport Stream. (google)
DVB Dream - because I have to dream about having time to code it
pvdeejay
Home away from home
Posts: 69
Joined: Sat Jun 24, 2006 11:02 am
Location: slovakia
Contact:

Postby pvdeejay » Wed Jun 28, 2006 11:19 am

hello there.
I tryed runing seperate filters for each pid but I received only video stream. other ones were incomplete or at least seemed to be.

at first I retrieved info about the current channel, then started all the filters 1 after another... and then...

Code: Select all

var
chinfo: TChannelInfo;
sfp,v,pmt,ecm,emm: TStartFilterParams;
//.... skyp a part
chinfo.dwSize := sizeof(TChannelInfo);
SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_GET_CHANNEL_INFO, Integer(@chinfo));
//.... skip another part which is not related to this question
sfp.dwSize := sizeof(sfp);
sfp.wFilterType := FT_TSFULL;
sfp.wPID := chinfo.Audio.wCurrent; // $2000;
sfp.dwHookProc := @cb;
SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_START_FILTER, Integer(@sfp));
I let it runing for a while on FTA channel then stopped all the filters in the order like I've created them and I received the result which I described at the top of this post. I have ewen tryed another experiment - filtering only audio pid but on 192 kbps mpeg2 channel I've got only less than 50 kB per 30 seconds. there should be 24 kB per second as I know.
ok. maibe I'll more learning and experimenting. I just wanted to let you know that I am not as good as expected.

edit: oops, I have to read carefully next time. I wrote that code completelly wrong.
it should be

Code: Select all

sfp.wPID := chinfo.Audio.wPID[chinfo.Audio.wCurrent]; // $2000;
everything is there in the SDK. it's my fault :-(
now I have to get proper ECM because some channels which I have tryed returns 0 as ecm pid. I am not sure if more channels can share one pid only or zero means that such pid is missing. I am still not able to find a proper description using google so I'll try searching and experimenting again.

edit2:
yeah... :D i've got it. see here it's for absolute newbies like I am. there is sayd that pid 0 is the pat stream. so now I am capturing pat, pmt, PCR, current audio and current video and everything plays fine even with directshow filters in all the players incl. winamp. If anybody would like to have modded stream recorder module which captures this combination of streams, let me know. maibe DD should also record pat when recording in TS mode. this way a ts file can stay playable without further processing. now I am entering new phase :-) coombining this module with simple http server.
P4 3.0GHz 1024 MB of ram, nvidia Geforce 6600, SS2 rev 2.6, WDM drivers 4.41, SG2100, always latest DVBDream with the latest FFDshow.
User avatar
rel
relocation
Posts: 2051
Joined: Fri Jun 16, 2006 9:50 am

Postby rel » Thu Jun 29, 2006 12:37 pm

I hope you can find enough resource about streaming over net. VLC is open source, also there might be open source apps/plugins to do streaming.


DD displays video bitrate at status bar.
I am still not able to find a proper description using google so I'll try searching and experimenting again.
try to search for
is138181.pdf


ISO/IEC 13818-1
GENERIC CODING OF MOVING PICTURES AND
ASSOCIATED AUDIO: SYSTEMS
DVB Dream - because I have to dream about having time to code it

Return to “General”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest