FreeRDP
dsp_ffmpeg.c File Reference
#include <freerdp/config.h>
#include <freerdp/log.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libavutil/opt.h>
#include "dsp.h"
#include "dsp_ffmpeg.h"

Macros

#define TAG   FREERDP_TAG("dsp.ffmpeg")
 

Functions

static BOOL ffmpeg_codec_is_filtered (enum AVCodecID id, BOOL encoder)
 
static enum AVCodecID ffmpeg_get_avcodec (const AUDIO_FORMAT *WINPR_RESTRICT format)
 
static int ffmpeg_sample_format (const AUDIO_FORMAT *WINPR_RESTRICT format)
 
static void ffmpeg_close_context (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context)
 
static BOOL ffmpeg_open_context (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context)
 
static BOOL ffmpeg_resample_frame (AVAudioResampleContext *WINPR_RESTRICT context, AVFrame *WINPR_RESTRICT in, AVFrame *WINPR_RESTRICT out)
 
static BOOL ffmpeg_encode_frame (AVCodecContext *WINPR_RESTRICT context, AVFrame *WINPR_RESTRICT in, AVPacket *WINPR_RESTRICT packet, wStream *WINPR_RESTRICT out)
 
static BOOL ffmpeg_fill_frame (AVFrame *WINPR_RESTRICT frame, const AUDIO_FORMAT *WINPR_RESTRICT inputFormat, const BYTE *WINPR_RESTRICT data, size_t size)
 
static BOOL ffmpeg_decode (AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, AVAudioResampleContext *resampleContext, AVFrame *resampled, wStream *out)
 
BOOL freerdp_dsp_ffmpeg_supports_format (const AUDIO_FORMAT *WINPR_RESTRICT format, BOOL encode)
 
FREERDP_DSP_CONTEXT * freerdp_dsp_ffmpeg_context_new (BOOL encode)
 
void freerdp_dsp_ffmpeg_context_free (FREERDP_DSP_CONTEXT *context)
 
BOOL freerdp_dsp_ffmpeg_context_reset (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const AUDIO_FORMAT *WINPR_RESTRICT targetFormat)
 
static BOOL freerdp_dsp_channel_mix (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const BYTE *WINPR_RESTRICT src, size_t size, const AUDIO_FORMAT *WINPR_RESTRICT srcFormat, const BYTE **WINPR_RESTRICT data, size_t *WINPR_RESTRICT length, AUDIO_FORMAT *WINPR_RESTRICT dstFormat)
 
BOOL freerdp_dsp_ffmpeg_encode (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const AUDIO_FORMAT *WINPR_RESTRICT format, const BYTE *WINPR_RESTRICT sdata, size_t length, wStream *WINPR_RESTRICT out)
 
BOOL freerdp_dsp_ffmpeg_decode (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const AUDIO_FORMAT *WINPR_RESTRICT srcFormat, const BYTE *WINPR_RESTRICT data, size_t length, wStream *WINPR_RESTRICT out)
 

Macro Definition Documentation

◆ TAG

#define TAG   FREERDP_TAG("dsp.ffmpeg")

FreeRDP: A Remote Desktop Protocol Implementation Digital Sound Processing - FFMPEG backend

Copyright 2018 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2018 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ ffmpeg_close_context()

static void ffmpeg_close_context ( FREERDP_DSP_CONTEXT *WINPR_RESTRICT  context)
static
Here is the caller graph for this function:

◆ ffmpeg_codec_is_filtered()

static BOOL ffmpeg_codec_is_filtered ( enum AVCodecID  id,
BOOL  encoder 
)
static
Here is the caller graph for this function:

◆ ffmpeg_decode()

static BOOL ffmpeg_decode ( AVCodecContext *  dec_ctx,
AVPacket *  pkt,
AVFrame *  frame,
AVAudioResampleContext *  resampleContext,
AVFrame *  resampled,
wStream out 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ffmpeg_encode_frame()

static BOOL ffmpeg_encode_frame ( AVCodecContext *WINPR_RESTRICT  context,
AVFrame *WINPR_RESTRICT  in,
AVPacket *WINPR_RESTRICT  packet,
wStream *WINPR_RESTRICT  out 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ffmpeg_fill_frame()

static BOOL ffmpeg_fill_frame ( AVFrame *WINPR_RESTRICT  frame,
const AUDIO_FORMAT *WINPR_RESTRICT  inputFormat,
const BYTE *WINPR_RESTRICT  data,
size_t  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ffmpeg_get_avcodec()

static enum AVCodecID ffmpeg_get_avcodec ( const AUDIO_FORMAT *WINPR_RESTRICT  format)
static
Here is the caller graph for this function:

◆ ffmpeg_open_context()

static BOOL ffmpeg_open_context ( FREERDP_DSP_CONTEXT *WINPR_RESTRICT  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ffmpeg_resample_frame()

static BOOL ffmpeg_resample_frame ( AVAudioResampleContext *WINPR_RESTRICT  context,
AVFrame *WINPR_RESTRICT  in,
AVFrame *WINPR_RESTRICT  out 
)
static
Here is the caller graph for this function:

◆ ffmpeg_sample_format()

static int ffmpeg_sample_format ( const AUDIO_FORMAT *WINPR_RESTRICT  format)
static
Here is the caller graph for this function:

◆ freerdp_dsp_channel_mix()

static BOOL freerdp_dsp_channel_mix ( FREERDP_DSP_CONTEXT *WINPR_RESTRICT  context,
const BYTE *WINPR_RESTRICT  src,
size_t  size,
const AUDIO_FORMAT *WINPR_RESTRICT  srcFormat,
const BYTE **WINPR_RESTRICT  data,
size_t *WINPR_RESTRICT  length,
AUDIO_FORMAT *WINPR_RESTRICT  dstFormat 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_dsp_ffmpeg_context_free()

void freerdp_dsp_ffmpeg_context_free ( FREERDP_DSP_CONTEXT *  context)

FreeRDP: A Remote Desktop Protocol Implementation Digital Sound Processing - FFMPEG backend

Copyright 2018 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2018 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_dsp_ffmpeg_context_new()

FREERDP_DSP_CONTEXT* freerdp_dsp_ffmpeg_context_new ( BOOL  encode)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_dsp_ffmpeg_context_reset()

BOOL freerdp_dsp_ffmpeg_context_reset ( FREERDP_DSP_CONTEXT *WINPR_RESTRICT  context,
const AUDIO_FORMAT *WINPR_RESTRICT  targetFormat 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_dsp_ffmpeg_decode()

BOOL freerdp_dsp_ffmpeg_decode ( FREERDP_DSP_CONTEXT *WINPR_RESTRICT  context,
const AUDIO_FORMAT *WINPR_RESTRICT  srcFormat,
const BYTE *WINPR_RESTRICT  data,
size_t  length,
wStream *WINPR_RESTRICT  out 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_dsp_ffmpeg_encode()

BOOL freerdp_dsp_ffmpeg_encode ( FREERDP_DSP_CONTEXT *WINPR_RESTRICT  context,
const AUDIO_FORMAT *WINPR_RESTRICT  format,
const BYTE *WINPR_RESTRICT  sdata,
size_t  length,
wStream *WINPR_RESTRICT  out 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_dsp_ffmpeg_supports_format()

BOOL freerdp_dsp_ffmpeg_supports_format ( const AUDIO_FORMAT *WINPR_RESTRICT  format,
BOOL  encode 
)
Here is the call graph for this function:
Here is the caller graph for this function: