RikWare
...

MPEG-2 Sections and Tables Byte Order

Sunday, 2 July 2006 12:33 by admin

I've slowly been continuing development on my BDA library (see Introduction To Scanning DVB-T Digital TV). Recently I've been working on getting program guide data from the Event Information Table (EIT). In directshow all of these MPEG-2 data tables are provided through the IMpeg2Data interface of the MPEG-2 Sections and Tables filter.

There's 3 methods that provide data GetTable, GetSections and GetStreamOfSections. Originally I was using GetTable and all was working fine, though I did notice I was getting some strange data through which I assumed was just part of the actual broadcasted data. I wanted to move over to using GetStreamOfSections as it provides a more asynchronous approach.

After some playing I got GetStreamOfSections working in .NET and suddenly discovered that the quality of my data suddenly improved. That strange data that I'd assumed was in the broadcast disappeared. This was excellent! Unfortunately I soon discovered that GetStreamOfSections seemed to break when the graph was retuned to a new frequency. I'll try to blog soon about that issue and what I did about it. For the moment all you need to know is that I ended up returning to the synchronous methods.

When I returned to using GetSection (I still don't really know the difference between GetTable and GetSection as they seem to return very similar data) I decided I would try to get to the bottom of the strange data issue. After stepping through the methods that parsed the MPEG-2 tables I discovered the length field being read from the data was significantly more than the length of data actually read. This explained the strange data - I was reading past the end of the data - but why was this wrong when it had been correct in the GetStreamOfSections case? A quick glance at the two values quickly showed that the byte order of the field read was incorrect!

Bingo! This would fix all my problems in one swoop.

But unfortunately further investigation discovered that it actually depended on which table I was reading as to whether the field was in the correct order or not! And furthermore sometimes the field and the data length supplied to me had no relation at all.

So unfortunately, that is where I'm at. I have guide data reading correctly. I have channel scanning working. But the data is still not reading 100% unless I use GetStreamOfSections which has its own issues (see non-existant future blog post for details). If anybody has any idea why this would be I'd love to hear it.

Categories:   General
Actions:   E-mail | del.icio.us | Permalink | Comments (13) | Comment RSSRSS comment feed

Comments

March 30. 2007 00:44

Unresolvable


RikWare had another problem with its commenting system. This only happened in some cases but should be all fixed up now so come back and comment on all those recent posts Smile



  

Unresolvable

April 8. 2007 23:24

Unresolvable


I've made some updates and re-enabled pingbacks. Hopefully spam will be reduced this time, but only time will tell...



  

Unresolvable

April 10. 2007 20:52

Unresolvable


Rob Mensching has outlined some info on the targets for WiX v3. (robmensching.com/.../WiX-v3-Roadmap-Draft.aspx)" rel="nofollow">robmensching.com/.../WiX-v3-Roadmap-Draft.aspx)" class="ExternalLink">robmensching.com/.../WiX-v3-Roadmap-Draft.aspx)" rel="nofollow">robmensching.com/.../WiX-v3-Roadmap-Draft.aspx) There's some good looking features in the roadmap. In particular I'm interested in the improved patch support and the expansion of ClickThrough support. The bootstrapper extensions sound good as well.



  

Congrats to the team for reaching the end of WiX v2.



  

Unresolvable

April 11. 2007 04:51

Unresolvable


I'm currently using http://www.nozbe.com/" class="ExternalLink">Nozbe to keep track of things I need to get done and I'm loving it. The app is easy to use, relatively quick and accessible everywhere.



  

Now Nozbe is still in beta which is fair enough. And I've recently tried to take advantage of the free upgrade offered as part of the beta testing. This upgrade lets me track more projects. Unfortunately, the "Add Project" feature is no longer working. Since this is a beta it doesn't bother me too much, but I'd like to submit the bug so a) it gets fixed and b) because as a developer I know that hearing about bugs is important.



  

BUT, this is where the real problem is. I can't easily submit a bug report! There's no link within the app itself. A bit of searching discovered the forum has a bug area. However, to write to the forum I have to sign up. At this point I gave up and figured that somebody else will report the bug. If this was my app I'd be really annoyed with me for taking advantage of the beta stage but not reporting bugs, but it's just too hard. I should be able to just click a link, write some details about the bug and submit. No extra signup (I'm already signed up to use the app!), no searching for where to report bugs.



  

Anyway... I guess it's a lesson learnt for me. I'll make sure that reporting bugs is obvious and easy with my apps so I can hear about the bugs, fix them and thank my beta testers for helping out.



  

Unresolvable

April 11. 2007 11:27

Unresolvable


With my PhD edging closer and closer to submission, I'm increasingly spending time thinking about my upcoming foray into the world of the micro ISVs. There's so many things that need to happen to take my current application and turn it into a product people would pay for. Luckily there's lots of info out there to help do that. Here's a few links to resources I'm finding helpful:



  

  • www.joelonsoftware.com/articles/fog0000000043.html" class="ExternalLink">The Joel Test - There's heaps of good stuff on Joel on Software but this stood out as some good thinking regarding improving the coding productivity. I'll be aiming to up the score on this a bit when I start.
  • http://momb.socio-kybernetics.net/" class="ExternalLink">The Museum of Modern Betas - Making things look good is tough for code monkeys like me but this site collects all the web 2.0 sites together in one nice list so I can browse through and steal ideas. Oh... and it's fun playing with some of the apps too.
  • http://www.squidoo.com/microisv-toolkit/" class="ExternalLink">The Micro ISV Toolkit - A set of links to stuff that's supposed to be helpful for micro ISVs. Some good, some not...



  

I'll probably drop some more links as I find them. Plus I'll aim to blog a bit about the micro ISV process as I go through it. Of course, sometime soon I'll actually announce what I'll be actually be releasing, but I'll wait until I've pushed the PhD out of the way first.



  

Unresolvable

August 15. 2007 03:48

Unresolvable


I've been quiet for awhile but not without reason. I've been hard at work converting www.rikware.com/WebLog/TV+Prognosticator.html" class="ExternalLink">TVP (our Imagine Cup entry from a few years ago) into a new product - www.rikpvr.com/" class="ExternalLink">RikPVR. I've just launched the beta program for RikPVR so if you have a digital TV card and you want to start using the easiest recording software available for it, go sign up for the www.rikpvr.com/Beta.aspx" class="ExternalLink">RikPVR beta program.



  

I've launched a new blog specifically for RikPVR over at www.rikpvr.com/blog.aspx." class="ExternalLink">http://www.rikpvr.com/blog.aspx. I'll be keeping this blog updated with major announcements, but if you want to keep right on top of RikPVR then subscribe over there as well.



  

Unresolvable

September 18. 2007 14:31

Unresolvable


Here's a somewhat interesting presentation about identity and the web which I felt was worth the time to watch (it wasn't too long) - http://identity20.com/media/OSCON2005/" rel="nofollow">http://identity20.com/media/OSCON2005/" class="ExternalLink">http://identity20.com/media/OSCON2005/" rel="nofollow">http://identity20.com/media/OSCON2005/



  

Well presented too!



  

Unresolvable

October 1. 2007 12:37

Unresolvable


There's a great interview with Herbie Hancock out on Wired - blog.wired.com/music/2007/10/herbie-hancock-.html" rel="nofollow">blog.wired.com/music/2007/10/herbie-hancock-.html" class="ExternalLink">blog.wired.com/music/2007/10/herbie-hancock-.html" rel="nofollow">blog.wired.com/music/2007/10/herbie-hancock-.html



  

Herbie is one of my favourite artists. I can't say I like all of his work, but I like a lot of it... and in many cases I like it a lot! I like looking at jazz legends and picking similarities between myself and then so I can keep deluding myself that one day I'll be able to play something like what I'd like to play (I'm a loooong way off that at the moment). In the case of Herbie I of course pick the fact that he did electrical engineering for awhile, and he obviously did it for a love of technology which led him to his later work as a synth pioneer.



  

Anyway, the interview's good. One point he makes which is very important for both mussos and tech people is this:



  

http://rikware.com/RikWik/Macro" rel="nofollow">http://rikware.com/RikWik/Macro" xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="nofollow">http://www.w3.org/1999/xhtml">My advice is, don't depend on the technology. 
The music has nothing to do with the technology.
If you're doing music, the music has to come first.
And the technology is a tool for being able to produce
the things that you feel. Not the other way around



  

This holds for programming too. The point is the end result, not what language or platform you use to get there. Obviously you need  to choose the best tools for the job, but ultimately the focus should be on what you're actually trying to do, not insisting on using your favourite tool, or the latest fad.



  

The other good one is something I've noticed in my own experiences too:



  
http://rikware.com/RikWik/Macro" rel="nofollow">http://rikware.com/RikWik/Macro" xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="nofollow">http://www.w3.org/1999/xhtml">Interviewer: As a young child, you had serious talent 
in the classical area, and a passion for electronics early too,
later double-majoring in music and electrical engineering. My
dad is also a pianist, and he also almost went into engineering
at one point.

Herbie: (laughs) I think there's a relationship: math.
Particularly with jazz, but not necessarily only with jazz,
with classical music too. There's also a sense of exploration
that's involved with science and with music that links them together.


  

Unresolvable

October 19. 2007 12:28

Unresolvable


RikPVR is now available to everyone. After a beta program including testers throughout Australia, the UK and Europe, RikPVR v1.0 has been released.



  

And to celebrate the release a special introductory price of $30 (Australian) is available till the end of November. This gives you enough time to download the free 30 day trial and still purchase RikPVR at a discounted price.



  

Head over to http://www.rikpvr.com/" rel="nofollow">http://www.rikpvr.com/" class="ExternalLink">http://www.rikpvr.com/" rel="nofollow">http://www.rikpvr.com/ to find out more.



  

Unresolvable

October 30. 2007 16:43

Unresolvable


http://www.urlrewriter.net/" class="ExternalLink">UrlRewriter.NET is a great tool for url rewriting in .NET. It can even be used to redirect domain names with.



  

e.g. RikPVR's main address is http://www.rikpvr.com/," rel="nofollow">http://www.rikpvr.com/," rel="nofollow">http://www.rikpvr.com/," rel="nofollow">http://www.rikpvr.com/," class="ExternalLink">http://www.rikpvr.com/," rel="nofollow">http://www.rikpvr.com/," rel="nofollow">http://www.rikpvr.com/," rel="nofollow">http://www.rikpvr.com/, but it can also be found at http://www.rikdvr.com/," rel="nofollow">http://www.rikdvr.com/," class="ExternalLink">http://www.rikdvr.com/," rel="nofollow">http://www.rikdvr.com/,http://rikdvr.com/" rel="nofollow">http://rikdvr.com/" class="ExternalLink">http://rikdvr.com/" rel="nofollow">http://rikdvr.com/ or http://rikpvr.com/" rel="nofollow">http://rikpvr.com/" class="ExternalLink">http://rikpvr.com/" rel="nofollow">http://rikpvr.com/ but ideally these should just redirect to the primary address. Using a host condition in UrlRewriter.NET makes this easy:



  
http://rikware.com/RikWik/Macro" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<if header="HOST" match="^((www.rikdvr.com)|(rikdvr.com)|(rikpvr.com))$">
  <redirect name="RikDVR" url="^(.*)$" to="http://www.rikpvr.com$1" />
</if>


  

Unresolvable

January 19. 2009 03:23

pingback

Pingback from keyongtech.com

How to obtain Program Guide in ATSC and DVB-T | keyongtech

keyongtech.com

March 27. 2010 01:10

Tommie Benje

I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites webpage list and will be checking back soon. Please check out my site as well and let me know what you think. % BLOGTITLE %

Tommie Benje

May 7. 2010 15:37

pingback

Pingback from condosencinitas.com

car insurance cheap quotes

condosencinitas.com

Comments are closed