August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)
A component for demultiplexing packets by packet ID (PID) from DVB/MPEG transport streams. Provides this as a service, to which other components can subscribe as clients, requesting to receive packets with certain PIDs.
See Kamaelia.Device.DVB.Receiver for examples of use.
DemuxerService takes MPEG transport stream packets, sent to its "inbox" inbox and determines the packet ID (PID) of each, then distributes them to all clients who are after packets with that PID.
To be a client, send a 'ADD' or 'REMOVE' message to the "request" inbox, requesting to be sent (or no longer be sent) packets with particular PIDs, and specifying the inbox to which you want the packets to be sent. The format of these requests is:
("ADD", [pid, pid, ...], (dest_component, dest_inboxname))
("REMOVE", [pid, pid, ...], (dest_component, dest_inboxname))
DemuxerService will automatically do the wiring or unwiring needed to ensure the packets you have requested get sent to the inbox you specified.
Send an 'ADD' request, and you will immediately start receiving packets with those PIDs. Send a 'REMOVE' request and you will shortly no longer receive packets with the PIDs you specify. Note that you may still receive some packets after your 'REMOVE' request.
DemuxerService sends its own identical format 'ADD' and 'REMOVE' requests out of its "pid_request" outbox. Wire this to the source of MPEG transport stream packets, if that source needs to know what PIDs it is expected to provide.
This component will terminate if a shutdownMicroprocess or producerFinished message is sent to the "control" inbox. The message will be forwarded on out of the "signal" outbox just before termination.
When it terminates, this component will unwire itself from all clients to which it has been sending packets.
DemuxerService() -> new DemuxerService component.
Demultiplexes packets from an MPEG transport stream, sent to its "inbox" inbox and sends them, based on their packet ID (PID) to client who have requested to receive packets with that PID.
Warning!
You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers.
Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!
Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.
-- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT