2012-05-15 10:15:32 +02:00
|
|
|
/* GStreamer Base Functions
|
2010-10-20 20:55:16 +02:00
|
|
|
*
|
|
|
|
* Copyright 2002 Lionel Ulmer
|
|
|
|
* Copyright 2010 Aric Stewart, CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2016-01-14 20:23:04 +01:00
|
|
|
#include <gst/gst.h>
|
2010-10-20 20:55:16 +02:00
|
|
|
|
2019-04-23 04:13:01 +02:00
|
|
|
#include "gst_private.h"
|
|
|
|
#include "rpcproxy.h"
|
2010-10-20 20:55:16 +02:00
|
|
|
#include "wine/debug.h"
|
|
|
|
#include "wine/unicode.h"
|
2019-04-23 04:13:01 +02:00
|
|
|
|
2010-10-26 18:39:15 +02:00
|
|
|
#include "initguid.h"
|
2010-10-20 20:55:16 +02:00
|
|
|
#include "gst_guids.h"
|
|
|
|
|
|
|
|
static HINSTANCE hInst = NULL;
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(gstreamer);
|
|
|
|
|
2010-10-26 18:39:15 +02:00
|
|
|
static const WCHAR wGstreamer_Splitter[] =
|
|
|
|
{'G','S','t','r','e','a','m','e','r',' ','s','p','l','i','t','t','e','r',' ','f','i','l','t','e','r',0};
|
2016-05-12 21:27:00 +02:00
|
|
|
static const WCHAR wGstreamer_YUV2RGB[] =
|
|
|
|
{'G','S','t','r','e','a','m','e','r',' ','Y','U','V',' ','t','o',' ','R','G','B',' ','f','i','l','t','e','r',0};
|
|
|
|
static const WCHAR wGstreamer_YUV2ARGB[] =
|
|
|
|
{'G','S','t','r','e','a','m','e','r',' ','Y','U','V',' ','t','o',' ','A','R','G','B',' ','f','i','l','t','e','r',0};
|
2010-10-28 21:42:29 +02:00
|
|
|
static const WCHAR wGstreamer_Mp3[] =
|
|
|
|
{'G','S','t','r','e','a','m','e','r',' ','M','p','3',' ','f','i','l','t','e','r',0};
|
2010-10-28 21:42:33 +02:00
|
|
|
static const WCHAR wGstreamer_AudioConvert[] =
|
|
|
|
{'G','S','t','r','e','a','m','e','r',' ','A','u','d','i','o','C','o','n','v','e','r','t',' ','f','i','l','t','e','r',0};
|
2019-09-19 04:37:03 +02:00
|
|
|
static const WCHAR wave_parserW[] =
|
|
|
|
{'W','a','v','e',' ','P','a','r','s','e','r',0};
|
2019-09-20 01:59:38 +02:00
|
|
|
static const WCHAR avi_splitterW[] =
|
|
|
|
{'A','V','I',' ','S','p','l','i','t','t','e','r',0};
|
2019-09-21 00:35:05 +02:00
|
|
|
static const WCHAR mpeg_splitterW[] =
|
|
|
|
{'M','P','E','G','-','I',' ','S','t','r','e','a','m',' ','S','p','l','i','t','t','e','r',0};
|
2010-10-26 18:39:15 +02:00
|
|
|
|
|
|
|
static WCHAR wNull[] = {'\0'};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_MEDIATYPE amfMTstream[] =
|
|
|
|
{ { &MEDIATYPE_Stream, &WINESUBTYPE_Gstreamer },
|
|
|
|
{ &MEDIATYPE_Stream, &MEDIASUBTYPE_NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_MEDIATYPE amfMTaudio[] =
|
|
|
|
{ { &MEDIATYPE_Audio, &MEDIASUBTYPE_NULL } };
|
|
|
|
|
|
|
|
static const AMOVIESETUP_MEDIATYPE amfMTvideo[] =
|
|
|
|
{ { &MEDIATYPE_Video, &MEDIASUBTYPE_NULL } };
|
|
|
|
|
|
|
|
static const AMOVIESETUP_PIN amfSplitPin[] =
|
|
|
|
{ { wNull,
|
|
|
|
FALSE, FALSE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
2,
|
|
|
|
amfMTstream
|
|
|
|
},
|
|
|
|
{
|
|
|
|
wNull,
|
|
|
|
FALSE, TRUE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
1,
|
|
|
|
amfMTaudio
|
|
|
|
},
|
|
|
|
{
|
|
|
|
wNull,
|
|
|
|
FALSE, TRUE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
1,
|
|
|
|
amfMTvideo
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_FILTER amfSplitter =
|
|
|
|
{ &CLSID_Gstreamer_Splitter,
|
|
|
|
wGstreamer_Splitter,
|
|
|
|
MERIT_PREFERRED,
|
|
|
|
3,
|
|
|
|
amfSplitPin
|
|
|
|
};
|
|
|
|
|
2010-10-27 20:14:15 +02:00
|
|
|
static const AMOVIESETUP_PIN amfYUVPin[] =
|
|
|
|
{ { wNull,
|
|
|
|
FALSE, FALSE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
1,
|
|
|
|
amfMTvideo
|
|
|
|
},
|
|
|
|
{
|
|
|
|
wNull,
|
|
|
|
FALSE, TRUE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
1,
|
|
|
|
amfMTvideo
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2016-05-12 21:27:00 +02:00
|
|
|
static const AMOVIESETUP_FILTER amfYUV2RGB =
|
|
|
|
{ &CLSID_Gstreamer_YUV2RGB,
|
|
|
|
wGstreamer_YUV2RGB,
|
|
|
|
MERIT_UNLIKELY,
|
|
|
|
2,
|
|
|
|
amfYUVPin
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_FILTER amfYUV2ARGB =
|
|
|
|
{ &CLSID_Gstreamer_YUV2ARGB,
|
|
|
|
wGstreamer_YUV2ARGB,
|
2010-10-27 20:14:15 +02:00
|
|
|
MERIT_UNLIKELY,
|
|
|
|
2,
|
|
|
|
amfYUVPin
|
|
|
|
};
|
|
|
|
|
2010-10-28 21:42:29 +02:00
|
|
|
AMOVIESETUP_PIN amfMp3Pin[] =
|
|
|
|
{ { wNull,
|
|
|
|
FALSE, FALSE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
1,
|
|
|
|
amfMTaudio
|
|
|
|
},
|
|
|
|
{
|
|
|
|
wNull,
|
|
|
|
FALSE, TRUE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
1,
|
|
|
|
amfMTaudio
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
AMOVIESETUP_FILTER const amfMp3 =
|
|
|
|
{ &CLSID_Gstreamer_Mp3,
|
|
|
|
wGstreamer_Mp3,
|
|
|
|
MERIT_NORMAL,
|
|
|
|
2,
|
|
|
|
amfMp3Pin
|
|
|
|
};
|
|
|
|
|
2010-10-28 21:42:33 +02:00
|
|
|
AMOVIESETUP_PIN amfAudioConvertPin[] =
|
|
|
|
{ { wNull,
|
|
|
|
FALSE, FALSE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
1,
|
|
|
|
amfMTaudio
|
|
|
|
},
|
|
|
|
{
|
|
|
|
wNull,
|
|
|
|
FALSE, TRUE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
1,
|
|
|
|
amfMTaudio
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
AMOVIESETUP_FILTER const amfAudioConvert =
|
|
|
|
{ &CLSID_Gstreamer_AudioConvert,
|
|
|
|
wGstreamer_AudioConvert,
|
|
|
|
MERIT_UNLIKELY,
|
|
|
|
2,
|
|
|
|
amfAudioConvertPin
|
|
|
|
};
|
|
|
|
|
2019-09-19 04:37:03 +02:00
|
|
|
static const AMOVIESETUP_MEDIATYPE wave_parser_sink_type_data[] =
|
|
|
|
{
|
|
|
|
{&MEDIATYPE_Stream, &MEDIASUBTYPE_WAVE},
|
|
|
|
{&MEDIATYPE_Stream, &MEDIASUBTYPE_AU},
|
|
|
|
{&MEDIATYPE_Stream, &MEDIASUBTYPE_AIFF},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_MEDIATYPE wave_parser_source_type_data[] =
|
|
|
|
{
|
|
|
|
{&MEDIATYPE_Audio, &GUID_NULL},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_PIN wave_parser_pin_data[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
NULL,
|
|
|
|
FALSE, FALSE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
ARRAY_SIZE(wave_parser_sink_type_data),
|
|
|
|
wave_parser_sink_type_data,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
NULL,
|
2019-09-20 01:59:34 +02:00
|
|
|
FALSE, TRUE, FALSE, FALSE,
|
2019-09-19 04:37:03 +02:00
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
ARRAY_SIZE(wave_parser_source_type_data),
|
|
|
|
wave_parser_source_type_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_FILTER wave_parser_filter_data =
|
|
|
|
{
|
|
|
|
&CLSID_WAVEParser,
|
|
|
|
wave_parserW,
|
|
|
|
MERIT_UNLIKELY,
|
|
|
|
ARRAY_SIZE(wave_parser_pin_data),
|
|
|
|
wave_parser_pin_data,
|
|
|
|
};
|
|
|
|
|
2019-09-20 01:59:38 +02:00
|
|
|
static const AMOVIESETUP_MEDIATYPE avi_splitter_sink_type_data[] =
|
|
|
|
{
|
|
|
|
{&MEDIATYPE_Stream, &MEDIASUBTYPE_Avi},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_PIN avi_splitter_pin_data[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
NULL,
|
|
|
|
FALSE, FALSE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
ARRAY_SIZE(avi_splitter_sink_type_data),
|
|
|
|
avi_splitter_sink_type_data,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
NULL,
|
|
|
|
FALSE, TRUE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
ARRAY_SIZE(amfMTvideo),
|
|
|
|
amfMTvideo,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_FILTER avi_splitter_filter_data =
|
|
|
|
{
|
|
|
|
&CLSID_AviSplitter,
|
|
|
|
avi_splitterW,
|
|
|
|
0x5ffff0,
|
|
|
|
ARRAY_SIZE(avi_splitter_pin_data),
|
|
|
|
avi_splitter_pin_data,
|
|
|
|
};
|
|
|
|
|
2019-09-21 00:35:05 +02:00
|
|
|
static const AMOVIESETUP_MEDIATYPE mpeg_splitter_sink_type_data[] =
|
|
|
|
{
|
|
|
|
{&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Audio},
|
|
|
|
{&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Video},
|
|
|
|
{&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1System},
|
|
|
|
{&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1VideoCD},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_MEDIATYPE mpeg_splitter_audio_type_data[] =
|
|
|
|
{
|
|
|
|
{&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet},
|
|
|
|
{&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_MEDIATYPE mpeg_splitter_video_type_data[] =
|
|
|
|
{
|
|
|
|
{&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet},
|
|
|
|
{&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_PIN mpeg_splitter_pin_data[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
NULL,
|
|
|
|
FALSE, FALSE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
ARRAY_SIZE(mpeg_splitter_sink_type_data),
|
|
|
|
mpeg_splitter_sink_type_data,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
NULL,
|
|
|
|
FALSE, TRUE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
ARRAY_SIZE(mpeg_splitter_audio_type_data),
|
|
|
|
mpeg_splitter_audio_type_data,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
NULL,
|
|
|
|
FALSE, TRUE, FALSE, FALSE,
|
|
|
|
&GUID_NULL,
|
|
|
|
NULL,
|
|
|
|
ARRAY_SIZE(mpeg_splitter_video_type_data),
|
|
|
|
mpeg_splitter_video_type_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const AMOVIESETUP_FILTER mpeg_splitter_filter_data =
|
|
|
|
{
|
|
|
|
&CLSID_MPEG1Splitter,
|
|
|
|
mpeg_splitterW,
|
|
|
|
0x5ffff0,
|
|
|
|
ARRAY_SIZE(mpeg_splitter_pin_data),
|
|
|
|
mpeg_splitter_pin_data,
|
|
|
|
};
|
|
|
|
|
2010-10-20 20:55:16 +02:00
|
|
|
FactoryTemplate const g_Templates[] = {
|
2010-10-26 18:39:15 +02:00
|
|
|
{
|
|
|
|
wGstreamer_Splitter,
|
|
|
|
&CLSID_Gstreamer_Splitter,
|
|
|
|
Gstreamer_Splitter_create,
|
|
|
|
NULL,
|
|
|
|
&amfSplitter,
|
|
|
|
},
|
2010-10-27 20:14:15 +02:00
|
|
|
{
|
2016-05-12 21:27:00 +02:00
|
|
|
wGstreamer_YUV2RGB,
|
|
|
|
&CLSID_Gstreamer_YUV2RGB,
|
|
|
|
Gstreamer_YUV2RGB_create,
|
|
|
|
NULL,
|
|
|
|
&amfYUV2RGB,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
wGstreamer_YUV2ARGB,
|
|
|
|
&CLSID_Gstreamer_YUV2ARGB,
|
|
|
|
Gstreamer_YUV2ARGB_create,
|
2010-10-27 20:14:15 +02:00
|
|
|
NULL,
|
2016-05-12 21:27:00 +02:00
|
|
|
&amfYUV2ARGB,
|
2010-10-27 20:14:15 +02:00
|
|
|
},
|
2010-10-28 21:42:29 +02:00
|
|
|
{
|
|
|
|
wGstreamer_Mp3,
|
|
|
|
&CLSID_Gstreamer_Mp3,
|
|
|
|
Gstreamer_Mp3_create,
|
|
|
|
NULL,
|
|
|
|
&amfMp3,
|
|
|
|
},
|
2010-10-28 21:42:33 +02:00
|
|
|
{
|
|
|
|
wGstreamer_AudioConvert,
|
|
|
|
&CLSID_Gstreamer_AudioConvert,
|
|
|
|
Gstreamer_AudioConvert_create,
|
|
|
|
NULL,
|
|
|
|
&amfAudioConvert,
|
|
|
|
},
|
2019-09-19 04:37:03 +02:00
|
|
|
{
|
|
|
|
wave_parserW,
|
|
|
|
&CLSID_WAVEParser,
|
|
|
|
wave_parser_create,
|
|
|
|
NULL,
|
|
|
|
&wave_parser_filter_data,
|
|
|
|
},
|
2019-09-20 01:59:38 +02:00
|
|
|
{
|
|
|
|
avi_splitterW,
|
|
|
|
&CLSID_AviSplitter,
|
|
|
|
avi_splitter_create,
|
|
|
|
NULL,
|
|
|
|
&avi_splitter_filter_data,
|
|
|
|
},
|
2019-09-21 00:35:05 +02:00
|
|
|
{
|
|
|
|
mpeg_splitterW,
|
|
|
|
&CLSID_MPEG1Splitter,
|
|
|
|
mpeg_splitter_create,
|
|
|
|
NULL,
|
|
|
|
&mpeg_splitter_filter_data,
|
|
|
|
},
|
2010-10-20 20:55:16 +02:00
|
|
|
};
|
|
|
|
|
2018-11-05 21:56:21 +01:00
|
|
|
const int g_cTemplates = ARRAY_SIZE(g_Templates);
|
2010-10-20 20:55:16 +02:00
|
|
|
|
|
|
|
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
|
|
|
{
|
|
|
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
|
|
|
hInst = hInstDLL;
|
|
|
|
return STRMBASE_DllMain(hInstDLL, fdwReason, lpv);
|
|
|
|
}
|
|
|
|
|
2010-10-28 11:42:52 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* DllCanUnloadNow
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllCanUnloadNow(void)
|
|
|
|
{
|
2019-07-05 15:23:21 +02:00
|
|
|
HRESULT hr = STRMBASE_DllCanUnloadNow();
|
|
|
|
|
|
|
|
if (hr == S_OK)
|
|
|
|
hr = mfplat_can_unload_now();
|
|
|
|
|
|
|
|
return hr;
|
2010-10-28 11:42:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllGetClassObject
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|
|
|
{
|
2019-07-05 15:23:21 +02:00
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
if (FAILED(hr = mfplat_get_class_object(rclsid, riid, ppv)))
|
|
|
|
hr = STRMBASE_DllGetClassObject( rclsid, riid, ppv );
|
|
|
|
|
|
|
|
return hr;
|
2010-10-28 11:42:52 +02:00
|
|
|
}
|
|
|
|
|
2019-03-26 06:57:33 +01:00
|
|
|
static BOOL CALLBACK init_gstreamer_proc(INIT_ONCE *once, void *param, void **ctx)
|
2016-01-14 20:22:11 +01:00
|
|
|
{
|
2019-03-26 06:57:33 +01:00
|
|
|
BOOL *status = param;
|
|
|
|
char argv0[] = "wine";
|
|
|
|
char argv1[] = "--gst-disable-registry-fork";
|
2019-03-26 06:57:34 +01:00
|
|
|
char *args[3];
|
|
|
|
char **argv = args;
|
2019-03-26 06:57:33 +01:00
|
|
|
int argc = 2;
|
|
|
|
GError *err = NULL;
|
|
|
|
|
2019-03-26 06:57:35 +01:00
|
|
|
TRACE("Initializing...\n");
|
2019-03-26 06:57:33 +01:00
|
|
|
|
|
|
|
argv[0] = argv0;
|
|
|
|
argv[1] = argv1;
|
|
|
|
argv[2] = NULL;
|
|
|
|
*status = gst_init_check(&argc, &argv, &err);
|
2019-03-26 06:57:34 +01:00
|
|
|
if (*status)
|
|
|
|
{
|
2019-03-26 06:57:36 +01:00
|
|
|
HINSTANCE handle;
|
2019-03-26 06:57:35 +01:00
|
|
|
|
2019-05-14 00:14:31 +02:00
|
|
|
TRACE("Initialized, version %s. Built with %d.%d.%d.\n", gst_version_string(),
|
2019-03-26 06:57:35 +01:00
|
|
|
GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO);
|
|
|
|
|
2019-03-26 06:57:33 +01:00
|
|
|
/* Unloading glib is a bad idea.. it installs atexit handlers,
|
|
|
|
* so never unload the dll after loading */
|
2019-03-26 06:57:36 +01:00
|
|
|
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_PIN,
|
|
|
|
(LPCWSTR)hInst, &handle);
|
|
|
|
if (!handle)
|
|
|
|
ERR("Failed to pin module %p.\n", hInst);
|
2019-03-26 06:57:33 +01:00
|
|
|
|
|
|
|
start_dispatch_thread();
|
|
|
|
}
|
2019-03-26 06:57:34 +01:00
|
|
|
else if (err)
|
|
|
|
{
|
|
|
|
ERR("Failed to initialize gstreamer: %s\n", debugstr_a(err->message));
|
|
|
|
g_error_free(err);
|
|
|
|
}
|
2019-03-26 06:57:33 +01:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL init_gstreamer(void)
|
|
|
|
{
|
|
|
|
static INIT_ONCE once = INIT_ONCE_STATIC_INIT;
|
|
|
|
static BOOL status;
|
|
|
|
|
|
|
|
InitOnceExecuteOnce(&once, init_gstreamer_proc, &status, NULL);
|
|
|
|
|
|
|
|
return status;
|
2010-10-25 15:44:41 +02:00
|
|
|
}
|
|
|
|
|
2010-10-20 20:55:16 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* DllRegisterServer
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllRegisterServer(void)
|
|
|
|
{
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("\n");
|
|
|
|
|
|
|
|
hr = AMovieDllRegisterServer2(TRUE);
|
|
|
|
if (SUCCEEDED(hr))
|
2019-04-23 04:13:01 +02:00
|
|
|
hr = __wine_register_resources(hInst);
|
2010-10-20 20:55:16 +02:00
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllUnregisterServer
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI DllUnregisterServer(void)
|
|
|
|
{
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("\n");
|
|
|
|
|
|
|
|
hr = AMovieDllRegisterServer2(FALSE);
|
|
|
|
if (SUCCEEDED(hr))
|
2019-04-23 04:13:01 +02:00
|
|
|
hr = __wine_unregister_resources(hInst);
|
2010-10-20 20:55:16 +02:00
|
|
|
return hr;
|
|
|
|
}
|