PID Filtering


Data Structures

struct  PIDFilter_s
 Structure representing a PID Filter that belongs to a TS Filter. More...

Defines

#define PIDFilterFilterPacketSet(_pidfilter, _callback, _arg)   do{ (_pidfilter)->fpArg = _arg; (_pidfilter)->filterPacket = _callback; } while(0)
 Sets the filterpacket callback and user argument.
#define PIDFilterProcessPacketSet(_pidfilter, _callback, _arg)   do{ (_pidfilter)->ppArg = _arg; (_pidfilter)->processPacket = _callback; } while(0)
 Sets the processpacket callback and user argument.
#define PIDFilterOutputPacketSet(_pidfilter, _callback, _arg)   do{ (_pidfilter)->opArg = _arg; (_pidfilter)->outputPacket = _callback; } while(0)
 Sets the outputpacket callback and user argument.
#define PIDFilterTSStructureChangeSet(_pidfilter, _callback, _arg)   do{ (_pidfilter)->tscArg = _arg; (_pidfilter)->tsStructureChanged = _callback; } while(0)
 Sets the tsstructurechanged callback and user argument.
#define PIDFilterMultiplexChangeSet(_pidfilter, _callback, _arg)   do{ (_pidfilter)->mcArg = _arg; (_pidfilter)->multiplexChanged = _callback; } while(0)
 Sets the multiplexchanged callback and user argument.

Typedefs

typedef void(* MultiplexChanged )(struct PIDFilter_s *pidfilter, void *userarg, Multiplex_t *multiplex)
 Callback used to signal that the transport stream has changed to a new multiplex.
typedef void(* TSStructureChanged )(struct PIDFilter_s *pidfilter, void *userarg)
 Callback used to signal that a change has occured to the underlying structure of the transport stream.
typedef int(* PacketFilter )(struct PIDFilter_s *pidfilter, void *userarg, uint16_t pid, TSPacket_t *packet)
 Callback used to determine if a packet should be passed to the packet processor or output callbacks.
typedef TSPacket_t *(* PacketProcessor )(struct PIDFilter_s *pidfilter, void *userarg, TSPacket_t *packet)
 Callback used to process a packet, this is intended to be a function which needs more time to process a packet than just a simple filter.
typedef void(* PacketOutput )(struct PIDFilter_s *pidfilter, void *userarg, TSPacket_t *packet)
 Callback used to send a packet to an output destination.
typedef struct PIDFilter_s PIDFilter_t

Functions

PIDFilter_tPIDFilterAllocate (TSFilter_t *tsfilter)
 Allocate a PID filter for the specified TSFilter_t instance.
void PIDFilterFree (PIDFilter_t *pidfilter)
 Free a PIDFilter_t instance.
PIDFilter_tPIDFilterSetup (TSFilter_t *tsfilter, PacketFilter filterpacket, void *fparg, PacketProcessor processpacket, void *pparg, PacketOutput outputpacket, void *oparg)
 Creates and initialise a new PIDFIlter_t instance.

Variables

char PSISIPIDFilterType []
 PIDFilter type that processes PSI/SI data.

Define Documentation

#define PIDFilterFilterPacketSet ( _pidfilter,
_callback,
_arg   )     do{ (_pidfilter)->fpArg = _arg; (_pidfilter)->filterPacket = _callback; } while(0)

Sets the filterpacket callback and user argument.

Parameters:
_pidfilter The PIDFilter_t instance to set.
_callback The function to set as the filterpacket callback.
_arg The user argument to pass to the callback.

#define PIDFilterMultiplexChangeSet ( _pidfilter,
_callback,
_arg   )     do{ (_pidfilter)->mcArg = _arg; (_pidfilter)->multiplexChanged = _callback; } while(0)

Sets the multiplexchanged callback and user argument.

Parameters:
_pidfilter The PIDFilter_t instance to set.
_callback The function to set as the multiplexchanged callback.
_arg The user argument to pass to the callback.

#define PIDFilterOutputPacketSet ( _pidfilter,
_callback,
_arg   )     do{ (_pidfilter)->opArg = _arg; (_pidfilter)->outputPacket = _callback; } while(0)

Sets the outputpacket callback and user argument.

Parameters:
_pidfilter The PIDFilter_t instance to set.
_callback The function to set as the outputpacket callback.
_arg The user argument to pass to the callback.

#define PIDFilterProcessPacketSet ( _pidfilter,
_callback,
_arg   )     do{ (_pidfilter)->ppArg = _arg; (_pidfilter)->processPacket = _callback; } while(0)

Sets the processpacket callback and user argument.

Parameters:
_pidfilter The PIDFilter_t instance to set.
_callback The function to set as the processpacket callback.
_arg The user argument to pass to the callback.

#define PIDFilterTSStructureChangeSet ( _pidfilter,
_callback,
_arg   )     do{ (_pidfilter)->tscArg = _arg; (_pidfilter)->tsStructureChanged = _callback; } while(0)

Sets the tsstructurechanged callback and user argument.

Parameters:
_pidfilter The PIDFilter_t instance to set.
_callback The function to set as the tsstructurechanged callback.
_arg The user argument to pass to the callback.


Typedef Documentation

typedef void(* MultiplexChanged)(struct PIDFilter_s *pidfilter, void *userarg, Multiplex_t *multiplex)

Callback used to signal that the transport stream has changed to a new multiplex.

Parameters:
pidfilter The PID Filter this callback belongs to.
userarg A user defined argument.

typedef int(* PacketFilter)(struct PIDFilter_s *pidfilter, void *userarg, uint16_t pid, TSPacket_t *packet)

Callback used to determine if a packet should be passed to the packet processor or output callbacks.

Parameters:
pidFilter The PID Filter this callback belongs to.
userarg A user defined argument.
pid PID of the packet in question.
packet The packet in question.
Returns:
0 if the packet should not be processed/output, any other value if the packet should be passed on to the Packet processor callback if one exists, or to the output callback.

typedef void(* PacketOutput)(struct PIDFilter_s *pidfilter, void *userarg, TSPacket_t *packet)

Callback used to send a packet to an output destination.

Parameters:
pidFilter The PID Filter this callback belongs to.
userarg A user defined argument.
packet The packet to output.

typedef TSPacket_t*(* PacketProcessor)(struct PIDFilter_s *pidfilter, void *userarg, TSPacket_t *packet)

Callback used to process a packet, this is intended to be a function which needs more time to process a packet than just a simple filter.

Parameters:
pidFilter The PID Filter this callback belongs to.
userarg A user defined argument.
packet The packet in question.
Returns:
The packet to pass to the output callback, this can be null if no packet should be output. Returning the packet allows the processor to either return the original pointer or to insert a packet of its own creation.

typedef void(* TSStructureChanged)(struct PIDFilter_s *pidfilter, void *userarg)

Callback used to signal that a change has occured to the underlying structure of the transport stream.

Parameters:
pidfilter The PID Filter this callback belongs to.
userarg A user defined argument.


Function Documentation

PIDFilter_t* PIDFilterAllocate ( TSFilter_t tsfilter  ) 

Allocate a PID filter for the specified TSFilter_t instance.

Parameters:
tsfilter The TSFilter_t instance to allocate the PID filter for.
Returns:
A PIDFilter pointer or NULL if one could not be allocated.

void PIDFilterFree ( PIDFilter_t pidfilter  ) 

Free a PIDFilter_t instance.

Parameters:
pidfilter The instance to release.

PIDFilter_t* PIDFilterSetup ( TSFilter_t tsfilter,
PacketFilter  filterpacket,
void *  fparg,
PacketProcessor  processpacket,
void *  pparg,
PacketOutput  outputpacket,
void *  oparg 
)

Creates and initialise a new PIDFIlter_t instance.

Parameters:
tsfilter The TSFilter_t instance to allocate the PID filter for.
filterpacket The callback to use to filter packets.
fparg The user argument to pass to the filter packet callback.
processpacket The callback to use to proces packets.
pparg The user argument ot pass to the process packet callback.
outputpacket The callback to use to output packets.
oparg The user argument to pass to the output packet callback.
Returns:
A PIDFilter pointer or NULL if one could not be allocated.


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