dvbbasebin questions

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

dvbbasebin questions

Tony Houghton
I'd like to write a gstreamer-based DVB application, and I've got some
questions about dvbbasebin because I can't find documentation for it.

1. I'll want to get information from the EIT (and maybe some other
tables) while streaming programs. I presume that's quite straightforward
by accessing dvbbasebin's child dvbsrc and mpegtsparse elements?

2. AIUI an MPEG TS stream (eg when recording it or when starting to
stream a live program to a player) should start with a PAT and PMT and
the substream for each pid should start with a packet whose PUSI is set,
and video substreams should also start with a key frame. Does dvbbasebin
meet those conditions?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dvbbasebin questions

Carlos Rafael Giani
> 1. I'll want to get information from the EIT (and maybe some other
> tables) while streaming programs. I presume that's quite straightforward
> by accessing dvbbasebin's child dvbsrc and mpegtsparse elements?

IIRC ETI information is sent to the gst bus.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dvbbasebin questions

Alberto Milla
Here, you can find an example:

http://git.hardeman.nu/?p=dvbupnp.git;a=blob;f=dvbscan.c;h=1fa6c08dcbf62ee92157d76e3cc0bffaaa7adab0;hb=6cdc54922f504f55d555096ae57b34581566c235

On 14 March 2011 10:06, dv <[hidden email]> wrote:

>> 1. I'll want to get information from the EIT (and maybe some other
>> tables) while streaming programs. I presume that's quite straightforward
>> by accessing dvbbasebin's child dvbsrc and mpegtsparse elements?
>
> IIRC ETI information is sent to the gst bus.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dvbbasebin questions

Tony Houghton
On Mon, 14 Mar 2011 10:26:30 +0100
Alberto Milla <[hidden email]> wrote:

> Here, you can find an example:
>
> http://git.hardeman.nu/?p=dvbupnp.git;a=blob;f=dvbscan.c;h=1fa6c08dcbf62ee92157d76e3cc0bffaaa7adab0;hb=6cdc54922f504f55d555096ae57b34581566c235
>
> On 14 March 2011 10:06, dv <[hidden email]> wrote:
> >> 1. I'll want to get information from the EIT (and maybe some other
> >> tables) while streaming programs. I presume that's quite
> >> straightforward by accessing dvbbasebin's child dvbsrc and
> >> mpegtsparse elements?
> >
> > IIRC ETI information is sent to the gst bus.

Thanks. So it looks like dvbsrc does all the low-level parsing itself.
The trouble with that is I want to handle LCNs and other non-standard
SI, in particular Freesat and Freeview in the UK. Freesat uses
non-standard PIDs for the SDT and EIT schedule, and private descriptors
in the BAT for LCNs.  Freeview uses private descriptors in the NIT for
LCNs.

What would be the best way of accessing this info? Would dvbsrc send
"unknown sections" to the gst bus which I would be able to parse? And
can I get it to do this (adding extra pids etc) to a dvbsrc that's a
child of dvbbasebin?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dvbbasebin questions

Tony Houghton
In reply to this post by Alberto Milla
On Mon, 14 Mar 2011 10:26:30 +0100
Alberto Milla <[hidden email]> wrote:

> Here, you can find an example:
>
> http://git.hardeman.nu/?p=dvbupnp.git;a=blob;f=dvbscan.c;h=1fa6c08dcbf62ee92157d76e3cc0bffaaa7adab0;hb=6cdc54922f504f55d555096ae57b34581566c235

What's the URL for cloning that repository? The gitweb doesn't say!

> On 14 March 2011 10:06, dv <[hidden email]> wrote:
> >> 1. I'll want to get information from the EIT (and maybe some other
> >> tables) while streaming programs. I presume that's quite straightforward
> >> by accessing dvbbasebin's child dvbsrc and mpegtsparse elements?
> >
> > IIRC ETI information is sent to the gst bus.

I wrote a small test program in python, based on what I learnt from the
dvbscan.c code; I've attached it. The mpegtsparse element doesn't seem
to be working at all; the only ELEMENT messages I'm getting are
dvb-adapter and dvb-frontend-stats which I think come from dvbsrc, not
mpegtsparse. And mpegtsparse doesn't create any pads. If I don't include
the extra video/audio pids as well as the SI pids I get a
dvb-read-failure ELEMENT message.

Another oddity is that I originally used
set_properties("adapter", adapter, "frontend", frontend) instead of a
separate set_property for each property, but it didn't work. The adapter
number stayed 0 after I had set it to 1 (also if I reordered the
properties so adapter came after frontend).

Also, why is the "pids" property write-only? In a complex application it
would be nice to know what the pids already are to make sure different
functions don't conflict with each other.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

analyse-t.py (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: dvbbasebin questions

Tony Houghton
On Wed, 16 Mar 2011 00:13:31 +0000
Tony Houghton <[hidden email]> wrote:

> I wrote a small test program in python, based on what I learnt from
> the dvbscan.c code; I've attached it. The mpegtsparse element doesn't
> seem to be working at all; the only ELEMENT messages I'm getting are
> dvb-adapter and dvb-frontend-stats which I think come from dvbsrc, not
> mpegtsparse. And mpegtsparse doesn't create any pads. If I don't
> include the extra video/audio pids as well as the SI pids I get a
> dvb-read-failure ELEMENT message.

I spotted my own mistake, I only set the dvbsource to STATE_PLAYING
instead of the pipeline. It's working now. I still get the
dvb-read-failure messages if I only include SI pids but it seems
harmless and I get the section messages OK.

I'm still puzzled by the other two issues though:

> Another oddity is that I originally used
> set_properties("adapter", adapter, "frontend", frontend) instead of a
> separate set_property for each property, but it didn't work. The
> adapter number stayed 0 after I had set it to 1 (also if I reordered
> the properties so adapter came after frontend).
>
> Also, why is the "pids" property write-only? In a complex application
> it would be nice to know what the pids already are to make sure
> different functions don't conflict with each other.

The most useful aspect of being able to read pids would be so that I
could use a dvbbasebin to stream or record a programme and add EIT pids
to its child dvbsrc to "harvest" the EPG at the same time.

Or is it possible to use two dvbsrc elements on the same adapter and
frontend simultaneously?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dvbbasebin questions

Alberto Milla
I'm afraid that I can't give you a good answer, because my experience
with gstreamer and DVB-T are quite short. Then be careful.

When you say "dvbsrc does all the low-level parsing itself". I
disagree IMHO, the EIT parsing is done in mpegtsparse

- http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst/mpegdemux/mpegtsparse.c?id=RELEASE-0.10.21

If you look at "mpegts_parse_handle_psi" function, there classifies
the type of table that has arrived. If Freeview is not DVB-T compliant
I think that is there where you will have to modify the code. In the
case of Freesat I can't give you any answer because I have only worked
with the terrestrial standard.

Continuing with the program recording and the EPG data extraction. In
France for example, they send all the channels' schedule by all the
multiplex, however in Spain the only send the schedule of the channels
that form the multiplex at you are listen to. Reading you question It
looks like the UK system is like the spanish. I think the solution is
in the tuner, if you use a simple tuner you can't get two dvbsrc, but
if you have a dual digital tuner it must be possible.



On 16 March 2011 15:09, Tony Houghton <[hidden email]> wrote:

> On Wed, 16 Mar 2011 00:13:31 +0000
> Tony Houghton <[hidden email]> wrote:
>
>> I wrote a small test program in python, based on what I learnt from
>> the dvbscan.c code; I've attached it. The mpegtsparse element doesn't
>> seem to be working at all; the only ELEMENT messages I'm getting are
>> dvb-adapter and dvb-frontend-stats which I think come from dvbsrc, not
>> mpegtsparse. And mpegtsparse doesn't create any pads. If I don't
>> include the extra video/audio pids as well as the SI pids I get a
>> dvb-read-failure ELEMENT message.
>
> I spotted my own mistake, I only set the dvbsource to STATE_PLAYING
> instead of the pipeline. It's working now. I still get the
> dvb-read-failure messages if I only include SI pids but it seems
> harmless and I get the section messages OK.
>
> I'm still puzzled by the other two issues though:
>
>> Another oddity is that I originally used
>> set_properties("adapter", adapter, "frontend", frontend) instead of a
>> separate set_property for each property, but it didn't work. The
>> adapter number stayed 0 after I had set it to 1 (also if I reordered
>> the properties so adapter came after frontend).
>>
>> Also, why is the "pids" property write-only? In a complex application
>> it would be nice to know what the pids already are to make sure
>> different functions don't conflict with each other.
>
> The most useful aspect of being able to read pids would be so that I
> could use a dvbbasebin to stream or record a programme and add EIT pids
> to its child dvbsrc to "harvest" the EPG at the same time.
>
> Or is it possible to use two dvbsrc elements on the same adapter and
> frontend simultaneously?
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dvbbasebin questions

Tony Houghton
On Wed, 16 Mar 2011 23:40:39 +0100
Alberto Milla <[hidden email]> wrote:

> I'm afraid that I can't give you a good answer, because my experience
> with gstreamer and DVB-T are quite short. Then be careful.
>
> When you say "dvbsrc does all the low-level parsing itself". I
> disagree IMHO, the EIT parsing is done in mpegtsparse

Yes, I think I was wrong about that, it makes more sense that
mpegtsparse would do this.

> If you look at "mpegts_parse_handle_psi" function, there classifies
> the type of table that has arrived. If Freeview is not DVB-T compliant
> I think that is there where you will have to modify the code. In the
> case of Freesat I can't give you any answer because I have only worked
> with the terrestrial standard.

I checked Freeview today. mpegtsparse does parse its LCN descriptors
:-). I don't know about Freesat yet, I'll check that shortly.

> Continuing with the program recording and the EPG data extraction. In
> France for example, they send all the channels' schedule by all the
> multiplex, however in Spain the only send the schedule of the channels
> that form the multiplex at you are listen to. Reading you question It
> looks like the UK system is like the spanish. I think the solution is
> in the tuner, if you use a simple tuner you can't get two dvbsrc, but
> if you have a dual digital tuner it must be possible.

Both Freeview and Freesat send the entire schedule on each transponder.
However, I want to read EIT tables at the same time as streaming/
recoding video from the same tuner. As a dvbsrc's pids property is
write-only I can't read which pids a dvbbasebin has chosen and add the
EIT pids to it.  Maybe dvbbasebin adds EIT pids anyway, but that won't
work for Freesat due to its non-standard pids.

After thinking about it a bit deeper, I don't think it will be possible
to have two dvbsrc objects on the same tuner because a frontend only
allows one pseudo-file handle at a time.

So I probably won't be able to use dvbbasebin; I'll just have to parse
the PAT and PMT and select the video and audio pids for dvbsrc myself.

> On 16 March 2011 15:09, Tony Houghton <[hidden email]> wrote:
> > On Wed, 16 Mar 2011 00:13:31 +0000
> > Tony Houghton <[hidden email]> wrote:
> >
> >> I wrote a small test program in python, based on what I learnt from
> >> the dvbscan.c code; I've attached it. The mpegtsparse element doesn't
> >> seem to be working at all; the only ELEMENT messages I'm getting are
> >> dvb-adapter and dvb-frontend-stats which I think come from dvbsrc, not
> >> mpegtsparse. And mpegtsparse doesn't create any pads. If I don't
> >> include the extra video/audio pids as well as the SI pids I get a
> >> dvb-read-failure ELEMENT message.
> >
> > I spotted my own mistake, I only set the dvbsource to STATE_PLAYING
> > instead of the pipeline. It's working now. I still get the
> > dvb-read-failure messages if I only include SI pids but it seems
> > harmless and I get the section messages OK.
> >
> > I'm still puzzled by the other two issues though:
> >
> >> Another oddity is that I originally used
> >> set_properties("adapter", adapter, "frontend", frontend) instead of a
> >> separate set_property for each property, but it didn't work. The
> >> adapter number stayed 0 after I had set it to 1 (also if I reordered
> >> the properties so adapter came after frontend).
> >>
> >> Also, why is the "pids" property write-only? In a complex application
> >> it would be nice to know what the pids already are to make sure
> >> different functions don't conflict with each other.
> >
> > The most useful aspect of being able to read pids would be so that I
> > could use a dvbbasebin to stream or record a programme and add EIT pids
> > to its child dvbsrc to "harvest" the EPG at the same time.
> >
> > Or is it possible to use two dvbsrc elements on the same adapter and
> > frontend simultaneously?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dvbbasebin questions

Tony Houghton
On Thu, 17 Mar 2011 00:13:40 +0000
Tony Houghton <[hidden email]> wrote:

> I checked Freeview today. mpegtsparse does parse its LCN descriptors
> :-). I don't know about Freesat yet, I'll check that shortly.

Not so good news with Freesat. mpegtsparse doesn't post any messages
about its non-standard BAT or EIT. It does recognise the SDT on its
non-standard pid though, so I think mpegtsparse simply doesn't recognise
BAT at all. I'll have to write a special version of mpegtsparse (or
derive from it, depending on how it's designed) for Freesat tables.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: dvbbasebin questions

Fabrizio Milo aka misto
I have an improved version of dvbsrc not yet released to the public
that accepts fine tuned pids and buffer sizes.
I will post a message when I push it to GitHub so you can test it on DVB-T.

Fabrizio
--------------------------
Luck favors the prepared mind. (Pasteur)
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel