DeliveryMethodInstance_t Struct Reference
[Delivery Method Management]

Structure to represent an instance of a delivery method. More...

#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.


Detailed Description

Structure to represent an instance of a delivery method.

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;
 }

Field Documentation

Send a packet.

Parameters:
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.

Parameters:
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.

Destroy an instace of DeliveryMethodInstance_t.

Parameters:
this The instance of the DeliveryMethodInstance_t to free.

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.

Parameters:
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().

Parameters:
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.


The documentation for this struct was generated from the following file:

Generated on Thu Jun 26 12:58:32 2008 for DVBStreamer by  doxygen 1.5.5