mediastreamer2  2.9.1
Macros | Typedefs | Enumerations | Functions
msfilter.h File Reference

mediastreamer2 msfilter.h include file More...

#include "mscommon.h"
#include "msqueue.h"
#include "allfilters.h"
#include "msinterfaces.h"
Include dependency graph for msfilter.h:
This graph shows which files directly or indirectly include this file:

Macros

#define MS_FILTER_METHOD(_id_, _count_, _argtype_)   MS_FILTER_METHOD_ID(_id_,_count_,sizeof(_argtype_))
 
#define MS_FILTER_METHOD_NO_ARG(_id_, _count_)   MS_FILTER_METHOD_ID(_id_,_count_,0)
 
#define MS_FILTER_SET_SAMPLE_RATE   MS_FILTER_BASE_METHOD(0,int)
 
#define MS_FILTER_GET_SAMPLE_RATE   MS_FILTER_BASE_METHOD(1,int)
 
#define MS_FILTER_SET_BITRATE   MS_FILTER_BASE_METHOD(2,int)
 
#define MS_FILTER_GET_BITRATE   MS_FILTER_BASE_METHOD(3,int)
 
#define MS_FILTER_ADD_FMTP   MS_FILTER_BASE_METHOD(7,const char)
 
#define MS_FILTER_GET_LATENCY   MS_FILTER_BASE_METHOD(11,int)
 

Typedefs

typedef void(* MSFilterFunc) (struct _MSFilter *f)
 
typedef int(* MSFilterMethodFunc) (struct _MSFilter *f, void *arg)
 
typedef void(* MSFilterNotifyFunc) (void *userdata, struct _MSFilter *f, unsigned int id, void *arg)
 
typedef struct _MSFilterMethod MSFilterMethod
 
typedef enum _MSFilterCategory MSFilterCategory
 
typedef enum _MSFilterFlags MSFilterFlags
 
typedef struct _MSFilterDesc MSFilterDesc
 
typedef struct _MSFilter MSFilter
 
typedef struct _MSConnectionPoint MSConnectionPoint
 
typedef struct _MSConnectionHelper MSConnectionHelper
 
typedef enum _MSFilterInterfaceId MSFilterInterfaceId
 

Enumerations

enum  _MSFilterCategory {
  MS_FILTER_OTHER,
  MS_FILTER_ENCODER,
  MS_FILTER_DECODER,
  MS_FILTER_ENCODING_CAPTURER,
  MS_FILTER_DECODING_RENDERER
}
 
enum  _MSFilterFlags { MS_FILTER_IS_PUMP = 1 }
 
enum  _MSFilterInterfaceId { ,
  MSFilterPlayerInterface,
  MSFilterRecorderInterface,
  MSFilterVideoDisplayInterface ,
  MSFilterVideoDecoderInterface,
  MSFilterVideoCaptureInterface,
  MSFilterAudioDecoderInterface,
  MSFilterVideoEncoderInterface,
  MSFilterAudioCaptureInterface ,
  MSFilterAudioEncoderInterface
}
 

Functions

void ms_filter_register (MSFilterDesc *desc)
 
MSFilterDescms_filter_get_encoding_capturer (const char *mime)
 
MSFilterDescms_filter_get_decoding_renderer (const char *mime)
 
MSFilterDescms_filter_get_encoder (const char *mime)
 
MSFilterDescms_filter_get_decoder (const char *mime)
 
MSFilterDescms_filter_lookup_by_name (const char *filter_name)
 
MSFilterms_filter_create_encoder (const char *mime)
 
MSFilterms_filter_create_decoder (const char *mime)
 
bool_t ms_filter_codec_supported (const char *mime)
 
MSFilterms_filter_new (MSFilterId id)
 
MSFilterms_filter_new_from_name (const char *name)
 
MSFilterms_filter_new_from_desc (MSFilterDesc *desc)
 
int ms_filter_link (MSFilter *f1, int pin1, MSFilter *f2, int pin2)
 
int ms_filter_unlink (MSFilter *f1, int pin1, MSFilter *f2, int pin2)
 
int ms_filter_call_method (MSFilter *f, unsigned int id, void *arg)
 
int ms_filter_call_method_noarg (MSFilter *f, unsigned int id)
 
bool_t ms_filter_has_method (MSFilter *f, unsigned int id)
 
void ms_filter_set_notify_callback (MSFilter *f, MSFilterNotifyFunc fn, void *userdata)
 
MSFilterId ms_filter_get_id (MSFilter *f)
 
MSList * ms_filter_find_neighbours (MSFilter *me)
 
void ms_filter_destroy (MSFilter *f)
 
void ms_connection_helper_start (MSConnectionHelper *h)
 
int ms_connection_helper_link (MSConnectionHelper *h, MSFilter *f, int inpin, int outpin)
 Enter a MSFilter to be connected into the MSConnectionHelper object. More...
 
int ms_connection_helper_unlink (MSConnectionHelper *h, MSFilter *f, int inpin, int outpin)
 Enter a MSFilter to be disconnected into the MSConnectionHelper object. Process exactly the same way as ms_connection_helper_link() but calls ms_filter_unlink() on the entered filters.
 
void ms_filter_enable_statistics (bool_t enabled)
 Enable processing time measurements statistics for filters. More...
 
void ms_filter_reset_statistics (void)
 Reset processing time statistics for filters. More...
 
const MSList * ms_filter_get_statistics (void)
 Retrieves statistics for running filters. Returns a list of MSFilterStats.
 
void ms_filter_log_statistics (void)
 Logs runtime statistics for running filters. More...
 
void ms_filter_postpone_task (MSFilter *f, MSFilterFunc taskfunc)
 

Detailed Description

mediastreamer2 msfilter.h include file

This file provide the API needed to create, link, unlink, find and destroy filter.

It also provides definitions if you wish to implement your own filters.

Function Documentation

◆ ms_filter_postpone_task()

void ms_filter_postpone_task ( MSFilter f,
MSFilterFunc  taskfunc 
)

Allow a filter to request the ticker to call him the tick after. The ticker will call the taskfunc prior to all filter's process func.