2
* FreeRDP: A Remote Desktop Protocol client.
3
* Video Redirection Virtual Channel - Decoder
5
* Copyright 2010-2011 Vic Lee
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
11
* http://www.apache.org/licenses/LICENSE-2.0
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
20
#ifndef __TSMF_DECODER_H
21
#define __TSMF_DECODER_H
23
#include "drdynvc_types.h"
24
#include "tsmf_types.h"
26
typedef struct _ITSMFDecoder ITSMFDecoder;
30
/* Set the decoder format. Return true if supported. */
31
boolean (*SetFormat) (ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type);
32
/* Decode a sample. */
33
boolean (*Decode) (ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions);
34
/* Get the decoded data */
35
uint8* (*GetDecodedData) (ITSMFDecoder* decoder, uint32* size);
36
/* Get the pixel format of decoded video frame */
37
uint32 (*GetDecodedFormat) (ITSMFDecoder* decoder);
38
/* Get the width and height of decoded video frame */
39
boolean (*GetDecodedDimension) (ITSMFDecoder* decoder, uint32* width, uint32* height);
40
/* Free the decoder */
41
void (*Free) (ITSMFDecoder* decoder);
44
#define TSMF_DECODER_EXPORT_FUNC_NAME "TSMFDecoderEntry"
45
typedef ITSMFDecoder* (*TSMF_DECODER_ENTRY) (void);
47
ITSMFDecoder* tsmf_load_decoder(const char* name, TS_AM_MEDIA_TYPE* media_type);