[mythtv] Need help regarding AvFormatDecoder

Daniel Kristjansson danielk at cuymedia.net
Fri Oct 27 01:17:19 UTC 2006


On Thu, 2006-10-26 at 15:07 -0400, Mark Buechler wrote:
> Thanks for replying Daniel. My DVB provider has audio-only channels
> which have Artist/Album/Title information in plain text on a PID which
> I am now recording. I've modified dvbrecorder.cpp to record the PID
> and have verified it exists from the frontend. I need an entry point
> in avformatdecoder where I can parse the PID and send it off to the
> display in a simular manner as mythnotify. If you notice in the patch
> below the commented out lines in GetFrame I'm looking at the PID type
> for every call. So far I've only been able to see auto & video PIDs. 
Does your provider identify this PID somehow in the PMT or other table?
We don't want to hard code this type of functionality.

> Here's the patch I'm using:
> +    CODEC_ID_PRIVSEC= 0x18000,
<snip>
Ok, so this will let you pass the data along as a stream, like we
do the DVB subtitles. This is a viable option, but you might just
want to decode these strings in avformat and stick them in the context.
If you do want to pass the stream to avformatdecoder, you should
name it something other than PRIVSEC. Perhaps DVB_AUDIO_INFO?

> +        case CODEC_ID_PRIVSEC:          return "PRIVSEC";
> +        case CODEC_TYPE_PRIVSEC:       return "PrivSec";
Same as above. If you are going to pass this stream to avformatdecoder,
name it something better.

> @@ -857,6 +857,7 @@ static int is_desired_stream(int stream_ 
>          case STREAM_TYPE_AUDIO_AAC:
>          case STREAM_TYPE_AUDIO_AC3:
>          case STREAM_TYPE_AUDIO_DTS:
> +        case STREAM_TYPE_PRIVATE_SECTION:
This is no good, you need something more to identify the stream.
All kinds of data gets passed in private sections. We ran into
a problem with this when we first added DVB Subtitles and again
when we first added MHEG decoding.

I don't see why this is failing. It looks like you basically looked
at the DVB_SUBTITLE code for inspiration here, that should work.
You might want to look at the DVB_VBI code as well, it's a little
different in how the streams are added and might help. But I do
think you should think about just placing this info in the context,
look at how the program name is extracted from the SDT for an example.
(We don't use the SDT code in MythTV, but it should still be there
and is still used in the pure ffmpeg mpegts.c code.)

-- Daniel



More information about the mythtv-dev mailing list