GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
redirect_av.c File Reference
#include <stdlib.h>
#include "ts_muxer.h"
#include "ffmpeg_ts_muxer.c"
#include <libavcodec/avcodec.h>
#include <libswscale/swscale.h>
#include <libavutil/avutil.h>
#include <unistd.h>
#include <libavutil/pixfmt.h>
+ Include dependency graph for redirect_av.c:

Macros

#define USE_GPAC_MPEG2TS
 
#define REDIRECT_AV_AUDIO_ENABLED   1
 
#define TS_PACKETS_PER_UDP_PACKET   1
 
#define audioCodecBitrate   96000
 
#define AVR_TIMERS_LENGHT   25
 
#define U32_ABS(a, b)   (a > b ? a - b : b - a)
 
#define DUMP_MP3
 
#define VIDEO_RATE   400000
 
#define AVR_DEFAULT_DESTINATION   "udp://224.0.0.1:1234"
 

Functions

static u32 audio_encoding_thread_run (void *param)
 
static u32 video_encoding_thread_run (void *param)
 
static Bool start_if_needed (GF_AVRedirect *avr)
 
static GF_Err avr_open (GF_AVRedirect *avr)
 
static void avr_on_audio_frame (void *udta, char *buffer, u32 buffer_size, u32 time, u32 delay_ms)
 
static void avr_on_audio_reconfig (void *udta, u32 samplerate, u32 bits_per_sample, u32 nb_channel, u32 channel_cfg)
 
static void avr_on_video_frame (void *udta, u32 time)
 
static void avr_on_video_reconfig (void *udta, u32 width, u32 height, u8 bpp)
 
static void avr_close (GF_AVRedirect *avr)
 
static Bool avr_on_event (void *udta, GF_Event *evt, Bool consumed_by_compositor)
 
static Bool avr_process (GF_TermExt *termext, u32 action, void *param)
 
GF_TermExt * avr_new ()
 
void avr_delete (GF_BaseInterface *ifce)
 
const u32QueryInterfaces ()
 
GF_BaseInterfaceLoadInterface (u32 InterfaceType)
 
void ShutdownInterface (GF_BaseInterface *ifce)
 

Variables

static const u32 maxFPS = 25
 
static const char * moduleName = "AVRedirect"
 
static const char * AVR_VIDEO_CODEC_OPTION = "VideoCodec"
 
static const char * possibleCodecs = "supported codecs : MPEG-1, MPEG-2, MPEG-4, MSMPEG-4, H263, H263I, H263P, RV10, MJPEG"
 
static const char * AVR_ENABLED_OPTION = "Enabled"
 
static const char * AVR_DESTINATION = "destination"
 

Macro Definition Documentation

#define USE_GPAC_MPEG2TS
#define REDIRECT_AV_AUDIO_ENABLED   1
#define TS_PACKETS_PER_UDP_PACKET   1
#define audioCodecBitrate   96000
#define AVR_TIMERS_LENGHT   25
#define U32_ABS (   a,
 
)    (a > b ? a - b : b - a)
#define DUMP_MP3
#define VIDEO_RATE   400000
#define AVR_DEFAULT_DESTINATION   "udp://224.0.0.1:1234"

Function Documentation

static u32 audio_encoding_thread_run ( void *  param)
static

This thread sends the frame to TS mux

Parameters
paramThe GF_AVRedirect pointer

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 video_encoding_thread_run ( void *  param)
static

This thread sends the frame to TS mux

Parameters
paramThe GF_AVRedirect pointer

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool start_if_needed ( GF_AVRedirect avr)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err avr_open ( GF_AVRedirect avr)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avr_on_audio_frame ( void *  udta,
char *  buffer,
u32  buffer_size,
u32  time,
u32  delay_ms 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avr_on_audio_reconfig ( void *  udta,
u32  samplerate,
u32  bits_per_sample,
u32  nb_channel,
u32  channel_cfg 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avr_on_video_frame ( void *  udta,
u32  time 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avr_on_video_reconfig ( void *  udta,
u32  width,
u32  height,
u8  bpp 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avr_close ( GF_AVRedirect avr)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool avr_on_event ( void *  udta,
GF_Event evt,
Bool  consumed_by_compositor 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool avr_process ( GF_TermExt *  termext,
u32  action,
void *  param 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_TermExt* avr_new ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void avr_delete ( GF_BaseInterface ifce)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const u32* QueryInterfaces ( )
GF_BaseInterface* LoadInterface ( u32  InterfaceType)

+ Here is the call graph for this function:

void ShutdownInterface ( GF_BaseInterface ifce)

+ Here is the call graph for this function:

Variable Documentation

const u32 maxFPS = 25
static
const char* moduleName = "AVRedirect"
static
const char* AVR_VIDEO_CODEC_OPTION = "VideoCodec"
static
const char* possibleCodecs = "supported codecs : MPEG-1, MPEG-2, MPEG-4, MSMPEG-4, H263, H263I, H263P, RV10, MJPEG"
static
const char* AVR_ENABLED_OPTION = "Enabled"
static
const char* AVR_DESTINATION = "destination"
static