#include <deliverymethod.h>
Data Fields | |
char * | mrl |
The media resource locator used to create the instance. | |
void(* | SendPacket )(struct DeliveryMethodInstance_t *this, TSPacket_t *packet) |
Send a packet. | |
void(* | SendBlock )(struct DeliveryMethodInstance_t *this, void *block, unsigned long blockLen) |
Send an opaque block of data. | |
void(* | DestroyInstance )(struct DeliveryMethodInstance_t *this) |
Destroy an instace of DeliveryMethodInstance_t. | |
void(* | ReserveHeaderSpace )(struct DeliveryMethodInstance_t *this, int packets) |
Reserves space for the specified number of packets at the start of the stream. | |
void(* | SetHeader )(struct DeliveryMethodInstance_t *this, TSPacket_t *packets, int count) |
Set the PAT and PMT header packets. |
Implementors should consider the following structure as the 'base class' and should extend it with the state they require for the output method. For example:
struct UDPOutputDeliveryMethodInstance_t { char *mrl; void (*SendPacket)(DeliveryMethodInstance_t *this, TSPacket_t packet); void (*DestroyInstance)(DeliveryMethodInstance_t *this); int tos; int packetsPerDatagram; Socket socketFD; int packetCount; char *buffer; }
void(* DeliveryMethodInstance_t::SendPacket)(struct DeliveryMethodInstance_t *this, TSPacket_t *packet) |
Send a packet.
this | The instance of the DeliveryMethodInstance_t to send the packet using. | |
packet | The packet to send. |
void(* DeliveryMethodInstance_t::SendBlock)(struct DeliveryMethodInstance_t *this, void *block, unsigned long blockLen) |
Send an opaque block of data.
this | The instance of the DeliveryMethodInstance_t to send the packet using. | |
block | Pointer to the data to send. | |
block_len | The length of the data in bytes to send. |
void(* DeliveryMethodInstance_t::DestroyInstance)(struct DeliveryMethodInstance_t *this) |
Destroy an instace of DeliveryMethodInstance_t.
this | The instance of the DeliveryMethodInstance_t to free. |
void(* DeliveryMethodInstance_t::ReserveHeaderSpace)(struct DeliveryMethodInstance_t *this, int packets) |
Reserves space for the specified number of packets at the start of the stream.
Until the header is set with SetHeader(), the header packets will be stuffing packets. This function must be called before any packets have been sent to this instance.
this | The instance of the DeliveryMethodInstance_t to apply this to. | |
packets | The number of packets to reserve space for. |
void(* DeliveryMethodInstance_t::SetHeader)(struct DeliveryMethodInstance_t *this, TSPacket_t *packets, int count) |
Set the PAT and PMT header packets.
This function can be called any time after a call to ReserveHeaderSpace().
this | The instance of the DeliveryMethodInstance_t to apply this to. | |
packets | The packets to write as the header. | |
count | The number of packets to write. |