2014-05-26 11:01:13 +04:00
|
|
|
/*
|
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
|
|
|
* Video Redirection Virtual Channel - GStreamer Decoder
|
|
|
|
* platform specific functions
|
|
|
|
*
|
|
|
|
* (C) Copyright 2014 Thincast Technologies GmbH
|
|
|
|
* (C) Copyright 2014 Armin Novak <armin.novak@thincast.com>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2014-05-23 15:46:37 +04:00
|
|
|
#ifndef _TSMF_PLATFORM_H_
|
|
|
|
#define _TSMF_PLATFORM_H_
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <tsmf_decoder.h>
|
|
|
|
|
|
|
|
typedef struct _TSMFGstreamerDecoder
|
|
|
|
{
|
|
|
|
ITSMFDecoder iface;
|
|
|
|
|
|
|
|
int media_type; /* TSMF_MAJOR_TYPE_AUDIO or TSMF_MAJOR_TYPE_VIDEO */
|
|
|
|
|
|
|
|
gint64 duration;
|
|
|
|
|
|
|
|
GstState state;
|
|
|
|
GstCaps *gst_caps;
|
|
|
|
|
|
|
|
GstElement *pipe;
|
|
|
|
GstElement *src;
|
|
|
|
GstElement *outsink;
|
|
|
|
GstElement *volume;
|
|
|
|
|
|
|
|
BOOL ready;
|
|
|
|
BOOL paused;
|
|
|
|
UINT64 last_sample_end_time;
|
|
|
|
|
|
|
|
double gstVolume;
|
|
|
|
BOOL gstMuted;
|
|
|
|
|
|
|
|
int pipeline_start_time_valid; /* We've set the start time and have not reset the pipeline */
|
|
|
|
int shutdown; /* The decoder stream is shutting down */
|
|
|
|
|
|
|
|
void *platform;
|
|
|
|
|
|
|
|
BOOL (*ack_cb)(void *,BOOL);
|
|
|
|
void (*sync_cb)(void *);
|
|
|
|
void *stream;
|
|
|
|
|
|
|
|
} TSMFGstreamerDecoder;
|
|
|
|
|
2014-11-10 22:02:54 +03:00
|
|
|
const char* get_type(TSMFGstreamerDecoder* mdecoder);
|
2014-05-23 15:46:37 +04:00
|
|
|
|
2014-11-10 22:02:54 +03:00
|
|
|
const char* tsmf_platform_get_video_sink(void);
|
|
|
|
const char* tsmf_platform_get_audio_sink(void);
|
2014-05-23 15:46:37 +04:00
|
|
|
|
2014-11-10 22:02:54 +03:00
|
|
|
int tsmf_platform_create(TSMFGstreamerDecoder* decoder);
|
|
|
|
int tsmf_platform_set_format(TSMFGstreamerDecoder* decoder);
|
|
|
|
int tsmf_platform_register_handler(TSMFGstreamerDecoder* decoder);
|
|
|
|
int tsmf_platform_free(TSMFGstreamerDecoder* decoder);
|
2014-05-23 15:46:37 +04:00
|
|
|
|
2014-11-10 22:02:54 +03:00
|
|
|
int tsmf_window_create(TSMFGstreamerDecoder* decoder);
|
|
|
|
int tsmf_window_resize(TSMFGstreamerDecoder* decoder, int x, int y,
|
2014-05-23 15:46:37 +04:00
|
|
|
int width, int height, int nr_rect, RDP_RECT *visible);
|
2014-11-10 22:02:54 +03:00
|
|
|
int tsmf_window_destroy(TSMFGstreamerDecoder* decoder);
|
2014-05-23 15:46:37 +04:00
|
|
|
|
2014-11-10 22:02:54 +03:00
|
|
|
int tsmf_window_pause(TSMFGstreamerDecoder* decoder);
|
|
|
|
int tsmf_window_resume(TSMFGstreamerDecoder* decoder);
|
2014-05-23 15:46:37 +04:00
|
|
|
|
2014-11-10 22:02:54 +03:00
|
|
|
BOOL tsmf_gstreamer_add_pad(TSMFGstreamerDecoder* mdecoder);
|
|
|
|
void tsmf_gstreamer_remove_pad(TSMFGstreamerDecoder* mdecoder);
|
2014-05-23 15:46:37 +04:00
|
|
|
|
|
|
|
#endif
|