New enhanced EPG

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

Moderators: Dreamer, FredB, X05

User avatar
rel
relocation
Posts: 2051
Joined: Fri Jun 16, 2006 9:50 am

Postby rel » Wed Jan 09, 2008 8:26 am

@rel

Some slightly probs with time and duration when i send an event to scheduler.
Time is about 1 hour 45 minutes back (here) and duration shows the endtime - not duration itself.

Internal i translate the given UNIX date/time from EPG to delphi's TDateTime - regard local offsets with DVBTimeToLocalTime from Helpers.pas.
When i use LocalTimeToDVBTime to convert back before sendig event the time will be more false then before...
it needs to be sent to DD in LocalTime (of that computer).

I have just tried and seems to work ok.

here is the code I have tried:

Code: Select all

var
tsr : TScheduledRecord;
begin
tsr.dwSize := sizeof(tsr);

// start a record 10 minutes later
tsr.dwStartTime := datetimetounix(now)+ 600;

// and stop the recording 20 minute later (duration = 10 minutes)
tsr.dwStopTime := datetimetounix(now)+ 1200;

tsr.dwChID := 1; // first channel in the channel list
SendMessage(fmain.Handle, WM_MODULE_MSG, DDMODAPI_ADD_SCHEDULED_RECORD, Integer(@tsr));
end;
600 means 600 seconds = 10 minutes
1200 means 1200 seconds = 20 minutes


{DDMODAPI_ADD_SCHEDULED_RECORD Parameters}

PScheduledRecord = ^TScheduledRecord;
TScheduledRecord = packed record
dwSize: DWORD;
dwStartTime: DWORD; {Date/time in Unix form}
dwStopTime: DWORD; {Date/time in Unix form}
dwChID: DWORD; {Channel ID}
end;

DVB Dream - because I have to dream about having time to code it
User avatar
ScanMan
love DVB Dream!
Posts: 191
Joined: Fri Sep 08, 2006 4:52 am
Location: 49565 Germany

DD_EPG V 1.06

Postby ScanMan » Wed Jan 09, 2008 10:49 am

What's new:

- Multilingual-Support (see below !)
- Set active channel with doubleclick (no more separate button)
- Text search on simple RETURN in the edit-box. (no more separate button)
- Set a filter now directly by changing a check-box (no more separate button)
- Selected eventlist position stays when new data arrived (no flip to the top)
- Make 'visible' what is selected (...ok, in Aqua yet) for further remote support

Unmark all filter-checkers will release the filter.
Give RETURN with an empty text will do also.
Or simply click again on the actual or another channel...

For Multilingual-Support i added some lines to the language.ini (her the english one):

EPG_FAV_NOT_USED=Not used
EPG_SEARCH_IN_NAME=in Name
EPG_SEARCH_IN_TEXT=in Text
EPG_SEARCH_BY_TEXT=with Text
EPG_ONLY_MARKED=only marked
EPG_CHLIST_EMPTY=Channel-List is empty
EPG_GLOBAL=global
EPG_FILTERMODE=Filter-Mode
EPG_NOT_AVAILABLE=not available
EPG_NO_SHORT_DESC=no short description
EPG_NO_EXT_DESC=no extended description

English and german file is included in the ZIP. If many users would be so kind to translate to teir according lang-file... Thx.

Next thing on top of my ToDo-List is adding remote capability.
Therfore i assume the following RMT-keys now:
- TAB >>> walking through the items
- Cursor up/down >>> selection in the lists
- Pause >>> mark a selected checker
- Maybe Opt 1 to x >>> select items directly without TAB
... or anything else.

Suggestions welcome !

:D
Attachments
DD_EPG_006.zip
(302.48 KiB) Downloaded 540 times
.
Visit the german DD-Forum: www.dvbdream.de
_________________________________________
90cm Dish on Rotor STAB HH 120 / Uni-LNB + 90cm Dish / Dual-Quad-LNB to 9/8 MultiSwitch for 23.5°E/19.2°E --- SkyStar 2, SkyStar USB-Box plus, TwinHan 1041 S2, Technotrend S-3200 S2, DVBWorld S2, Terratec Cinergy T USB XE --- a few PCs with AMD-CPU/ASUS-Boards from Athlon-2400+ to 64 X2 5600+, 1-2GB RAM, totally up to 2 TB HardDisk, nVidia Graphics. All using XP-Professional - everytime up2date
Ratibor
Just popping in
Posts: 5
Joined: Thu Jan 04, 2007 1:01 pm
Contact:

Postby Ratibor » Wed Jan 09, 2008 2:57 pm

Russian language not work in EPG.
Attachments
dd_epg_06.jpg
Russian charset not work
dd_epg_06.jpg (64.06 KiB) Viewed 11476 times
Compro VideoMate S350
User avatar
rel
relocation
Posts: 2051
Joined: Fri Jun 16, 2006 9:50 am

Postby rel » Wed Jan 09, 2008 4:06 pm

An other curios behavior:
When i first set the CallBack, delivering of data will stop after 1-2 seconds. For continuos reading i managed it like this: The Timer-routine checks a constantly incremented counter from the CallBack. if it stopps, i simply start the CallBack again.
Maybe that this little 'trick' causes some undefined behavior.
fixed but you must use the new parser commands.

add these constants to ModuleAPI.pas please
DDMODAPI_START_EPG2 = $00100055; {Starts EPG parser}
DDMODAPI_STOP_EPG2 = $00100056; {Stops EPG parser}


now you must send the callback address in STOP_EPG2 command too. (so that DD will be able to know which callback is going to be deactivated)

http://www.dvbdream.org/patches/dd_patch_080109.rar

(Dish Net EEPG should work now)

about other languages that uses non-latin alphabets. (i.e. chinese, russian, arabic) It needs some changes in DD and EPG parser to support unicode. ModuleAPI EPG commands might provide the texts as unicode to the modules soon.
DVB Dream - because I have to dream about having time to code it
CausticSoda
Just can't stay away
Posts: 42
Joined: Mon Dec 31, 2007 4:11 pm

Postby CausticSoda » Wed Jan 09, 2008 5:07 pm

RE: 006

A few problems still exist:

1) The EPG channel list still continuously updates and flips around so it is very difficult to use. SUGGESTION: Don't update that that control at all. Add a REFRESH button somewhere. If somebody wants it updated, they can click that. Note that its not a problem when the TP doesn't have much EPG info on it, but on a channel like WGN 239, there is a great deal of EPG info all coming at once.

2) The event list is not displaying/populating correctly. It shows only 2 events, followed by about a weeks worth of blank entries.

3) Loss of program control. DvbDream in its entirety becomes unresponsive and sluggish. This is likely related to the continuous updating of the control.

4) Program shutdown delayed. When the [X] on the main DD window is clicked, it will take as long as 60 seconds to clear the screen and exit.

Also, Rel's latest mods cause the program to go nuts when the EPG is activated. Picture and sound begin stuttering. However, there is still enough control (just barely) to terminate the program.

EDIT: I forgot to mention the duplicate channels listed. Note the picture. The main DD channel list does not show duplicates.
Attachments
epg.JPG
epg.JPG (71.21 KiB) Viewed 11455 times
Twinhan 1027
Dishpro LNB
User avatar
GrEaTwArRiOr
Just can't stay away
Posts: 34
Joined: Wed Jan 17, 2007 6:25 am

Postby GrEaTwArRiOr » Wed Jan 09, 2008 5:32 pm

@Scanman

there is still some GUI glitches in this release you can see the picture below...

Image

kindly is that possible you can implement this feature in the next release see the picture below its very handy though...:)

Image

and the schedule duration problem still occurs mate

thanks for the wonderfull module

regards,
Gr
Twinhan 1020A WDM Driver
Nilesat 101/102 & Atlantic Bird 4 at 7.0°W
Pentium4 3.2Ghz, 1 GB RAM, ATI 256MB Graphic Card, 120GB Sata HD
User avatar
GrEaTwArRiOr
Just can't stay away
Posts: 34
Joined: Wed Jan 17, 2007 6:25 am

Postby GrEaTwArRiOr » Wed Jan 09, 2008 5:49 pm

@CausticSoda

1. first time only flips around then stopped

2. I think its depend upon the provider sorry i have no clue :?:

3. here DVBDream stable

4. usual here there is no delay sorry...

5. there no stuttering or freeze...

6. and i don't have any duplicate channels in my list :arrow:

regards,
Gr
Twinhan 1020A WDM Driver
Nilesat 101/102 & Atlantic Bird 4 at 7.0°W
Pentium4 3.2Ghz, 1 GB RAM, ATI 256MB Graphic Card, 120GB Sata HD
CausticSoda
Just can't stay away
Posts: 42
Joined: Mon Dec 31, 2007 4:11 pm

Postby CausticSoda » Wed Jan 09, 2008 6:10 pm

@CausticSoda

1. first time only flips around then stopped

2. I think its depend upon the provider sorry i have no clue :?:

3. here DVBDream stable

4. usual here there is no delay sorry...

5. there no stuttering or freeze...

6. and i don't have any duplicate channels in my list :arrow:

regards,
Gr
I think it has to do with the number of channels processed. Take a look at the bottom status bar of mine. There are several thousand channels being processed even though there are only about 600 channels in the main DD list. On mine it continuously flips even though there are no extra channels being loaded.

EDIT: I'm not sure why we all seem to have different colors for the controls.
Twinhan 1027
Dishpro LNB
Dabbith
Not too shy to talk
Posts: 12
Joined: Tue Jan 08, 2008 11:10 am

Postby Dabbith » Wed Jan 09, 2008 6:21 pm

Caustic,

I just installed the new eit parser from the patches forum. It fixed the blank entries. Once the EPG got about 3 million events the CPU usage went down to a reasonable rate, the ch tot stayed at 4133 and the channel list stopped flipping and became usable. Let it sit for a while with the new parser dll and see what happens.

Though I do agree that it would be much better if the EPG didn't try to refresh so often (or at all) when getting so many events and that it should take it easier on the CPU.
Twinhan 1020A
ATI 2600XT
WinXP
Spaun 4x1 diseqc
82,91,110,119
User avatar
ScanMan
love DVB Dream!
Posts: 191
Joined: Fri Sep 08, 2006 4:52 am
Location: 49565 Germany

Postby ScanMan » Wed Jan 09, 2008 11:25 pm

@CausticSoda

1)
Normaly 'flipping' stops in the channel list when all existing CHs on the actual transponder are readed. This should take approx. max, 1 Minutes. When this behavior still exists it could be a prob with the TP ? I dont know - havnt this here on european satellites....

2)
All lines are handled exactly the same. It doesnt matter if line number is 1 or 111. If text isnt displayed correctly maybe there is no ? Also possible that this is not a correct standard EPG information.

3 + 4)
Please take a look a the bottom-line of the windwow: Left you see the numbers of total collected channels - here 3138. Right from ths you see the number of total collected EPG-events - here 206990 !!!
This is very very much ! How much satellites and tp's did you scan ? Take a look at the size of DD_EPG.DATA in \MODULES. Would be around 30 MB ? This big file is written at DD shutdown at this could take a while...

EDIT:
Maybe there could be a little time critical prob. I do check incoming data for existing and duplicate sets in the callback. Those hundredthousands entries will be checked every time when 'new' (or old) data come in.....
Havent got a clue yet to do this in another way.
.
Visit the german DD-Forum: www.dvbdream.de
_________________________________________
90cm Dish on Rotor STAB HH 120 / Uni-LNB + 90cm Dish / Dual-Quad-LNB to 9/8 MultiSwitch for 23.5°E/19.2°E --- SkyStar 2, SkyStar USB-Box plus, TwinHan 1041 S2, Technotrend S-3200 S2, DVBWorld S2, Terratec Cinergy T USB XE --- a few PCs with AMD-CPU/ASUS-Boards from Athlon-2400+ to 64 X2 5600+, 1-2GB RAM, totally up to 2 TB HardDisk, nVidia Graphics. All using XP-Professional - everytime up2date
User avatar
ScanMan
love DVB Dream!
Posts: 191
Joined: Fri Sep 08, 2006 4:52 am
Location: 49565 Germany

Postby ScanMan » Thu Jan 10, 2008 12:26 am

@rel

EITparser seems to work better now !

@GrEaTwArRiOr
Doing some 'cosmetics' is one of the last things on ToDo List :-)
Minimize to tray will be possible in a few days or so...
I just added col-sizing - but this is normally done by the programm.
If its only because the col-header... simply short the text in the language-ini to 'Dur.' !?


I had a very big bug because of reading the wrong list when handover data to the scheduler !
Start-date and -time is ok now, but still a prob stays with duration.
Please be patient - seems to be hopefully fixed soon.


There also seems to be a bug with duplicate entries. But this is NO BUG !
Every event has a unique number and i eliminate those while collecting data.
If there is an dup. event, it has am other number !
I can see it very good on some german tp'S: Seems to be the same, but short and / or extended description is mostly different !
.
Visit the german DD-Forum: www.dvbdream.de
_________________________________________
90cm Dish on Rotor STAB HH 120 / Uni-LNB + 90cm Dish / Dual-Quad-LNB to 9/8 MultiSwitch for 23.5°E/19.2°E --- SkyStar 2, SkyStar USB-Box plus, TwinHan 1041 S2, Technotrend S-3200 S2, DVBWorld S2, Terratec Cinergy T USB XE --- a few PCs with AMD-CPU/ASUS-Boards from Athlon-2400+ to 64 X2 5600+, 1-2GB RAM, totally up to 2 TB HardDisk, nVidia Graphics. All using XP-Professional - everytime up2date
User avatar
rel
relocation
Posts: 2051
Joined: Fri Jun 16, 2006 9:50 am

Postby rel » Thu Jan 10, 2008 1:51 am

2) The event list is not displaying/populating correctly. It shows only 2 events, followed by about a weeks worth of blank entries.
try the latest eitparser.dll patch
http://www.dvbdream.org/forum/viewtopic.php?t=1585
3) Loss of program control. DvbDream in its entirety becomes unresponsive and sluggish. This is likely related to the continuous updating of the control.
4) Program shutdown delayed. When the [X] on the main DD window is clicked, it will take as long as 60 seconds to clear the screen and exit.
Also, Rel's latest mods cause the program to go nuts when the EPG is activated. Picture and sound begin stuttering. However, there is still enough control (just barely) to terminate the program.
@Scanman,
I think it might need faster GUI components , maybe a way to do GUI updates less frequently.
alternative: the module could just regularly export the EPG data to a file, and GUI could be a seperate exe and it could read the EPG data from that file.


3 + 4)
Please take a look a the bottom-line of the windwow: Left you see the numbers of total collected channels - here 3138. Right from ths you see the number of total collected EPG-events - here 206990 !!!
This is very very much ! How much satellites and tp's did you scan ? Take a look at the size of DD_EPG.DATA in \MODULES. Would be around 30 MB ? This big file is written at DD shutdown at this could take a while...
ideas:
1) an option to ignore the unknown channels or an option to only process the favorite channels might be added.
2) the epg data might be collected in the memory and written to the file compressed. (there must be alot of simple text compression algorithms) This could reduce the time spent while loading at startup too?
DVB Dream - because I have to dream about having time to code it
CausticSoda
Just can't stay away
Posts: 42
Joined: Mon Dec 31, 2007 4:11 pm

Postby CausticSoda » Thu Jan 10, 2008 4:20 am

It definitely continuously updates even when there are no channel additions. There is no reason for that.

ScanMan, how are you writing that file at the end? Is it a flat file or some kind of database? Could you pop up a "Please wait, saving EPG" message during this time?

Rel, that is the same eit that you posted above. It makes it crash worse over here. Is there a new one that I missed?

EDIT: The problem seems to be that it steps up its own CPU priority to realtime because when a large bandwidth EPG comes in, it freezes the mouse. The mouse can be awoken, but being that the mouse is a very high priority, it should never freeze. The cpu indicator usually indicates about 100%. I am using an athlon 2400 XP. Normally, I can open 9 pips at once with no problem.

Also, I have noticed several of the channels now have the full 9 days in them.
Twinhan 1027
Dishpro LNB
User avatar
ScanMan
love DVB Dream!
Posts: 191
Joined: Fri Sep 08, 2006 4:52 am
Location: 49565 Germany

Postby ScanMan » Thu Jan 10, 2008 5:12 am

@Scanman,
I think it might need faster GUI components , maybe a way to do GUI updates less frequently.
alternative: the module could just regularly export the EPG data to a file, and GUI could be a seperate exe and it could read the EPG data from that file.
Stuttering, beeing slow or hangups should / could not be a GUI-prob or depending on the EPG itself.
I do collect data as follows in the callback-routine:

- Is GUI 'working' (update / select / delete old data...) ?
- if YES (there's a 'irgnore-data' flag) exit immedeatly to DD !
(no more consideration of incoming data)
- Is date/time + duration older then actual time ?
- if YES (we dont need them) exit immedeatly to DD !
(no more consideration of incoming data)
- Is channel-data already listed in buffer ?
- If NOT, amount memory and copy data and remind pointer to that
+ set a flag 'new ch-data'
- If YES remind pointer to that
- Compare event-ID of incoming data with listed event-IDs of 'actual' channel
(This is a loop - normally i dont have more than 300-400 events per channel !)
(So NOT all events a searched for !)
- event-ID found ?
If YES (we already have it) exit immedeatly to DD !
If NOT, amount memory and copy data
+ set a flag 'new event-data'
- exit to DD

Thats all. As you can see there are only a few steps what the callbach-routine have to do.
IT IS NEVER BLOCKED BY ANY GUI-RELATED FUNCTION !

The buffer is totaly independent from the rest of the programm.
To Display, filter, select, deleted and other things i do it this way:

- Every 500ms a timer set the 'ignore-data' flag first so that the callback isnt block or interfered in any way.

- Now i loop through all channels witheir all events and take a look at the date/time. If older than actual date/time, those events are deleted from buffer. So normally the list / file couldnt rise up to the moon.

- Next is checking the 'new-ch-data' flag. Only if set the ch-list will be updated. Normaly this happens periodicly only after the first minutes you read a new (not yet readed !) channel. After a short while the list normally should not more updated.

!!! I will implementd a routine thats checks if the 'new' channel is in a possible filter-list (from favorites) and so the list doesnt need to be updated. Should reduce 'flipping' on / by non-selected channels.

- Same procedure for event-Data.

All data-handling happen in memory ! Nothing will be written to disk until DD (not the EPG !) is closed.


The file & size:
When i often zap through channels on ASTRA 19.2°/23.5° (europe's most used satellite-family !) i will collect around 300-400 channles within 30.000 - 40.000 events. Not more. Filesize then is around 3.5 to 4.5 MB - depending on available short- and extended description. Not more. This causes a little 'slowdown' less than 2 seconds during start and closing of DD. Not more. That seems to be quite normal. The delay could be read in / from DD's log-file ???

Storing / loding the file:
- Number of channels
- Outer loop for channels:
- some IDs and references
- Provider- and channel-name ONLY IN EFFECTIVE LENGTH ! (not the array-length)
- Innerloop for events per channel:
- some IDs and references
- Name, short- and extended description ONLY IN EFFECTIVE LENGTH ! (not the array-length)
(if no name or description, nothing will saved readed !)

As you can see, i already do something like lightly compression...
When i write the complete array-lengthes, the file (same as mentioned above) rises up to 80 - 110 MB !!! A little bit to big...

If somebody has some more effective ideas - let me know.
.
Visit the german DD-Forum: www.dvbdream.de
_________________________________________
90cm Dish on Rotor STAB HH 120 / Uni-LNB + 90cm Dish / Dual-Quad-LNB to 9/8 MultiSwitch for 23.5°E/19.2°E --- SkyStar 2, SkyStar USB-Box plus, TwinHan 1041 S2, Technotrend S-3200 S2, DVBWorld S2, Terratec Cinergy T USB XE --- a few PCs with AMD-CPU/ASUS-Boards from Athlon-2400+ to 64 X2 5600+, 1-2GB RAM, totally up to 2 TB HardDisk, nVidia Graphics. All using XP-Professional - everytime up2date
CausticSoda
Just can't stay away
Posts: 42
Joined: Mon Dec 31, 2007 4:11 pm

Postby CausticSoda » Thu Jan 10, 2008 3:09 pm

Scanman,

Instead of holding up DD, I suggest you only allow it to process a certain number of calls per second (or 1/100th second), then ignore the rest for a while.

You were right about the file size. It was about 30Mb. If you are writing/reading that at exit/startup, then that could be a problem. I have a crash report I can post if it will help.

From your description, it sounds like you are collecting the whole EPG in memory and then writing/read it all at once. May I suggest that once you have a full 9 days collected for any particular channel that you write it to the database and then mark a flag for that channel so that further packets for that channel will be ignored for one hour.

That way, the file is written on the fly and there is no need for an exit delay. On startup, the program would read just the file index header and determine which channels need updating. The EPG needs only to collect data that is not already in the file. So if only the last day needs to be collected, then only the last day gets accepted from the stream and added to memory.

Hope that helps. Its a great program, but as of right now, it chokes on high bandwidth EEPG transponders.
Twinhan 1027
Dishpro LNB

Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest