[mythtv] [PATCH] Big DVB Patch V3.5 - MPEG TS

Mark Anderson markjanderson at mail.com
Tue Jan 11 16:22:12 EST 2005


On Tue, 11 Jan 2005 09:11 pm, Tim Davies wrote:
> Okay, my trigger finger is worn out now!  It seems to change channels just
> fine, and switches between MPEG and AC3 without any problems.
>
> I must have changed channels 100 times and I haven't managed to trip it up
> yet.
>
> Now, if recording the TS doesn't require that bit of code, why would you
> need it with a filtered stream?  Weird!
>
Are you using SPDIF passthrough? If you are not, i.e using software AC3, then 
the audio rates and channels will be differenent between stations which will 
be enough for check audio params function to pick up the changed audio type 
and re-initialise. When using SPDIF passthrough the audio is set to 2 channel 
48000, which also happens to be what we get from the mpeg audio, and so a 
test on rate and channel is not enough to detect the changed audio type. This 
mught explain why I need the incCurrentAdio stream change and you do not. 
I'll have a look to see if there is a smater way to do this that will work 
with both. 

Cheers,
Mark Anderon
> Cheers
>
> Tim.
>
> > -----Original Message-----
> > From: mythtv-dev-bounces at mythtv.org
> > [mailto:mythtv-dev-bounces at mythtv.org] On Behalf Of Mark Anderson
> > Sent: Tuesday, 11 January 2005 5:28 PM
> > To: Development of mythtv
> > Subject: Re: [mythtv] [PATCH] Big DVB Patch V3.5 - MPEG TS
> >
> > On Tue, 11 Jan 2005 08:06 pm, Tim Davies wrote:
> > > Okay, I've been at it again.
> > >
> > >
> > >
> > > A few changes to get AC3 working properly in Australia, using the
> >
> > transport
> >
> > > stream.
> > >
> > > -          siparser.cpp and dvbrecorder.cpp now insert *all*
> > > descriptors from the PMT, not just the first
> > >
> > > -          mpegts.c looks for AC3 data in the private stream, and then
> > > treats it as AC3 data
> >
> > Does this rely on the hacked mpeg.c from the original patch?
> >
> > > Mark - I had to remove a small portion of your patch to get this to fly
> > > (the last hunk in my patch).  It was trying to change audio tracks at
> >
> > every
> >
> > > packet, and made for some interesting sound effects!
> >
> > That piece of code was a bit of trickery to get the audio to switch from
> > mpeg
> > to AC3 when the stream changed. As far as I understand there is only one
> > data
> > stream but two "logical" tracks are created in avformat decoder, one for
> > mpeg
> > and one fro AC3, the audio needs to be re-initialise when the data stream
> > changes type. I should have actually used setCurrentAudioTrack after
> > looking
> > up the audio track for the codec, but I was being lazy. I think with that
> > line removed you wont be able to switch between ac3 and mpeg stations.
> >
> > > I was wondering if the audio track selection code in your patch was
> > > actually doing much (for your setup).  I'm recording the TS so I get
> > > all audio tracks, but you should only be getting one recorded based on
> > > SetDemuxFilters in dvbrecorder.cpp.  That would make the choice rather
> > > simple.
> >
> > No, once you have selected an mpeg and an ac3 station you get two tracks
> >
> > > Anyway, apart from that small change, the audio track selection code
> >
> > seems
> >
> > > to do the trick.
> >
> > I am keen to look at this once I get the bloody transport.c thing worked
> > out,
> > which I think I have the solution to but am still testing at the moment.
> >
> >
> > Cheers
> > Mark
> >
> > > Tim.


More information about the mythtv-dev mailing list