FreeRDP
|
#include <freerdp/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <freerdp/channels/log.h>
#include <freerdp/client/tsmf.h>
#include <libavcodec/avcodec.h>
#include <libavutil/common.h>
#include <libavutil/cpu.h>
#include <libavutil/imgutils.h>
#include "tsmf_constants.h"
#include "tsmf_decoder.h"
#include "tsmf_audio.h"
Macros | |
#define | AVMEDIA_TYPE_VIDEO 0 |
#define | AVMEDIA_TYPE_AUDIO 1 |
#define | MAX_AUDIO_FRAME_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE |
#define | AV_CODEC_ID_VC1 CODEC_ID_VC1 |
#define | AV_CODEC_ID_WMAV2 CODEC_ID_WMAV2 |
#define | AV_CODEC_ID_WMAPRO CODEC_ID_WMAPRO |
#define | AV_CODEC_ID_MP3 CODEC_ID_MP3 |
#define | AV_CODEC_ID_MP2 CODEC_ID_MP2 |
#define | AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO |
#define | AV_CODEC_ID_WMV3 CODEC_ID_WMV3 |
#define | AV_CODEC_ID_AAC CODEC_ID_AAC |
#define | AV_CODEC_ID_H264 CODEC_ID_H264 |
#define | AV_CODEC_ID_AC3 CODEC_ID_AC3 |
#define | AV_PIX_FMT_YUV420P PIX_FMT_YUV420P |
Functions | |
static BOOL | tsmf_ffmpeg_init_context (ITSMFDecoder *decoder) |
static BOOL | tsmf_ffmpeg_init_video_stream (ITSMFDecoder *decoder, const TS_AM_MEDIA_TYPE *media_type) |
static BOOL | tsmf_ffmpeg_init_audio_stream (ITSMFDecoder *decoder, const TS_AM_MEDIA_TYPE *media_type) |
static BOOL | tsmf_ffmpeg_init_stream (ITSMFDecoder *decoder, const TS_AM_MEDIA_TYPE *media_type) |
static BOOL | tsmf_ffmpeg_prepare (ITSMFDecoder *decoder) |
static BOOL | tsmf_ffmpeg_set_format (ITSMFDecoder *decoder, TS_AM_MEDIA_TYPE *media_type) |
static BOOL | tsmf_ffmpeg_decode_video (ITSMFDecoder *decoder, const BYTE *data, UINT32 data_size, UINT32 extensions) |
static BOOL | tsmf_ffmpeg_decode_audio (ITSMFDecoder *decoder, const BYTE *data, UINT32 data_size, UINT32 extensions) |
static BOOL | tsmf_ffmpeg_decode (ITSMFDecoder *decoder, const BYTE *data, UINT32 data_size, UINT32 extensions) |
static BYTE * | tsmf_ffmpeg_get_decoded_data (ITSMFDecoder *decoder, UINT32 *size) |
static UINT32 | tsmf_ffmpeg_get_decoded_format (ITSMFDecoder *decoder) |
static BOOL | tsmf_ffmpeg_get_decoded_dimension (ITSMFDecoder *decoder, UINT32 *width, UINT32 *height) |
static void | tsmf_ffmpeg_free (ITSMFDecoder *decoder) |
static BOOL CALLBACK | InitializeAvCodecs (PINIT_ONCE once, PVOID param, PVOID *context) |
WINPR_ASSERT (sptr) | |
WLog_DBG (TAG, "TSMFDecoderEntry FFMPEG") | |
if (!decoder) return ERROR_OUTOFMEMORY | |
Variables | |
static INIT_ONCE | g_Initialized = INIT_ONCE_STATIC_INIT |
* | sptr = NULL |
TSMFFFmpegDecoder * | decoder = NULL |
decoder iface | SetFormat = tsmf_ffmpeg_set_format |
decoder iface | Decode = tsmf_ffmpeg_decode |
decoder iface | GetDecodedData = tsmf_ffmpeg_get_decoded_data |
decoder iface | GetDecodedFormat = tsmf_ffmpeg_get_decoded_format |
decoder iface | GetDecodedDimension = tsmf_ffmpeg_get_decoded_dimension |
decoder iface | Free = tsmf_ffmpeg_free |
return | CHANNEL_RC_OK |
#define AV_CODEC_ID_AAC CODEC_ID_AAC |
#define AV_CODEC_ID_AC3 CODEC_ID_AC3 |
#define AV_CODEC_ID_H264 CODEC_ID_H264 |
#define AV_CODEC_ID_MP2 CODEC_ID_MP2 |
#define AV_CODEC_ID_MP3 CODEC_ID_MP3 |
#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO |
#define AV_CODEC_ID_VC1 CODEC_ID_VC1 |
#define AV_CODEC_ID_WMAPRO CODEC_ID_WMAPRO |
#define AV_CODEC_ID_WMAV2 CODEC_ID_WMAV2 |
#define AV_CODEC_ID_WMV3 CODEC_ID_WMV3 |
#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P |
#define AVMEDIA_TYPE_AUDIO 1 |
#define AVMEDIA_TYPE_VIDEO 0 |
FreeRDP: A Remote Desktop Protocol Implementation Video Redirection Virtual Channel - FFmpeg Decoder
Copyright 2010-2011 Vic Lee
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.
#define MAX_AUDIO_FRAME_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE |
if | ( | ! | decoder | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
WINPR_ASSERT | ( | sptr | ) |
WLog_DBG | ( | TAG | , |
"TSMFDecoderEntry FFMPEG" | |||
) |
return CHANNEL_RC_OK |
decoder iface Decode = tsmf_ffmpeg_decode |
decoder = NULL |
decoder iface Free = tsmf_ffmpeg_free |
|
static |
decoder iface GetDecodedData = tsmf_ffmpeg_get_decoded_data |
decoder iface GetDecodedDimension = tsmf_ffmpeg_get_decoded_dimension |
decoder iface GetDecodedFormat = tsmf_ffmpeg_get_decoded_format |
decoder iface SetFormat = tsmf_ffmpeg_set_format |
* sptr = NULL |