2012-04-30 02:04:51 +02:00
|
|
|
/***************************************************************************
|
|
|
|
|
|
|
|
main.c
|
|
|
|
|
|
|
|
gb.media component
|
|
|
|
|
2018-02-12 02:53:46 +01:00
|
|
|
(c) 2000-2017 Benoît Minisini <g4mba5@gmail.com>
|
2012-04-30 02:04:51 +02:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 1, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA.
|
|
|
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#define __MAIN_C
|
|
|
|
|
|
|
|
#include "main.h"
|
|
|
|
#include "c_media.h"
|
2012-04-30 11:48:38 +02:00
|
|
|
#include "c_mediaplayer.h"
|
2012-04-30 02:04:51 +02:00
|
|
|
|
|
|
|
GB_INTERFACE GB EXPORT;
|
2013-06-03 19:51:14 +02:00
|
|
|
IMAGE_INTERFACE IMAGE EXPORT;
|
2012-04-30 02:04:51 +02:00
|
|
|
|
|
|
|
GB_DESC *GB_CLASSES[] EXPORT =
|
|
|
|
{
|
2012-05-01 22:49:32 +02:00
|
|
|
//MediaSignalArgumentsDesc,
|
2012-05-09 02:47:21 +02:00
|
|
|
MediaTagListDesc,
|
2015-05-14 16:51:20 +02:00
|
|
|
MediaMessageDesc,
|
2014-05-16 18:17:57 +02:00
|
|
|
MediaLinkDesc,
|
2012-04-30 02:04:51 +02:00
|
|
|
MediaControlDesc,
|
2013-06-29 14:42:52 +02:00
|
|
|
MediaFilterDesc,
|
2013-06-30 23:57:47 +02:00
|
|
|
MediaContainerChildrenDesc,
|
2012-04-30 02:04:51 +02:00
|
|
|
MediaContainerDesc,
|
2012-04-30 11:48:38 +02:00
|
|
|
MediaPipelineDesc,
|
2012-04-30 02:04:51 +02:00
|
|
|
MediaDesc,
|
2012-05-01 02:42:37 +02:00
|
|
|
MediaPlayerAudioDesc,
|
|
|
|
MediaPlayerVideoDesc,
|
|
|
|
MediaPlayerSubtitlesDesc,
|
2013-06-29 14:42:52 +02:00
|
|
|
MediaPlayerBalanceChannelDesc,
|
|
|
|
MediaPlayerBalanceDesc,
|
2012-04-30 11:48:38 +02:00
|
|
|
MediaPlayerDesc,
|
2012-04-30 02:04:51 +02:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2012-05-02 13:34:03 +02:00
|
|
|
int MAIN_get_x11_handle(void *control)
|
|
|
|
{
|
|
|
|
int (*get_handle)(void *) = NULL;
|
|
|
|
|
|
|
|
if (!get_handle)
|
|
|
|
{
|
2012-05-08 17:32:33 +02:00
|
|
|
GB.Component.GetInfo("GET_HANDLE", (void **)&get_handle);
|
2012-05-02 13:34:03 +02:00
|
|
|
if (!get_handle)
|
|
|
|
{
|
|
|
|
GB.Error("Unable to get window handle");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return (*get_handle)(control);
|
|
|
|
}
|
|
|
|
|
2012-04-30 02:04:51 +02:00
|
|
|
static void *_old_hook_main;
|
|
|
|
|
|
|
|
static void hook_main(int *argc, char ***argv)
|
|
|
|
{
|
|
|
|
gst_init(argc, argv);
|
|
|
|
CALL_HOOK_MAIN(_old_hook_main, argc, argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
int EXPORT GB_INIT()
|
|
|
|
{
|
|
|
|
_old_hook_main = GB.Hook(GB_HOOK_MAIN, (void *)hook_main);
|
2013-06-03 19:51:14 +02:00
|
|
|
GB.GetInterface("gb.image", IMAGE_INTERFACE_VERSION, &IMAGE);
|
2012-04-30 02:04:51 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void EXPORT GB_EXIT()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|