diff --git a/bigloo-gstreamer1.patch b/bigloo-gstreamer1.patch new file mode 100644 index 0000000..2450f05 --- /dev/null +++ b/bigloo-gstreamer1.patch @@ -0,0 +1,2781 @@ +--- api/gstreamer/examples/bgst_inspect.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/examples/bgst_inspect.scm 2019-11-12 14:31:36.961888769 -0700 +@@ -19,7 +19,7 @@ + ;*---------------------------------------------------------------------*/ + ;* bgst-inspect-version ... */ + ;*---------------------------------------------------------------------*/ +-(define (bgst-inspect-version) "0.10") ++(define (bgst-inspect-version) "1.0") + + ;*---------------------------------------------------------------------*/ + ;* main ... */ +--- api/gstreamer/examples/bgst_launch.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/examples/bgst_launch.scm 2019-11-12 14:31:16.580233386 -0700 +@@ -44,7 +44,7 @@ + ;*---------------------------------------------------------------------*/ + ;* bgst-launch-version ... */ + ;*---------------------------------------------------------------------*/ +-(define-parameter bgst-launch-version "0.10") ++(define-parameter bgst-launch-version "1.0") + (define-parameter bgst-launch-verbose #f) + (define-parameter bgst-launch-messages #f) + +--- api/gstreamer/examples/bgst_mm.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/examples/bgst_mm.scm 2019-11-21 09:12:38.042854253 -0700 +@@ -44,8 +44,6 @@ + ;* main ... */ + ;*---------------------------------------------------------------------*/ + (define (main args) +- (eval '(library-load 'multimedia)) +- (eval '(library-load 'gstreamer)) + (let ((files '()) + (backend 'gstreamer) + (command #f) +--- api/gstreamer/examples/bgst_play.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/examples/bgst_play.scm 2019-11-06 14:44:13.588762385 -0700 +@@ -148,7 +148,7 @@ + (error 'gstreamer + "Message error" + (gst-message-error-string msg))) +- (when (=fx type $gst-message-duration) ++ (when (=fx type $gst-message-duration-changed) + (verb 3 "duration: " + (gst-element-query-duration + pipeline))) +--- api/gstreamer/examples/bgst_repl.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/examples/bgst_repl.scm 2019-11-21 09:14:05.130257480 -0700 +@@ -21,5 +21,4 @@ + ;*---------------------------------------------------------------------*/ + (define (main argv) + (print "Welcome to the Bigloo+Gstreamer repl...") +- (eval '(library-load 'gstreamer)) + (repl)) +--- api/gstreamer/examples/typefind.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/examples/typefind.scm 2019-11-20 12:00:41.642795553 -0700 +@@ -24,6 +24,7 @@ + (bus (with-access::gst-pipeline pipeline (bus) bus)) + (filesrc (gst-element-factory-make "filesrc" "source")) + (typefind (gst-element-factory-make "typefind" "typefinder")) ++ (fakesink (gst-element-factory-make "fakesink" "sink")) + (file (if (null? (cdr argv)) + "/usr/local/lib/hop/1.9.0/weblets/doc/etc/sound1.mp3" + (cadr argv)))) +@@ -31,18 +32,20 @@ + (gst-object-connect! typefind + "have-type" + (lambda (_ probability caps) +- (print ++ (tprint + (format "~a, probabilty=~a" + (gst-caps-to-string caps) + probability)) + (exit 0))) + (tprint "1") +- (gst-bin-add! pipeline filesrc typefind) ++ (gst-bin-add! pipeline filesrc typefind fakesink) + (tprint "2") +- (gst-element-link! filesrc typefind) ++ (gst-element-link! filesrc typefind fakesink) + (gst-element-state-set! pipeline 'playing) + (let loop () +- (let ((msg (gst-bus-poll bus $gst-message-any #l1000000000))) ++ (let ((msg (gst-bus-poll bus ++ :types $gst-message-any ++ :timeout #l1000000000))) + (when (isa? msg gst-message) + (tprint "msg=" msg) + (with-access::gst-message msg (type) +--- api/gstreamer/src/Clib/bglgst.c.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Clib/bglgst.c 2019-11-18 16:03:13.117279358 -0700 +@@ -22,7 +22,6 @@ + /* Imports */ + /*---------------------------------------------------------------------*/ + BGL_RUNTIME_DECL obj_t void_star_to_obj(); +-extern void bglgst_thread_init(); + extern obj_t bgl_gst_bin_elements_set( obj_t, obj_t ); + + /*---------------------------------------------------------------------*/ +@@ -43,7 +42,6 @@ extern obj_t bgl_gst_bin_elements_set( o + /* counting is a bad-idea). */ + /*---------------------------------------------------------------------*/ + static int bglgst_use_threads = BGL_GSTREAMER_USE_THREADS; +-static obj_t bgl_gst_denv; + + /*---------------------------------------------------------------------*/ + /* CHECK_PROCEDURE */ +@@ -109,31 +107,6 @@ static void bgl_gst_free( gpointer ptr ) + } + + /*---------------------------------------------------------------------*/ +-/* static void */ +-/* bgl_gobject_alloc_init ... */ +-/* ------------------------------------------------------------- */ +-/* Install the Bigloo allocation routines in replacement of the */ +-/* default Glib ones. */ +-/*---------------------------------------------------------------------*/ +-static void +-bgl_gobject_alloc_init() { +- GMemVTable *vtable = alloca( sizeof( GMemVTable ) ); +- +- memset( vtable, 0, sizeof( GMemVTable ) ); +- +-#if( 0 && BGL_GC == BGL_BOEHM_GC ) +- vtable->malloc = (gpointer (*)(gsize))&GC_malloc; +- vtable->realloc = (gpointer (*)(gpointer, gsize))&GC_realloc; +- vtable->free = (void (*)(gpointer))&GC_free; +-#else +- vtable->malloc = &bgl_gst_alloc; +- vtable->realloc = &bgl_gst_realloc; +- vtable->free = &bgl_gst_free; +-#endif +- g_mem_set_vtable( vtable ); +-} +- +-/*---------------------------------------------------------------------*/ + /* void */ + /* bgl_gst_init ... */ + /*---------------------------------------------------------------------*/ +@@ -159,23 +132,13 @@ bgl_gst_init( obj_t args ) { + args = CDR( args ); + } + +- /* start the Bigloo thread in charge of dealing with callbacks */ +- if( !bglgst_use_threadsp() ) { +- /* Use the GC for allocating glib objects */ +-/* bgl_gobject_alloc_init(); */ +- } else { +- /* otherwise, create the dummy gstreamer dynamic env */ +- bglgst_thread_init(); +- bgl_gst_denv = bgl_dup_dynamic_env( BGL_CURRENT_DYNAMIC_ENV() ); +- } +- + /* initialize GStreamer */ + gst_init( &argc, &argv ); + + /* WARNING: restore the previous locale that is changed by gst_init! */ + setlocale( LC_ALL, locale ); + +- /* allocated the callback array */ ++ /* allocate the callback array */ + callbacks = g_malloc( sizeof( callback_t ) * callback_length ); + + /* bind the bigloo plugins */ +@@ -307,7 +270,7 @@ bgl_g_value_to_obj( const GValue *gval, + if( GST_VALUE_HOLDS_CAPS( gval ) ) { + GstCaps *caps = GST_CAPS( gst_value_get_caps( gval ) ); + +- if( doref ) gst_object_ref( caps ); ++ if( doref ) gst_caps_ref( caps ); + return doobj ? bgl_gst_caps_new( caps, BTRUE ) : BUNSPEC; + } + +@@ -358,7 +321,7 @@ bgl_g_value_to_obj( const GValue *gval, + return BUNSPEC; + } + +- if( GST_VALUE_HOLDS_DATE( gval ) ) { ++ if( G_VALUE_HOLDS( gval, G_TYPE_DATE ) ) { + fprintf( stderr, "GST_VALUE_HOLDS_DATE not implemented yet %s:%d\n", + __FILE__, __LINE__ ); + return BUNSPEC; +@@ -370,8 +333,8 @@ bgl_g_value_to_obj( const GValue *gval, + return BUNSPEC; + } + +- if( GST_VALUE_HOLDS_MINI_OBJECT( gval ) ) { +- fprintf( stderr, "GST_VALUE_HOLDS_MINI_OBJECT not implemented yet %s:%d\n", ++ if( G_VALUE_HOLDS_BOXED( gval ) ) { ++ fprintf( stderr, "G_VALUE_HOLDS_BOXED not implemented yet %s:%d\n", + __FILE__, __LINE__ ); + return BUNSPEC; + } +@@ -595,7 +558,7 @@ bgl_gst_registry_get_plugin_list( GstReg + /*---------------------------------------------------------------------*/ + obj_t + bgl_gst_element_factory_get_uri_protocols( GstElementFactory *factory ) { +- gchar **array = gst_element_factory_get_uri_protocols( factory ); ++ const gchar * const *array = gst_element_factory_get_uri_protocols( factory ); + + if( !array ) { + return BNIL; +@@ -991,9 +954,9 @@ bgl_gsttag_value_to_obj( const GstTagLis + + + case G_TYPE_CHAR: { +- gchar c; ++ gint c; + +- gst_tag_list_get_char( list, tag, &c ); ++ gst_tag_list_get_int( list, tag, &c ); + + return BCHAR( c ); + } +@@ -1007,14 +970,6 @@ bgl_gsttag_value_to_obj( const GstTagLis + return BINT( i ); + } + +- case G_TYPE_LONG: { +- glong i; +- +- gst_tag_list_get_long( list, tag, &i ); +- +- return make_belong( i ); +- } +- + case G_TYPE_UINT: { + guint i; + +@@ -1023,14 +978,7 @@ bgl_gsttag_value_to_obj( const GstTagLis + return make_belong( i ); + } + +- case G_TYPE_ULONG: { +- gulong i; +- +- gst_tag_list_get_ulong( list, tag, &i ); +- +- return make_bllong( (BGL_LONGLONG_T)i ); +- } +- ++ case G_TYPE_LONG: + case G_TYPE_INT64: { + gint64 i; + +@@ -1039,6 +987,7 @@ bgl_gsttag_value_to_obj( const GstTagLis + return make_bllong( (BGL_LONGLONG_T)i ); + } + ++ case G_TYPE_ULONG: + case G_TYPE_UINT64: { + guint64 i; + +@@ -1088,6 +1037,43 @@ gst_tag_fun( const GstTagList *list, con + } + + /*---------------------------------------------------------------------*/ ++/* obj_t */ ++/* bgl_gst_buffer_get_string ... */ ++/*---------------------------------------------------------------------*/ ++obj_t ++bgl_gst_buffer_get_string( GstBuffer *buf ) ++{ ++ GstMapInfo info; ++ obj_t str; ++ ++ if ( !gst_buffer_map( buf, &info, GST_MAP_READ )) ++ str = BNIL; ++ else { ++ str = string_to_bstring_len( (char *)info.data, (int)info.size ); ++ gst_buffer_unmap( buf, &info ); ++ } ++ return str; ++} ++ ++/*---------------------------------------------------------------------*/ ++/* void */ ++/* bgl_gst_buffer_set_string ... */ ++/*---------------------------------------------------------------------*/ ++void ++bgl_gst_buffer_set_string( GstBuffer *buf, obj_t str ) ++{ ++ GstMapInfo info; ++ long len = STRING_LENGTH (str); ++ ++ gst_buffer_set_size( buf, (gssize)len ); ++ if ( gst_buffer_map( buf, &info, GST_MAP_WRITE )) ++ { ++ memcpy( info.data, BSTRING_TO_STRING( str ), (size_t)len ); ++ gst_buffer_unmap( buf, &info ); ++ } ++} ++ ++/*---------------------------------------------------------------------*/ + /* static char * */ + /* bgl_gst_message_error_parser ... */ + /*---------------------------------------------------------------------*/ +@@ -1130,13 +1116,7 @@ bgl_gst_message_error_string( GstMessage + /*---------------------------------------------------------------------*/ + char * + bgl_gst_message_info_string( GstMessage *msg ) { +-#if( BGL_GSTREAMER_HAVE_PARSE_INFO ) +- /* gstreamer is recent enought, gst_message_parse_info is bound */ + return bgl_gst_message_error_parser( msg, &gst_message_parse_info ); +-#else +- /* gstreamer is too old, return a fake info string */ +- return "no info available (gstreamer too old)"; +-#endif + } + + /*---------------------------------------------------------------------*/ +@@ -1219,15 +1199,11 @@ bgl_gst_message_get_src( GstMessage *msg + /*---------------------------------------------------------------------*/ + int + bgl_gst_message_stream_status_type( GstMessage *msg ) { +-#if( defined( GST_MESSAGE_STREAM_STATUS ) ) + GstStreamStatusType type; + GstElement *el; + gst_message_parse_stream_status( msg, &type, &el ); + + return (int)type; +-#else +- return -1; +-#endif + } + + /*---------------------------------------------------------------------*/ +@@ -1267,10 +1243,9 @@ bgl_gst_element_interface_list( GstEleme + /*---------------------------------------------------------------------*/ + BGL_LONGLONG_T + bgl_gst_element_query_position( GstElement *el ) { +- GstFormat format = GST_FORMAT_TIME; + gint64 res; + +- if( gst_element_query_position( el, &format, &res ) ) ++ if( gst_element_query_position( el, GST_FORMAT_TIME, &res ) ) + return (BGL_LONGLONG_T)res; + else + return (BGL_LONGLONG_T)-1; +@@ -1282,10 +1257,9 @@ bgl_gst_element_query_position( GstEleme + /*---------------------------------------------------------------------*/ + BGL_LONGLONG_T + bgl_gst_element_query_duration( GstElement *el ) { +- GstFormat format = GST_FORMAT_TIME; + gint64 res; + +- if( gst_element_query_duration( el, &format, &res ) ) ++ if( gst_element_query_duration( el, GST_FORMAT_TIME, &res ) ) + return (BGL_LONGLONG_T)res; + else + return (BGL_LONGLONG_T)-1; +@@ -1349,7 +1323,7 @@ bgl_gst_structure_property_list( GstStru + obj_t + bgl_gst_caps_new_simple( obj_t media_type, obj_t pair, obj_t finalizer ) { + GstCaps *caps = gst_caps_new_empty(); +- GstStructure *s = gst_structure_empty_new( BSTRING_TO_STRING( media_type ) ); ++ GstStructure *s = gst_structure_new_empty( BSTRING_TO_STRING( media_type ) ); + + while( PAIRP( pair ) ) { + char *fid = BSTRING_TO_STRING( KEYWORD_TO_STRING( CAR( pair ) ) ); +@@ -1466,27 +1440,54 @@ bgl_gst_parse_launchv( obj_t args ) { + /* static gboolean */ + /* buffer_probe_call ... */ + /*---------------------------------------------------------------------*/ +-static gboolean +-buffer_probe_call( GstElement *el, GstBuffer *buffer, gpointer *data ) { ++static GstPadProbeReturn ++buffer_probe_call( GstPad *pad, GstPadProbeInfo *info, gpointer data ) { + obj_t proc = (obj_t)data; +- +- return CBOOL( PROCEDURE_ENTRY( proc )( proc, +- bgl_gst_buffer_new( buffer, BFALSE ), +- BEOA ) ); ++ GstBuffer *buffer = (GstBuffer *)info->data; ++ return (CBOOL (PROCEDURE_ENTRY( proc )( proc, ++ bgl_gst_buffer_new( buffer, BFALSE ), ++ BEOA ))) ++ ? GST_PAD_PROBE_OK ++ : GST_PAD_PROBE_DROP; + } + + /*---------------------------------------------------------------------*/ + /* int */ +-/* bgl_gst_pad_add_buffer_probe ... */ ++/* bgl_gst_pad_add_probe ... */ + /*---------------------------------------------------------------------*/ + int +-bgl_gst_pad_add_buffer_probe( GstPad *pad, obj_t proc ) { ++bgl_gst_pad_add_probe( GstPad *pad, GstPadProbeType mask, obj_t proc ) { + /* protect the closure from GC reclaim */ + /* CARE: when should it be freed? */ + bgl_closure_gcmark( proc ); +- return gst_pad_add_buffer_probe( pad, +- G_CALLBACK( &buffer_probe_call ), +- (gpointer)proc ); ++ return gst_pad_add_probe( pad, ++ mask, ++ buffer_probe_call, ++ (gpointer)proc, ++ NULL ); ++} ++ ++/*---------------------------------------------------------------------*/ ++/* gboolean */ ++/* bgl_gst_pad_set_caps ... */ ++/*---------------------------------------------------------------------*/ ++gboolean ++bgl_gst_pad_set_caps( GstPad *pad, GstCaps *caps ) { ++ gboolean res; ++ ++ if (caps != NULL && gst_caps_is_fixed (caps)) ++ { ++ res = FALSE; ++ } ++ else ++ { ++ GstEvent *event = gst_event_new_caps (caps); ++ if (GST_PAD_IS_SRC (pad)) ++ res = gst_pad_push_event (pad, event); ++ else ++ res = gst_pad_send_event (pad, event); ++ } ++ return res; + } + + /*---------------------------------------------------------------------*/ +@@ -1494,7 +1495,7 @@ bgl_gst_pad_add_buffer_probe( GstPad *pa + /* bus_sync_handler ... */ + /*---------------------------------------------------------------------*/ + static GstBusSyncReply +-bus_sync_handler( GstBus *bus, GstMessage *msg, gpointer *data ) { ++bus_sync_handler( GstBus *bus, GstMessage *msg, gpointer data ) { + obj_t proc = (obj_t)data; + callback_t cb = g_malloc( sizeof( struct callback ) ); + +@@ -1518,6 +1519,7 @@ bgl_gst_bus_set_sync_handler( GstBus *bu + bgl_closure_gcmark( proc ); + + return gst_bus_set_sync_handler( bus, +- (GstBusSyncHandler)&bus_sync_handler, +- (gpointer)proc ); ++ &bus_sync_handler, ++ (gpointer)proc, ++ NULL ); + } +--- api/gstreamer/src/Clib/bglgst_config.h.in.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Clib/bglgst_config.h.in 2019-11-12 11:30:37.844341179 -0700 +@@ -25,52 +25,4 @@ + #undef BGL_GSTREAMER_HAVE_PARSE_STREAM_STATUS + #define BGL_GSTREAMER_HAVE_PARSE_STREAM_STATUS @GSTREAMER_HAVE_PARSE_STREAM_STATUS@ + +-/*---------------------------------------------------------------------*/ +-/* Compatiblity kit */ +-/*---------------------------------------------------------------------*/ +-#if( !defined( GST_VALUE_HOLDS_STRUCTURE ) ) +-# if( defined( G_VALUE_HOLDS ) && defined( GST_TYPE_STRUCTURE ) ) +-# define GST_VALUE_HOLDS_STRUCTURE( x ) \ +- (G_VALUE_HOLDS( x, GST_TYPE_STRUCTURE )) +-# else +-# define GST_VALUE_HOLDS_STRUCTURE( x ) (0) +-# endif +-#endif +- +-#if( defined( GST_MESSAGE_SRC_NAME ) ) +-# define BGL_GSTREAMER_HAVE_PARSE_INFO 1 +-#else +-# define BGL_GSTREAMER_HAVE_PARSE_INFO 0 +-# define GST_MESSAGE_ASYNC_START (GST_MESSAGE_ANY - 1) +-# define GST_MESSAGE_ASYNC_DONE (GST_MESSAGE_ANY - 2) +-#endif +- +-#if( !defined( GST_STREAM_STATUS_TYPE_CREATE ) ) +-# define GST_STREAM_STATUS_TYPE_CREATE 1 +-#endif +- +-#if( !defined( GST_STREAM_STATUS_TYPE_ENTER ) ) +-# define GST_STREAM_STATUS_TYPE_ENTER 2 +-#endif +- +-#if( !defined( GST_STREAM_STATUS_TYPE_LEAVE ) ) +-# define GST_STREAM_STATUS_TYPE_LEAVE 3 +-#endif +- +-#if( !defined( GST_STREAM_STATUS_TYPE_DESTROY ) ) +-# define GST_STREAM_STATUS_TYPE_DESTROY 4 +-#endif +- +-#if( !defined( GST_STREAM_STATUS_TYPE_START ) ) +-# define GST_STREAM_STATUS_TYPE_START 5 +-#endif +- +-#if( !defined( GST_STREAM_STATUS_TYPE_PAUSE ) ) +-# define GST_STREAM_STATUS_TYPE_PAUSE 6 +-#endif +- +-#if( !defined( GST_STREAM_STATUS_TYPE_STOP ) ) +-# define GST_STREAM_STATUS_TYPE_STOP 7 +-#endif +- + #endif +--- api/gstreamer/src/Clib/bglgst.h.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Clib/bglgst.h 2019-11-13 10:19:00.334554173 -0700 +@@ -73,10 +73,11 @@ extern obj_t bgl_gst_element_factory_get + + extern obj_t bgl_gst_caps_new_simple( obj_t, obj_t, obj_t ); + ++extern obj_t bgl_gst_buffer_get_string( GstBuffer * ); ++extern void bgl_gst_buffer_set_string( GstBuffer *, obj_t ); + +-extern int bgl_gst_pad_add_buffer_probe( GstPad *, obj_t ); +-/* extern obj_t bgl_gst_pad_add_data_probe( GstPad *, obj_t ); */ +-/* extern obj_t bgl_gst_pad_add_event_probe( GstPad *, obj_t ); */ ++extern int bgl_gst_pad_add_probe( GstPad *, GstPadProbeType, obj_t ); ++extern gboolean bgl_gst_pad_set_caps( GstPad *pad, GstCaps *caps ); + + extern obj_t bgl_gst_message_tag_list( GstMessage * ); + extern char *bgl_gst_message_error_string( GstMessage * ); +@@ -86,6 +87,7 @@ extern GstState bgl_gst_message_new_stat + extern GstState bgl_gst_message_old_state( GstMessage * ); + extern GstState bgl_gst_message_pending_state( GstMessage * ); + extern obj_t bgl_gst_message_get_src( GstMessage * ); ++extern int bgl_gst_message_stream_status_type( GstMessage * ); + + extern obj_t bgl_gst_object_property_list( GstObject * ); + extern obj_t bgl_gst_object_get_property( GstObject *, char * ); +--- api/gstreamer/src/Clib/bglgst_thread.c.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Clib/bglgst_thread.c 2019-11-13 12:44:34.941223903 -0700 +@@ -14,6 +14,7 @@ + #endif + #include + #include ++#include + #include "bglgst_config.h" + #include + #if( defined( BGL_GSTREAMER_USE_THREADS ) ) +@@ -32,179 +33,30 @@ extern obj_t bglpth_thread_thunk(); + void *bglpth_thread_new(); + + /*---------------------------------------------------------------------*/ +-/* static GMutex * */ +-/* bglgst_mutex_new ... */ +-/*---------------------------------------------------------------------*/ +-static GMutex * +-bglgst_mutex_new() { +- GMutex *result = (GMutex *)g_new( pthread_mutex_t, 1 ); +- pthread_mutex_init( (pthread_mutex_t *)result, 0L ); +- +- return result; +-} +- +-/*---------------------------------------------------------------------*/ +-/* int */ +-/* bglgst_mutex_lock ... */ +-/*---------------------------------------------------------------------*/ +-static int +-bglgst_mutex_lock( pthread_mutex_t *mutex ) { +- return pthread_mutex_lock( mutex ); +-} +- +-/*---------------------------------------------------------------------*/ +-/* static gboolean */ +-/* bglgst_mutex_trylock ... */ +-/*---------------------------------------------------------------------*/ +-static gboolean +-bglgst_mutex_trylock( GMutex *mutex ) { +- int result = pthread_mutex_trylock( (pthread_mutex_t *)mutex ); +- +- if (result == EBUSY) +- return FALSE; +- +- return TRUE; +-} +- +-/*---------------------------------------------------------------------*/ +-/* int */ +-/* bglgst_mutex_unlock ... */ +-/*---------------------------------------------------------------------*/ +-static int +-bglgst_mutex_unlock( pthread_mutex_t *mutex ) { +- return pthread_mutex_unlock( mutex ); +-} +- +-/*---------------------------------------------------------------------*/ +-/* static void */ +-/* bglgst_mutex_free ... */ +-/*---------------------------------------------------------------------*/ +-static void +-bglgst_mutex_free( GMutex *mutex ) { +- pthread_mutex_destroy( (pthread_mutex_t *)mutex ); +- g_free( mutex ); +-} +- +- +-/*---------------------------------------------------------------------*/ +-/* static GCond * */ +-/* bglgst_cond_new ... */ +-/*---------------------------------------------------------------------*/ +-static GCond * +-bglgst_cond_new() { +- GCond *result = (GCond *)g_new( pthread_cond_t, 1 ); +- pthread_cond_init( (pthread_cond_t *)result, 0L ); +- +- return result; +-} +- +-/*---------------------------------------------------------------------*/ +-/* static int */ +-/* bglgst_pthread_cond_signal ... */ +-/*---------------------------------------------------------------------*/ +-static int +-bglgst_pthread_cond_signal( pthread_cond_t *cond ) { +- return pthread_cond_signal( cond ); +-} +- +-/*---------------------------------------------------------------------*/ +-/* static int */ +-/* bglgst_pthread_cond_broadcast ... */ +-/*---------------------------------------------------------------------*/ +-static int +-bglgst_pthread_cond_broadcast( pthread_cond_t *cond ) { +- return pthread_cond_broadcast( cond ); +-} +- +-/*---------------------------------------------------------------------*/ +-/* static int */ +-/* bglgst_pthread_cond_wait ... */ +-/*---------------------------------------------------------------------*/ +-static int +-bglgst_pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex ) { +- return pthread_cond_wait( cond, mutex ); +-} +- +-/*---------------------------------------------------------------------*/ +-/* static gboolean */ +-/* bglgst_cond_timed_wait ... */ +-/*---------------------------------------------------------------------*/ +-static gboolean +-bglgst_cond_timed_wait( GCond *cond, +- GMutex *entered_mutex, +- GTimeVal *abs_time ) { +-#define G_NSEC_PER_SEC 1000000000 +- int result; +- struct timespec end_time; +- gboolean timed_out; +- +- g_return_val_if_fail( cond != NULL, FALSE ); +- g_return_val_if_fail( entered_mutex != NULL, FALSE ); +- +- if( !abs_time ) { +- result = pthread_cond_wait( (pthread_cond_t *)cond, +- (pthread_mutex_t *)entered_mutex ); +- timed_out = FALSE; +- } else { +- end_time.tv_sec = abs_time->tv_sec; +- end_time.tv_nsec = abs_time->tv_usec * (G_NSEC_PER_SEC / G_USEC_PER_SEC); +- +- g_return_val_if_fail( end_time.tv_nsec < G_NSEC_PER_SEC, TRUE ); +- +- result = pthread_cond_timedwait( (pthread_cond_t *) cond, +- (pthread_mutex_t *) entered_mutex, +- &end_time ); +- timed_out = (result == ETIMEDOUT); +- } +- +- return !timed_out; +-} +- +-/*---------------------------------------------------------------------*/ +-/* static void */ +-/* bglgst_cond_free ... */ +-/*---------------------------------------------------------------------*/ +-static void +-bglgst_cond_free( GCond *cond ) { +- pthread_cond_destroy( (pthread_cond_t *)cond ); +- g_free( cond ); +-} +- +-/*---------------------------------------------------------------------*/ +-/* static GPrivate * */ +-/* bglgst_private_new ... */ ++/* GRealThread */ + /*---------------------------------------------------------------------*/ +-static GPrivate * +-bglgst_private_new( GDestroyNotify destructor ) { +- GPrivate *result = (GPrivate *)g_new( pthread_key_t, 1 ); +- pthread_key_create( (pthread_key_t *) result, destructor ); ++typedef struct _GRealThread GRealThread; ++struct _GRealThread ++{ ++ GThread thread; + +- return result; +-} ++ gint ref_count; ++ gboolean ours; ++ gchar *name; ++ gpointer retval; ++}; + + /*---------------------------------------------------------------------*/ +-/* static void */ +-/* bglgst_private_set ... */ ++/* GThreadPosix */ + /*---------------------------------------------------------------------*/ +-static void +-bglgst_private_set( GPrivate *private_key, gpointer value ) { +- if( !private_key ) +- return; +- +- pthread_setspecific( *(pthread_key_t *)private_key, value ); +-} ++typedef struct ++{ ++ GRealThread thread; + +-/*---------------------------------------------------------------------*/ +-/* static gpointer */ +-/* bglgst_private_get ... */ +-/*---------------------------------------------------------------------*/ +-static gpointer +-bglgst_private_get( GPrivate *private_key ) { +- if( !private_key ) +- return NULL; +- +- return (gpointer)pthread_getspecific( *(pthread_key_t *)private_key ); +-} ++ pthread_t system_thread; ++ gboolean joined; ++ GMutex lock; ++} GThreadPosix; + + /*---------------------------------------------------------------------*/ + /* static void * */ +@@ -230,144 +82,62 @@ bglgst_thread_run( void *self ) { + } + + /*---------------------------------------------------------------------*/ +-/* static void */ +-/* bglgst_thread_create ... */ ++/* GRealThread * */ ++/* g_system_thread_new ... */ + /*---------------------------------------------------------------------*/ +-static void +-bglgst_thread_create( GThreadFunc thread_func, +- gpointer arg, +- gulong stack_size, +- gboolean joinable, +- gboolean bound, +- GThreadPriority priority, +- gpointer thread, +- GError **error ) { +- pthread_attr_t attr; +- gint ret; +- void *self = bglpth_thread_new( MAKE_PAIR( (obj_t)thread_func, (obj_t)arg ) ); +- +- bglpth_thread_env_create( self, BFALSE ); +- +- g_return_if_fail( thread_func ); +- g_return_if_fail( priority >= G_THREAD_PRIORITY_LOW ); +- g_return_if_fail( priority <= G_THREAD_PRIORITY_URGENT ); +- +- pthread_attr_init( &attr ); +- +- if( stack_size ) { +- /* No error check here, because some systems can't do it and +- * we simply don't want threads to fail because of that. */ +- pthread_attr_setstacksize( &attr, stack_size ); +- } +- +- if( bound ) +- /* No error check here, because some systems can't do it and we +- * simply don't want threads to fail because of that. */ +- pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM ); +- +- pthread_attr_setdetachstate( &attr, +- joinable ? +- PTHREAD_CREATE_JOINABLE +- : PTHREAD_CREATE_DETACHED ); +- +- ret = pthread_create( thread, &attr, bglgst_thread_run, self ); +- +- pthread_attr_destroy( &attr ); +- +- if( ret == EAGAIN ) { +- g_set_error (error, G_THREAD_ERROR, G_THREAD_ERROR_AGAIN, +- "Error creating thread: %s", g_strerror( ret ) ); +- return; +- } +- +- return; +-} ++GRealThread * ++g_system_thread_new (GThreadFunc proxy, ++ gulong stack_size, ++ const char *name, ++ GThreadFunc func, ++ gpointer data, ++ GError **error) ++{ ++ void *self; ++ GThreadPosix *thread; ++ GRealThread *base_thread; ++ pthread_attr_t attr; ++ gint ret; + +-/*---------------------------------------------------------------------*/ +-/* static void */ +-/* bglgst_thread_yield ... */ +-/*---------------------------------------------------------------------*/ +-static void +-bglgst_thread_yield() { +- sched_yield(); +-} ++ thread = g_slice_new0( GThreadPosix ); ++ base_thread = (GRealThread*)thread; ++ base_thread->ref_count = 2; ++ base_thread->ours = TRUE; ++ base_thread->thread.joinable = TRUE; ++ base_thread->thread.func = func; ++ base_thread->thread.data = data; ++ base_thread->name = g_strdup( name ); + +-/*---------------------------------------------------------------------*/ +-/* static void */ +-/* bglgst_thread_join ... */ +-/*---------------------------------------------------------------------*/ +-static void +-bglgst_thread_join( gpointer thread ) { +- gpointer ignore; +- pthread_join( *(pthread_t*)thread, &ignore ); +-} ++ pthread_attr_init( &attr ); + +-/*---------------------------------------------------------------------*/ +-/* static void */ +-/* bglgst_thread_exit ... */ +-/*---------------------------------------------------------------------*/ +-static void +-bglgst_thread_exit() { +- pthread_exit( NULL ); +-} ++#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE ++ if ( stack_size ) { ++#ifdef _SC_THREAD_STACK_MIN ++ long min_stack_size = sysconf( _SC_THREAD_STACK_MIN ); ++ if ( min_stack_size >= 0 ) ++ stack_size = MAX( (gulong) min_stack_size, stack_size ); ++#endif /* _SC_THREAD_STACK_MIN */ ++ /* No error check here, because some systems can't do it and ++ * we simply don't want threads to fail because of that. */ ++ pthread_attr_setstacksize( &attr, stack_size ); ++ } ++#endif /* HAVE_PTHREAD_ATTR_SETSTACKSIZE */ + ++ self = bglpth_thread_new( MAKE_PAIR( (obj_t)proxy, (obj_t)thread ) ); ++ bglpth_thread_env_create( self, BFALSE ); + +-/*---------------------------------------------------------------------*/ +-/* static void */ +-/* bglgst_thread_set_priority ... */ +-/*---------------------------------------------------------------------*/ +-static void +-bglgst_thread_set_priority( gpointer thread, GThreadPriority priority ) { +- return; +-} ++ ret = pthread_create( &thread->system_thread, &attr, bglgst_thread_run, self ); + +-/*---------------------------------------------------------------------*/ +-/* static void */ +-/* bglgst_thread_self ... */ +-/*---------------------------------------------------------------------*/ +-static void +-bglgst_thread_self( gpointer thread ) { +- *(pthread_t *)thread = pthread_self(); +-} ++ pthread_attr_destroy( &attr ); + +-/*---------------------------------------------------------------------*/ +-/* static gboolean */ +-/* bglgst_thread_equal ... */ +-/*---------------------------------------------------------------------*/ +-static gboolean +-bglgst_thread_equal( gpointer thread1, gpointer thread2 ) { +- return (pthread_equal( *(pthread_t *)thread1, *(pthread_t *)thread2 ) != 0); +-} ++ if ( ret == EAGAIN ) { ++ g_set_error( error, G_THREAD_ERROR, G_THREAD_ERROR_AGAIN, ++ "Error creating thread: %s", g_strerror( ret )); ++ g_slice_free( GThreadPosix, thread ); ++ return NULL; ++ } + +-/*---------------------------------------------------------------------*/ +-/* void */ +-/* bglgst_thread_init ... */ +-/*---------------------------------------------------------------------*/ +-void +-bglgst_thread_init() { +- static GThreadFunctions g_thread_functions_for_bigloo = { +- &bglgst_mutex_new, +- (void (*)(GMutex *))&bglgst_mutex_lock, +- &bglgst_mutex_trylock, +- (void (*)(GMutex *))&bglgst_mutex_unlock, +- &bglgst_mutex_free, +- &bglgst_cond_new, +- (void (*)(GCond *))&bglgst_pthread_cond_signal, +- (void (*)(GCond *))&bglgst_pthread_cond_broadcast, +- (void (*)(GCond *, GMutex *))&bglgst_pthread_cond_wait, +- &bglgst_cond_timed_wait, +- &bglgst_cond_free, +- &bglgst_private_new, +- &bglgst_private_get, +- &bglgst_private_set, +- &bglgst_thread_create, +- &bglgst_thread_yield, +- &bglgst_thread_join, +- &bglgst_thread_exit, +- &bglgst_thread_set_priority, +- &bglgst_thread_self, +- &bglgst_thread_equal +- }; ++ g_mutex_init( &thread->lock ); + +- g_thread_init( &g_thread_functions_for_bigloo ); ++ return (GRealThread *)thread; + } +--- api/gstreamer/src/Llib/gstbin.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstbin.scm 2019-11-20 12:18:11.408326233 -0700 +@@ -16,15 +16,16 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror ++ (use __gstreamer_gsterror + __gstreamer_gstobject + __gstreamer_gstelementfactory + __gstreamer_gstpluginfeature + __gstreamer_gstelement +- __gstreamer_gstpad + __gstreamer_gstcaps + __gstreamer_gststructure) + ++ (import __gstreamer_gstpad) ++ + (export (class gst-bin::gst-element + (elements::pair-nil (default '()))) + +--- api/gstreamer/src/Llib/gstbuffer.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstbuffer.scm 2019-11-20 12:01:24.043057769 -0700 +@@ -16,10 +16,9 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror +- __gstreamer_gstobject +- __gstreamer_gststructure +- __gstreamer_gstcaps) ++ (use __gstreamer_gsterror) ++ ++ (import __gstreamer_gststructure) + + (extern (macro $string-to-bstring-len::bstring + (::string ::long) "string_to_bstring_len") +@@ -33,25 +32,30 @@ + read-only + (get (lambda (o) + (with-access::gst-buffer o ($builtin) +- ($gst-buffer-size $builtin))))) ++ ($gst-buffer-get-size $builtin))))) + (data::string + (get (lambda (o) + (with-access::gst-buffer o ($builtin) +- ($gst-buffer-data $builtin)))) ++ ($gst-buffer-get-string $builtin)))) + (set (lambda (o v) + (with-access::gst-buffer o ($builtin) +- ($gst-buffer-set-data! $builtin v (string-length v))) ++ ($gst-buffer-set-string! $builtin v)) + o))) +- (caps::gst-caps ++ (dts::llong + read-only + (get (lambda (o) + (with-access::gst-buffer o ($builtin) +- ($make-gst-caps ($gst-buffer-caps $builtin) #f))))) ++ ($gst-buffer-dts $builtin))))) ++ (pts::llong ++ read-only ++ (get (lambda (o) ++ (with-access::gst-buffer o ($builtin) ++ ($gst-buffer-pts $builtin))))) + (timestamp::llong + read-only + (get (lambda (o) + (with-access::gst-buffer o ($builtin) +- ($gst-buffer-timestamp $builtin))))) ++ ($gst-buffer-dts-or-pts $builtin))))) + (duration::llong + read-only + (get (lambda (o) +@@ -74,7 +78,7 @@ + ;*---------------------------------------------------------------------*/ + (define (%gst-buffer-init o::gst-buffer) + (with-access::gst-buffer o ($builtin $finalizer) +- (when ($gst-element-null? $builtin) ++ (when ($gst-buffer-null? $builtin) + (raise (instantiate::&gst-create-error + (proc '%gst-buffer-init) + (msg "Illegal gst-buffer") +--- api/gstreamer/src/Llib/gstbus.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstbus.scm 2019-11-20 12:03:24.345964429 -0700 +@@ -16,10 +16,10 @@ + + (include "gst.sch") + +- (import __gstreamer_gstreamer +- __gstreamer_gstobject +- __gstreamer_gstmessage ++ (use __gstreamer_gstobject + __gstreamer_gststructure) ++ ++ (import __gstreamer_gstmessage) + + (export (class gst-bus::gst-object) + +@@ -60,8 +60,8 @@ + (define (gst-bus-post o::gst-bus msg::gst-message) + (with-access::gst-message msg ((mbuiltin $builtin)) + (with-access::gst-bus o ((obuiltin $builtin)) +- ($gst-message-ref! ($gst-message mbuiltin)) +- ($gst-bus-post ($gst-bus obuiltin) ($gst-message mbuiltin))))) ++ ($gst-message-ref! mbuiltin) ++ ($gst-bus-post ($gst-bus obuiltin) mbuiltin)))) + + ;*---------------------------------------------------------------------*/ + ;* gst-bus-peek ... */ +--- api/gstreamer/src/Llib/gstcaps.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstcaps.scm 2019-11-20 12:01:59.930433303 -0700 +@@ -16,9 +16,9 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror +- __gstreamer_gstobject +- __gstreamer_gststructure) ++ (use __gstreamer_gsterror) ++ ++ (import __gstreamer_gststructure) + + (export (class gst-caps + (%gst-caps-init) +@@ -107,7 +107,7 @@ + ((not (keyword? (car a))) + (bigloo-type-error 'gst-caps-new-simple 'keyword (car a))) + ((null? (cdr a)) +- (error 'gst-caps-new-simple "Miising value for attribute" (car a))) ++ (error 'gst-caps-new-simple "Missing value for attribute" (car a))) + (else + (loop (cddr a)))))) + ; +@@ -142,8 +142,7 @@ + (define (gst-caps-merge! caps1 caps2) + (with-access::gst-caps caps1 ((builtin1 $builtin)) + (with-access::gst-caps caps2 ((builtin2 $builtin)) +- ($gst-caps-merge builtin1 builtin2))) +- caps1) ++ ($make-gst-caps ($gst-caps-merge builtin1 builtin2) #t)))) + + ;*---------------------------------------------------------------------*/ + ;* gst-caps-append-structure! ... */ +@@ -160,8 +159,7 @@ + (define (gst-caps-merge-structure! caps1 s) + (with-access::gst-caps caps1 ((builtin1 $builtin)) + (with-access::gst-structure s ((builtin2 $builtin)) +- ($gst-caps-merge-structure builtin1 builtin2))) +- caps1) ++ ($make-gst-caps ($gst-caps-merge-structure builtin1 builtin2) #t)))) + + ;*---------------------------------------------------------------------*/ + ;* gst-caps-remove-structure! ... */ +--- api/gstreamer/src/Llib/gstelementfactory.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstelementfactory.scm 2019-11-20 12:14:49.369942305 -0700 +@@ -16,43 +16,44 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror ++ (use __gstreamer_gsterror + __gstreamer_gstobject +- __gstreamer_gstpluginfeature +- __gstreamer_gstelement +- __gstreamer_gstpad + __gstreamer_gstcaps + __gstreamer_gststructure) ++ ++ (import __gstreamer_gstpluginfeature ++ __gstreamer_gstelement ++ __gstreamer_gstpad) + + (export (class gst-element-factory::gst-plugin-feature + (longname::string + read-only + (get (lambda (o) + (with-access::gst-element-factory o ($builtin) +- ($gst-element-factory-get-longname +- ($gst-element-factory +- $builtin)))))) ++ ($gst-element-factory-get-metadata ++ ($gst-element-factory $builtin) ++ $gst-element-metadata-long-name))))) + (klass::string + read-only + (get (lambda (o) + (with-access::gst-element-factory o ($builtin) +- ($gst-element-factory-get-klass +- ($gst-element-factory +- $builtin)))))) ++ ($gst-element-factory-get-metadata ++ ($gst-element-factory $builtin) ++ $gst-element-metadata-klass))))) + (description::string + read-only + (get (lambda (o) + (with-access::gst-element-factory o ($builtin) +- ($gst-element-factory-get-description +- ($gst-element-factory +- $builtin)))))) ++ ($gst-element-factory-get-metadata ++ ($gst-element-factory $builtin) ++ $gst-element-metadata-description))))) + (author::string + read-only + (get (lambda (o) + (with-access::gst-element-factory o ($builtin) +- ($gst-element-factory-get-author +- ($gst-element-factory +- $builtin)))))) ++ ($gst-element-factory-get-metadata ++ ($gst-element-factory $builtin) ++ $gst-element-metadata-author))))) + (uri-protocols::pair-nil + read-only + (get (lambda (o) +@@ -74,8 +75,8 @@ + (gst-element-factory-create::gst-element ::gst-element-factory . a) + (gst-element-factory-find::obj ::bstring) + (gst-element-factory-has-interface?::bool ::gst-element-factory ::bstring) +- (gst-element-factory-can-sink-caps?::bool ::gst-element-factory ::gst-caps) +- (gst-element-factory-can-src-caps?::bool ::gst-element-factory ::gst-caps)) ++ (gst-element-factory-can-sink-all-caps?::bool ::gst-element-factory ::gst-caps) ++ (gst-element-factory-can-src-all-caps?::bool ::gst-element-factory ::gst-caps)) + + (extern (export $make-gst-element-factory "bgl_gst_element_factory_new"))) + +@@ -175,21 +176,21 @@ + name))) + + ;*---------------------------------------------------------------------*/ +-;* gst-element-factory-can-sink-caps? ... */ ++;* gst-element-factory-can-sink-all-caps? ... */ + ;*---------------------------------------------------------------------*/ +-(define (gst-element-factory-can-sink-caps? factory caps) ++(define (gst-element-factory-can-sink-all-caps? factory caps) + (with-access::gst-element-factory factory ($builtin) + (with-access::gst-caps caps ((caps-builtin $builtin)) +- ($gst-element-factory-can-sink-caps? ++ ($gst-element-factory-can-sink-all-caps? + ($gst-element-factory $builtin) + caps-builtin)))) + + ;*---------------------------------------------------------------------*/ +-;* gst-element-factory-can-src-caps? ... */ ++;* gst-element-factory-can-src-all-caps? ... */ + ;*---------------------------------------------------------------------*/ +-(define (gst-element-factory-can-src-caps? factory caps) ++(define (gst-element-factory-can-src-all-caps? factory caps) + (with-access::gst-element-factory factory ($builtin) + (with-access::gst-caps caps ((caps-builtin $builtin)) +- ($gst-element-factory-can-src-caps? ++ ($gst-element-factory-can-src-all-caps? + ($gst-element-factory $builtin) + caps-builtin)))) +--- api/gstreamer/src/Llib/gstelement.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstelement.scm 2019-11-20 12:13:39.875186110 -0700 +@@ -16,12 +16,13 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror ++ (use __gstreamer_gsterror + __gstreamer_gstobject +- __gstreamer_gstpluginfeature + __gstreamer_gststructure ++ __gstreamer_gstcaps) ++ ++ (import __gstreamer_gstpluginfeature + __gstreamer_gstelementfactory +- __gstreamer_gstcaps + __gstreamer_gstpad + __gstreamer_gstreamer) + +@@ -162,7 +163,7 @@ + (with-access::gst-caps caps ((caps-builtin $builtin)) + (unless ($gst-element-link-filtered! ($gst-element e0-builtin) + ($gst-element e1-builtin) +- ($gst-caps caps-builtin)) ++ caps-builtin) + (raise (instantiate::&gst-error + (proc 'gst-element-link-filtered!) + (msg "Element cannot be linked") +--- api/gstreamer/src/Llib/gstghostpad.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstghostpad.scm 2019-11-20 12:19:36.358805789 -0700 +@@ -16,11 +16,12 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror ++ (use __gstreamer_gsterror + __gstreamer_gstobject + __gstreamer_gstcaps +- __gstreamer_gststructure +- __gstreamer_gstpad) ++ __gstreamer_gststructure) ++ ++ (import __gstreamer_gstpad) + + (export (class gst-ghost-pad::gst-pad + (target::gst-pad +--- api/gstreamer/src/Llib/gstmessage.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstmessage.scm 2019-11-20 12:02:34.400833496 -0700 +@@ -16,8 +16,9 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror +- __gstreamer_gstobject ++ (use __gstreamer_gsterror) ++ ++ (import __gstreamer_gstobject + __gstreamer_gststructure) + + (export (class gst-message +@@ -371,7 +372,9 @@ + ;*---------------------------------------------------------------------*/ + (define (gst-message-new-async-done src::gst-object) + (with-access::gst-object src ($builtin) +- ($make-gst-message ($gst-message-new-async-done $builtin) #t))) ++ ($make-gst-message ++ ($gst-message-new-async-done $builtin $gst-clock-time-none) ++ #t))) + + ;*---------------------------------------------------------------------*/ + ;* gst-message-new-latency ... */ +--- api/gstreamer/src/Llib/gstmm_music.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstmm_music.scm 2019-11-20 12:23:24.003731379 -0700 +@@ -19,10 +19,9 @@ + + (include "gst.sch") + +- (import __gstreamer_gstreamer ++ (use __gstreamer_gstreamer + __gstreamer_gstobject + __gstreamer_gstelement +- __gstreamer_gstregistry + __gstreamer_gstelementfactory + __gstreamer_gstpluginfeature + __gstreamer_gstpad +@@ -30,9 +29,10 @@ + __gstreamer_gstbin + __gstreamer_gstcaps + __gstreamer_gststructure +- __gstreamer_gstpipeline +- __gstreamer_gstelement + __gstreamer_gstmessage) ++ ++ (import __gstreamer_gstregistry ++ __gstreamer_gstpipeline) + + (export (class gstmusic::music + +--- api/gstreamer/src/Llib/gstpad.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstpad.scm 2019-11-20 12:15:32.902163164 -0700 +@@ -16,11 +16,12 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror ++ (use __gstreamer_gsterror + __gstreamer_gstobject + __gstreamer_gstcaps +- __gstreamer_gststructure +- __gstreamer_gstelement ++ __gstreamer_gststructure) ++ ++ (import __gstreamer_gstelement + __gstreamer_gstelementfactory + __gstreamer_gstpluginfeature) + +@@ -51,7 +52,9 @@ + (get (lambda (o) + (with-access::gst-pad o ($builtin) + ($make-gst-caps +- ($gst-pad-get-caps ($gst-pad $builtin)) ++ ($gst-pad-query-caps ++ ($gst-pad $builtin) ++ ($gst-caps-nil)) + #t)))) + (set (lambda (o v) + (with-access::gst-pad o ($builtin) +@@ -66,11 +69,11 @@ + ($gst-pad $builtin)))) + (unless ($gst-caps-null? c) + ($make-gst-caps c #t))))))) +- (negotiated-caps ++ (current-caps + read-only + (get (lambda (o) + (with-access::gst-pad o ($builtin) +- (let ((c ($gst-pad-get-negotiated-caps ++ (let ((c ($gst-pad-get-current-caps + ($gst-pad $builtin)))) + (unless ($gst-caps-null? c) + ($make-gst-caps c #t))))))) +@@ -81,7 +84,6 @@ + (let ((c ($gst-pad-get-pad-template-caps + ($gst-pad $builtin)))) + (unless ($gst-caps-null? c) +- ($gst-caps-ref! c) + ($make-gst-caps c #t)))))))) + + ($make-gst-pad::obj ::$gst-pad ::obj) +@@ -90,12 +92,8 @@ + (gst-pad-can-link?::bool ::gst-pad ::gst-pad) + (gst-pad-is-linked?::bool ::gst-pad) + (gst-pad-unlink! ::gst-pad ::gst-pad) +- (gst-pad-add-buffer-probe!::int ::gst-pad ::procedure) +-;* (gst-pad-add-data-probe!::int ::gst-pad ::procedure) */ +-;* (gst-pad-add-event-probe!::int ::gst-pad ::procedure) */ +- (gst-pad-remove-buffer-probe! ::gst-pad ::int) +-;* (gst-pad-remove-data-probe! ::gst-pad ::int) */ +-;* (gst-pad-remove-event-probe! ::gst-pad ::int) */ ++ (gst-pad-add-probe!::int ::gst-pad ::$gst-pad-probe-type ::procedure) ++ (gst-pad-remove-probe! ::gst-pad ::int) + + ($gst-pad-direction->obj::obj link::$gst-pad-direction) + ($gst-pad-presence->obj::obj link::$gst-pad-presence)) +@@ -200,47 +198,18 @@ + ($gst-pad-unlink! ($gst-pad src-builtin) ($gst-pad sink-builtin))))) + + ;*---------------------------------------------------------------------*/ +-;* gst-pad-add-buffer-probe! ... */ ++;* gst-pad-add-probe! ... */ + ;*---------------------------------------------------------------------*/ +-(define (gst-pad-add-buffer-probe! pad proc) ++(define (gst-pad-add-probe! pad mask proc) + (with-access::gst-pad pad ($builtin) + (if (correct-arity? proc 0) +- ($gst-pad-add-buffer-probe! ($gst-pad $builtin) proc) +- (error 'gst-pad-add-buffer-probe! "Arity 0 procedure expected" proc)))) +- +-;* {*---------------------------------------------------------------------*} */ +-;* {* gst-pad-add-data-probe! ... *} */ +-;* {*---------------------------------------------------------------------*} */ +-;* (define (gst-pad-add-data-probe! pad proc) */ +-;* (if (not (correct-arity? proc) 0) */ +-;* (error 'gst-pad-add-data-probe! "Arity 0 procedure expected" proc) */ +-;* ($gst-pad-add-data-probe! ($gst-pad (gst-pad-$builtin src)) proc))) */ +-;* */ +-;* {*---------------------------------------------------------------------*} */ +-;* {* gst-pad-add-event-probe! ... *} */ +-;* {*---------------------------------------------------------------------*} */ +-;* (define (gst-pad-add-event-probe! pad proc) */ +-;* (if (not (correct-arity? proc) 0) */ +-;* (error 'gst-pad-add-event-probe! "Arity 0 procedure expected" proc) */ +-;* ($gst-pad-add-event-probe! ($gst-pad (gst-pad-$builtin src)) proc))) */ ++ ($gst-pad-add-probe! ($gst-pad $builtin) mask proc) ++ (error 'gst-pad-add-probe! "Arity 0 procedure expected" proc)))) + + ;*---------------------------------------------------------------------*/ +-;* gst-pad-remove-buffer-probe! ... */ ++;* gst-pad-remove-probe! ... */ + ;*---------------------------------------------------------------------*/ +-(define (gst-pad-remove-buffer-probe! pad index) ++(define (gst-pad-remove-probe! pad index) + (with-access::gst-pad pad ($builtin) +- ($gst-pad-remove-buffer-probe! ($gst-pad $builtin) index)) ++ ($gst-pad-remove-probe! ($gst-pad $builtin) index)) + index) +- +-;* {*---------------------------------------------------------------------*} */ +-;* {* gst-pad-remove-data-probe! ... *} */ +-;* {*---------------------------------------------------------------------*} */ +-;* (define (gst-pad-remove-data-probe! pad index) */ +-;* ($gst-pad-remove-data-probe! ($gst-pad (gst-pad-$builtin src)) index))) */ +-;* */ +-;* {*---------------------------------------------------------------------*} */ +-;* {* gst-pad-remove-event-probe! ... *} */ +-;* {*---------------------------------------------------------------------*} */ +-;* (define (gst-pad-remove-event-probe! pad index) */ +-;* ($gst-pad-remove-event-probe! ($gst-pad (gst-pad-$builtin src)) index))) */ +- +--- api/gstreamer/src/Llib/gstpadtemplate.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstpadtemplate.scm 2019-11-20 12:20:13.134147576 -0700 +@@ -14,12 +14,12 @@ + ;*---------------------------------------------------------------------*/ + (module __gstreamer_gstpadtemplate + +- (import __gstreamer_gsterror ++ (use __gstreamer_gsterror + __gstreamer_gstobject +- __gstreamer_gstghostpad +- __gstreamer_gstpad + __gstreamer_gstcaps + __gstreamer_gststructure) ++ ++ (import __gstreamer_gstpad) + + (export (class gst-pad-template::gst-object) + +--- api/gstreamer/src/Llib/gstparse.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstparse.scm 2019-11-20 12:20:53.670422058 -0700 +@@ -16,15 +16,15 @@ + + (include "gst.sch") + +- (import __gstreamer_gstreamer +- __gstreamer_gstobject +- __gstreamer_gstpad ++ (use __gstreamer_gstobject + __gstreamer_gstcaps + __gstreamer_gststructure + __gstreamer_gstelementfactory + __gstreamer_gstpluginfeature + __gstreamer_gstelement) + ++ (import __gstreamer_gstpad) ++ + (export (gst-parse-launch::obj ::bstring . ::obj) + (gst-parse-launchv::obj ::pair-nil))) + +--- api/gstreamer/src/Llib/gstpipeline.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstpipeline.scm 2019-11-20 12:22:20.202873292 -0700 +@@ -16,18 +16,18 @@ + + (include "gst.sch") + +- (import __gstreamer_gstreamer +- __gstreamer_gstobject ++ (use __gstreamer_gstobject + __gstreamer_gstelement + __gstreamer_gstelementfactory + __gstreamer_gstpluginfeature + __gstreamer_gstpad +- __gstreamer_gstbus +- __gstreamer_gstbin + __gstreamer_gstcaps + __gstreamer_gststructure + __gstreamer_gstmessage) + ++ (import __gstreamer_gstbus ++ __gstreamer_gstbin) ++ + (export (class gst-pipeline::gst-bin + (bus + read-only +--- api/gstreamer/src/Llib/gstpluginfeature.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstpluginfeature.scm 2019-11-06 15:46:47.929194299 -0700 +@@ -33,7 +33,7 @@ + read-only + (get (lambda (o) + (with-access::gst-plugin-feature o ($builtin) +- ($gst-plugin-feature-plugin-name ++ ($gst-plugin-feature-get-plugin-name + ($gst-plugin-feature $builtin)))))) + (rank::uint + (get (lambda (o) +--- api/gstreamer/src/Llib/gstplugin.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstplugin.scm 2019-11-20 09:35:48.729494027 -0700 +@@ -16,8 +16,7 @@ + + (include "gst.sch") + +- (import __gstreamer_gstreamer +- __gstreamer_gstobject) ++ (import __gstreamer_gstobject) + + (export (class gst-plugin::gst-object + (name::string +--- api/gstreamer/src/Llib/gstreamer.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstreamer.scm 2019-11-20 12:04:15.169080074 -0700 +@@ -20,35 +20,16 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror +- __gstreamer_gstobject +- __gstreamer_gststructure +- __gstreamer_gstcaps +- __gstreamer_gstbuffer +- __gstreamer_gsttypefind +- __gstreamer_gstpluginfeature +- __gstreamer_gstmessage +- __gstreamer_gstplugin +- __gstreamer_gstpluginfeature +- __gstreamer_gstpad +- __gstreamer_gstpadtemplate +- __gstreamer_gstghostpad +- __gstreamer_gstbus +- __gstreamer_plugin_bglports) ++ (use __gstreamer_gstobject ++ __gstreamer_gststructure) ++ ++ (import __gstreamer_gstcaps ++ __gstreamer_gstmessage) + + (with __gstreamer_gstobject + __gstreamer_gststructure + __gstreamer_gstcaps +- __gstreamer_gstbuffer +- __gstreamer_gsttypefind +- __gstreamer_gstpluginfeature +- __gstreamer_gstmessage +- __gstreamer_gstplugin +- __gstreamer_gstpad +- __gstreamer_gstpadtemplate +- __gstreamer_gstghostpad +- __gstreamer_gstbus +- __gstreamer_plugin_bglports) ++ __gstreamer_gstmessage) + + (extern (include "bglgst_config.h") + (macro $configure-gstreamer-version::string "BGL_GSTREAMER_VERSION") +--- api/gstreamer/src/Llib/gstregistry.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gstregistry.scm 2019-11-20 12:21:28.852792366 -0700 +@@ -16,14 +16,14 @@ + + (include "gst.sch") + +- (import __gstreamer_gstreamer +- __gstreamer_gstobject ++ (use __gstreamer_gstobject + __gstreamer_gstelement +- __gstreamer_gstpad + __gstreamer_gstpluginfeature + __gstreamer_gstelementfactory + __gstreamer_gstcaps +- __gstreamer_gststructure ++ __gstreamer_gststructure) ++ ++ (import __gstreamer_gstpad + __gstreamer_gstplugin) + + (export (class gst-registry::gst-object) +@@ -48,7 +48,7 @@ + (set! default-registry + (instantiate::gst-registry + ($builtin ($gst-registry->object +- ($gst-registry-get-default)))))) ++ ($gst-registry-get)))))) + default-registry) + + ;*---------------------------------------------------------------------*/ +@@ -59,7 +59,7 @@ + (if (isa? registry gst-registry) + (with-access::gst-registry registry ($builtin) + ($gst-registry $builtin)) +- ($gst-registry-get-default)))) ++ ($gst-registry-get)))) + + ;*---------------------------------------------------------------------*/ + ;* gst-registry-plugin-list ... */ +@@ -69,7 +69,7 @@ + (if (isa? registry gst-registry) + (with-access::gst-registry registry ($builtin) + ($gst-registry $builtin)) +- ($gst-registry-get-default)))) ++ ($gst-registry-get)))) + + ;*---------------------------------------------------------------------*/ + ;* gst-registry-feature-list-by-plugin ... */ +@@ -79,7 +79,7 @@ + (if (isa? registry gst-registry) + (with-access::gst-registry registry ($builtin) + ($gst-registry $builtin)) +- ($gst-registry-get-default)) ++ ($gst-registry-get)) + (cond + ((isa? plugin gst-plugin) + (with-access::gst-plugin plugin (name) name)) +@@ -98,7 +98,7 @@ + (if (isa? registry gst-registry) + (with-access::gst-registry registry ($builtin) + ($gst-registry $builtin)) +- ($gst-registry-get-default)) ++ ($gst-registry-get)) + name))) + (unless ($gst-plugin-null? plugin) + ($make-gst-plugin plugin %gst-object-finalize!)))) +@@ -111,7 +111,7 @@ + (if (isa? registry gst-registry) + (with-access::gst-registry registry ($builtin) + ($gst-registry $builtin)) +- ($gst-registry-get-default)) ++ ($gst-registry-get)) + name + type))) + (unless ($gst-plugin-feature-null? feature) +--- api/gstreamer/src/Llib/gst.sch.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gst.sch 2019-11-13 14:53:17.734032009 -0700 +@@ -40,9 +40,9 @@ + (infix macro $gst-buffer-nil::$gst-buffer () "0L") + (macro $gst-buffer-new::$gst-buffer + () "gst_buffer_new") +- (macro $gst-buffer-new-and-alloc::$gst-buffer +- (::int) "gst_buffer_new_alloc") +- (macro $gst-buffer-ref!::void ++ (macro $gst-buffer-new-allocate::$gst-buffer ++ (::void* ::int ::void*) "gst_buffer_new_allocate") ++ (macro $gst-buffer-ref!::$gst-buffer + (::$gst-buffer) "gst_buffer_ref") + (macro $gst-buffer-unref!::void + (::$gst-buffer) "gst_buffer_unref") +@@ -50,18 +50,22 @@ + (::$gst-buffer) "(bool_t)!") + (macro $gst-buffer->object::$gst-object + (::$gst-buffer) "(GstObject *)") +- (macro $gst-buffer-size::long +- (::$gst-buffer) "GST_BUFFER_SIZE") +- (macro $gst-buffer-data::string +- (::$gst-buffer) "GST_BUFFER_DATA") +- (macro $gst-buffer-set-data!::void +- (::$gst-buffer ::string ::int) "gst_buffer_set_data") +- (macro $gst-buffer-timestamp::$gst-clock-time +- (::$gst-buffer) "GST_BUFFER_TIMESTAMP") ++ (macro $gst-buffer-get-size::long ++ (::$gst-buffer) "gst_buffer_get_size") ++ (macro $gst-buffer-set-size!::void ++ (::$gst-buffer ::long) "gst_buffer_set_size") ++ (macro $gst-buffer-get-string::obj ++ (::$gst-buffer) "bgl_gst_buffer_get_string") ++ (macro $gst-buffer-set-string!::void ++ (::$gst-buffer ::obj) "bgl_gst_buffer_set_string") ++ (macro $gst-buffer-dts::$gst-clock-time ++ (::$gst-buffer) "GST_BUFFER_DTS") ++ (macro $gst-buffer-pts::$gst-clock-time ++ (::$gst-buffer) "GST_BUFFER_PTS") ++ (macro $gst-buffer-dts-or-pts::$gst-clock-time ++ (::$gst-buffer) "GST_BUFFER_DTS_OR_PTS") + (macro $gst-buffer-duration::$gst-clock-time + (::$gst-buffer) "GST_BUFFER_DURATION") +- (macro $gst-buffer-caps::$gst-caps +- (::$gst-buffer) "GST_BUFFER_CAPS") + + ;; gst-bus + (type $gst-bus void* "GstBus *") +@@ -92,7 +96,7 @@ + (macro $gst-bus-wait-playing::void + (::$gst-bus ::obj) "bgl_gst_bus_wait_playing") + +- ;; gst-bus-fun ++ ;; gst-bus-func + (type $gst-bus-func void* "GstBusFunc") + + ;; gst-caps +@@ -104,25 +108,25 @@ + (::$gst-caps) "(GstObject *)") + (macro $gst-caps::$gst-caps + (::$gst-object) "GST_CAPS") +- (macro $gst-caps-ref!::void ++ (macro $gst-caps-ref!::$gst-caps + (::$gst-caps) "gst_caps_ref") + (macro $gst-caps-unref!::void + (::$gst-caps) "gst_caps_unref") +- (macro $gst-caps-get-size::long ++ (macro $gst-caps-get-size::uint + (::$gst-caps) "gst_caps_get_size") + (macro $gst-caps-get-structure::$gst-structure +- (::$gst-caps ::long) "gst_caps_get_structure") ++ (::$gst-caps ::uint) "gst_caps_get_structure") + (macro $gst-caps-is-always-compatible?::bool + (::$gst-caps ::$gst-caps) "gst_caps_is_always_compatible") + (macro $gst-caps-new-simple::obj + (::bstring ::pair-nil ::procedure) "bgl_gst_caps_new_simple") + (macro $gst-caps-append::void + (::$gst-caps ::$gst-caps) "gst_caps_append") +- (macro $gst-caps-merge::void ++ (macro $gst-caps-merge::$gst-caps + (::$gst-caps ::$gst-caps) "gst_caps_merge") + (macro $gst-caps-append-structure::void + (::$gst-caps ::$gst-structure) "gst_caps_append_structure") +- (macro $gst-caps-merge-structure::void ++ (macro $gst-caps-merge-structure::$gst-caps + (::$gst-caps ::$gst-structure) "gst_caps_merge_structure") + (macro $gst-caps-remove-structure::void + (::$gst-caps ::uint) "gst_caps_remove_structure") +@@ -167,7 +171,7 @@ + (macro $gst-element-set-state!::$gst-state-change-return + (::$gst-element ::$gst-state) "gst_element_set_state") + (macro $gst-element-get-state::$gst-state-change-return +- (::$gst-element ::long ::long ::llong) "gst_element_get_state") ++ (::$gst-element ::long ::long ::$gst-clock-time) "gst_element_get_state") + (macro $gst-element-add-pad!::bool + (::$gst-element ::$gst-pad) "gst_element_add_pad") + (macro $gst-element-get-static-pad::$gst-pad +@@ -176,6 +180,8 @@ + (::$gst-element ::string) "gst_element_get_request_pad") + (macro $gst-element-get-compatible-pad::$gst-pad + (::$gst-element ::$gst-pad ::$gst-caps) "gst_element_get_compatible_pad") ++ (macro $gst-element-get-start-time::$gst-clock-time ++ (::$gst-element) "gst_element_get_start_time") + (macro $gst-element-get-base-time::$gst-clock-time + (::$gst-element) "gst_element_get_base_time") + (macro $gst-element-get-clock::$gst-clock +@@ -210,23 +216,33 @@ + (macro $gst-element-factory-make::$gst-element + (::string ::string) "gst_element_factory_make") + (infix macro $gst-element-factory-name-nil::string () "(char *)0L") +- (macro $gst-element-factory-get-longname::string +- (::$gst-element-factory) "(char *)gst_element_factory_get_longname") +- (macro $gst-element-factory-get-klass::string +- (::$gst-element-factory) "(char *)gst_element_factory_get_klass") +- (macro $gst-element-factory-get-description::string +- (::$gst-element-factory) "(char *)gst_element_factory_get_description") +- (macro $gst-element-factory-get-author::string +- (::$gst-element-factory) "(char *)gst_element_factory_get_author") ++ (macro $gst-element-factory-get-metadata::string ++ (::$gst-element-factory ::string) "(char *)gst_element_factory_get_metadata") + (macro $gst-element-factory-get-uri-protocols::pair-nil + (::$gst-element-factory) "bgl_gst_element_factory_get_uri_protocols") +- (macro $gst-element-factory-can-sink-caps?::bool +- (::$gst-element-factory ::$gst-caps) "gst_element_factory_can_sink_caps") +- (macro $gst-element-factory-can-src-caps?::bool +- (::$gst-element-factory ::$gst-caps) "gst_element_factory_can_src_caps") ++ (macro $gst-element-factory-can-sink-all-caps?::bool ++ (::$gst-element-factory ::$gst-caps) ++ "gst_element_factory_can_sink_all_caps") ++ (macro $gst-element-factory-can-src-all-caps?::bool ++ (::$gst-element-factory ::$gst-caps) ++ "gst_element_factory_can_src_all_caps") + (macro $gst-element-factory-get-static-pad-templates::pair-nil + (::$gst-element-factory) "bgl_gst_element_factory_get_static_pad_templates") + ++ ;; gst-element-metadata ++ (macro $gst-element-metadata-author::string ++ "GST_ELEMENT_METADATA_AUTHOR") ++ (macro $gst-element-metadata-doc-uri::string ++ "GST_ELEMENT_METADATA_DOC_URI") ++ (macro $gst-element-metadata-description::string ++ "GST_ELEMENT_METADATA_DESCRIPTION") ++ (macro $gst-element-metadata-icon-name::string ++ "GST_ELEMENT_METADATA_ICON_NAME") ++ (macro $gst-element-metadata-klass::string ++ "GST_ELEMENT_METADATA_KLASS") ++ (macro $gst-element-metadata-long-name::string ++ "GST_ELEMENT_METADATA_LONGNAME") ++ + ;; gst-format + (type $gst-format long "GstFormat") + (macro $gst-format-undefined::$gst-format +@@ -247,7 +263,7 @@ + (infix macro $gst-ghost-pad-nil::$gst-ghost-pad () "0L") + (macro $gst-ghost-pad-null?::bool + (::$gst-ghost-pad) "(bool_t)!") +- (macro $gst-ghost-pad-new::$gst-element ++ (macro $gst-ghost-pad-new::$gst-pad + (::string ::$gst-pad) "gst_ghost_pad_new") + (macro $gst-ghost-pad->object::$gst-object + (::$gst-ghost-pad) "(GstObject *)") +@@ -267,7 +283,7 @@ + (::$gst-message) "(GstObject *)") + (macro $gst-message::$gst-message + (::$gst-object) "GST_MESSAGE") +- (macro $gst-message-ref!::void ++ (macro $gst-message-ref!::$gst-message + (::$gst-message) "gst_message_ref") + (macro $gst-message-unref!::void + (::$gst-message) "gst_message_unref") +@@ -310,7 +326,7 @@ + (macro $gst-message-new-state-dirty::$gst-message + (::$gst-object) "gst_message_new_state_dirty") + (macro $gst-message-new-async-done::$gst-message +- (::$gst-object) "gst_message_new_async_done") ++ (::$gst-object ::$gst-clock-time) "gst_message_new_async_done") + (macro $gst-message-new-latency::$gst-message + (::$gst-object) "gst_message_new_latency") + +@@ -354,32 +370,66 @@ + "GST_MESSAGE_SEGMENT_START") + (macro $gst-message-segment-done::$gst-message-type + "GST_MESSAGE_SEGMENT_DONE") +- (macro $gst-message-duration::$gst-message-type +- "GST_MESSAGE_DURATION") ++ (macro $gst-message-duration-changed::$gst-message-type ++ "GST_MESSAGE_DURATION_CHANGED") + (macro $gst-message-latency::$gst-message-type + "GST_MESSAGE_LATENCY") + (macro $gst-message-async-start::$gst-message-type + "GST_MESSAGE_ASYNC_START") + (macro $gst-message-async-done::$gst-message-type + "GST_MESSAGE_ASYNC_DONE") ++ (macro $gst-message-request-state::$gst-message-type ++ "GST_MESSAGE_REQUEST_STATE") ++ (macro $gst-message-step-start::$gst-message-type ++ "GST_MESSAGE_STEP_START") ++ (macro $gst-message-qos::$gst-message-type ++ "GST_MESSAGE_QOS") ++ (macro $gst-message-progress::$gst-message-type ++ "GST_MESSAGE_PROGRESS") ++ (macro $gst-message-toc::$gst-message-type ++ "GST_MESSAGE_TOC") ++ (macro $gst-message-reset-time::$gst-message-type ++ "GST_MESSAGE_RESET_TIME") ++ (macro $gst-message-stream-start::$gst-message-type ++ "GST_MESSAGE_STREAM_START") ++ (macro $gst-message-need-context::$gst-message-type ++ "GST_MESSAGE_NEED_CONTEXT") ++ (macro $gst-message-have-context::$gst-message-type ++ "GST_MESSAGE_HAVE_CONTEXT") ++ (macro $gst-message-extended::$gst-message-type ++ "GST_MESSAGE_EXTENDED") ++ (macro $gst-message-device-added::$gst-message-type ++ "GST_MESSAGE_DEVICE_ADDED") ++ (macro $gst-message-device-removed::$gst-message-type ++ "GST_MESSAGE_DEVICE_REMOVED") ++ (macro $gst-message-property-notify::$gst-message-type ++ "GST_MESSAGE_PROPERTY_NOTIFY") ++ (macro $gst-message-stream-collection::$gst-message-type ++ "GST_MESSAGE_STREAM_COLLECTION") ++ (macro $gst-message-streams-selected::$gst-message-type ++ "GST_MESSAGE_STREAMS_SELECTED") ++ (macro $gst-message-redirect::$gst-message-type ++ "GST_MESSAGE_REDIRECT") ++ (macro $gst-message-device-changed::$gst-message-type ++ "GST_MESSAGE_DEVICE_CHANGED") + (macro $gst-message-any::$gst-message-type + "GST_MESSAGE_ANY") + + ;; gst-stream-status-type + (type $gst-stream-status-type long "GstStreamStatusType") +- (macro $gst-stream-status-type-create::$gst-message-type ++ (macro $gst-stream-status-type-create::$gst-stream-status-type + "GST_STREAM_STATUS_TYPE_CREATE") +- (macro $gst-stream-status-type-enter::$gst-message-type ++ (macro $gst-stream-status-type-enter::$gst-stream-status-type + "GST_STREAM_STATUS_TYPE_ENTER") +- (macro $gst-stream-status-type-leave::$gst-message-type ++ (macro $gst-stream-status-type-leave::$gst-stream-status-type + "GST_STREAM_STATUS_TYPE_LEAVE") +- (macro $gst-stream-status-type-destroy::$gst-message-type ++ (macro $gst-stream-status-type-destroy::$gst-stream-status-type + "GST_STREAM_STATUS_TYPE_DESTROY") +- (macro $gst-stream-status-type-start::$gst-message-type ++ (macro $gst-stream-status-type-start::$gst-stream-status-type + "GST_STREAM_STATUS_TYPE_START") +- (macro $gst-stream-status-type-pause::$gst-message-type ++ (macro $gst-stream-status-type-pause::$gst-stream-status-type + "GST_STREAM_STATUS_TYPE_PAUSE") +- (macro $gst-stream-status-type-stop::$gst-message-type ++ (macro $gst-stream-status-type-stop::$gst-stream-status-type + "GST_STREAM_STATUS_TYPE_STOP") + + ;* ;; gst-mixer */ +@@ -454,7 +504,7 @@ + (infix macro $gst-object-nil::$gst-object () "0L") + (macro $gst-object-null?::bool + (::$gst-object) "(bool_t)!") +- (macro $gst-object-ref!::void ++ (macro $gst-object-ref!::$gst-object + (::$gst-object) "gst_object_ref") + (macro $gst-object-unref!::void + (::$gst-object) "gst_object_unref") +@@ -476,7 +526,7 @@ + (infix macro $gst-pad-nil::$gst-pad () "0L") + (macro $gst-pad-null?::bool + (::$gst-pad) "(bool_t)!") +- (macro $gst-pad-new::$gst-element ++ (macro $gst-pad-new::$gst-pad + (::string ::$gst-pad-direction) "gst_pad_new") + (macro $gst-pad->object::$gst-object + (::$gst-pad) "(GstObject *)") +@@ -496,35 +546,27 @@ + (::$gst-pad) "gst_pad_is_linked") + (macro $gst-pad-unlink!::bool + (::$gst-pad ::$gst-pad) "gst_pad_unlink") +- (macro $gst-pad-get-caps::$gst-caps +- (::$gst-pad) "gst_pad_get_caps") ++ (macro $gst-pad-query-caps::$gst-caps ++ (::$gst-pad ::$gst-caps) "gst_pad_query_caps") + (macro $gst-pad-set-caps!::bool +- (::$gst-pad ::$gst-caps) "gst_pad_set_caps") ++ (::$gst-pad ::$gst-caps) "bgl_gst_pad_set_caps") + (macro $gst-pad-get-allowed-caps::$gst-caps + (::$gst-pad) "gst_pad_get_allowed_caps") +- (macro $gst-pad-get-negotiated-caps::$gst-caps +- (::$gst-pad) "gst_pad_get_negotiated_caps") ++ (macro $gst-pad-get-current-caps::$gst-caps ++ (::$gst-pad) "gst_pad_get_current_caps") + (macro $gst-pad-get-pad-template-caps::$gst-caps +- (::$gst-pad) "(GstCaps *)gst_pad_get_pad_template_caps") +- (macro $gst-pad-add-buffer-probe!::int +- (::$gst-pad ::procedure) "bgl_gst_pad_add_buffer_probe") +-;* (macro $gst-pad-add-data-probe!::int */ +-;* (::$gst-pad ::procedure) "bgl_gst_pad_add_data_probe") */ +-;* (macro $gst-pad-add-event-probe!::int */ +-;* (::$gst-pad ::procedure) "bgl_gst_pad_add_event_probe") */ +- (macro $gst-pad-remove-buffer-probe!::void +- (::$gst-pad ::int) "gst_pad_remove_buffer_probe") +-;* (macro $gst-remove-add-data-probe!::int */ +-;* (::$gst-pad ::int) "gst_pad_remove_data_probe") */ +-;* (macro $gst-remove-add-event-probe!::int */ +-;* (::$gst-pad ::int) "gst_pad_remove_event_probe") */ ++ (::$gst-pad) "gst_pad_get_pad_template_caps") ++ (macro $gst-pad-add-probe!::ulong ++ (::$gst-pad ::$gst-pad-probe-type ::procedure) "bgl_gst_pad_add_probe") ++ (macro $gst-pad-remove-probe!::void ++ (::$gst-pad ::int) "gst_pad_remove_probe") + + ;; gst-pad-template + (type $gst-pad-template void* "GstPadTemplate *") + (infix macro $gst-pad-template-nil::$gst-pad-template () "0L") + (macro $gst-pad-template-null?::bool + (::$gst-pad-template) "(bool_t)!") +- (macro $gst-pad-template-new::$gst-element ++ (macro $gst-pad-template-new::$gst-pad-template + (::string ::$gst-pad-direction ::$gst-pad-presence ::$gst-caps) + "gst_pad_template_new") + (macro $gst-pad-template->object::$gst-object +@@ -532,12 +574,6 @@ + (macro $gst-pad-template::$gst-pad-template + (::$gst-object) "GST_PAD_TEMPLATE") + +- ;; gst-parse +- (macro $gst-parse-launch::obj +- (::string) "bgl_gst_parse_launch") +- (macro $gst-parse-launchv::obj +- (::pair-nil) "bgl_gst_parse_launchv") +- + ;; gst-pad-link-return + (type $gst-pad-link-return long "GstPadLinkReturn") + (macro $gst-pad-link-ok::$gst-pad-link-return +@@ -572,6 +608,59 @@ + "GST_PAD_SOMETIMES") + (macro $gst-pad-request::$gst-pad-presence + "GST_PAD_REQUEST") ++ ++ ;; gst-pad-probe-type ++ (type $gst-pad-probe-type long "GstPadProbeType") ++ (macro $gst-pad-probe-type-invalid::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_INVALID") ++ (macro $gst-pad-probe-type-idle::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_IDLE") ++ (macro $gst-pad-probe-type-BLOCK::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_BLOCK") ++ (macro $gst-pad-probe-type-buffer::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_BUFFER") ++ (macro $gst-pad-probe-type-buffer-list::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_BUFFER_LIST") ++ (macro $gst-pad-probe-type-event-downstream::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM") ++ (macro $gst-pad-probe-type-event-upstream::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_EVENT_UPSTREAM") ++ (macro $gst-pad-probe-type-event-flush::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_EVENT_FLUSH") ++ (macro $gst-pad-probe-type-query-downstream::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM") ++ (macro $gst-pad-probe-type-query-upstream::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_QUERY_UPSTREAM") ++ (macro $gst-pad-probe-type-push::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_PUSH") ++ (macro $gst-pad-probe-type-pull::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_PULL") ++ (macro $gst-pad-probe-type-blocking::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_BLOCKING") ++ (macro $gst-pad-probe-type-data-downstream::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM") ++ (macro $gst-pad-probe-type-data-upstream::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_DATA_UPSTREAM") ++ (macro $gst-pad-probe-type-data-both::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_DATA_BOTH") ++ (macro $gst-pad-probe-type-block-downstream::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM") ++ (macro $gst-pad-probe-type-block-upstream::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM") ++ (macro $gst-pad-probe-type-event-both::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_EVENT_BOTH") ++ (macro $gst-pad-probe-type-query-both::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_QUERY_BOTH") ++ (macro $gst-pad-probe-type-all-both::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_ALL_BOTH") ++ (macro $gst-pad-probe-type-scheduling::$gst-pad-probe-type ++ "GST_PAD_PROBE_TYPE_SCHEDULING") ++ ++ ;; gst-parse ++ (macro $gst-parse-launch::obj ++ (::string) "bgl_gst_parse_launch") ++ (macro $gst-parse-launchv::obj ++ (::pair-nil) "bgl_gst_parse_launchv") + + ;; gst-pipeline + (type $gst-pipeline void* "GstPipeline *") +@@ -588,8 +677,6 @@ + (::$gst-pipeline) "gst_pipeline_get_clock") + (macro $gst-pipeline-set-clock!::bool + (::$gst-pipeline ::$gst-clock) "gst_pipeline_set_clock") +- (macro $gst-pipeline-get-last-stream-time::$gst-clock-time +- (::$gst-pipeline) "gst_pipeline_get_last_stream_time") + + ;; gst-plugin + (type $gst-plugin void* "GstPlugin *") +@@ -628,13 +715,13 @@ + (::$gst-object) "GST_PLUGIN_FEATURE") + (macro $gst-plugin-feature-name::string + (::$gst-plugin-feature) "(char *)gst_plugin_feature_get_name") +- (infix macro $gst-plugin-feature-plugin-name::string +- (::$gst-plugin-feature) "->plugin_name") ++ (macro $gst-plugin-feature-get-plugin-name::string ++ (::$gst-plugin-feature) "(char *)gst_plugin_feature_get_plugin_name") + (macro $gst-plugin-feature-set-name!::string + (::$gst-plugin-feature ::string) "gst_plugin_feature_set_name") + (macro $gst-plugin-feature-rank::uint + (::$gst-plugin-feature) "gst_plugin_feature_get_rank") +- (macro $gst-plugin-feature-set-rank!::string ++ (macro $gst-plugin-feature-set-rank!::void + (::$gst-plugin-feature ::uint) "gst_plugin_feature_set_rank") + + ;; gst-state +@@ -659,8 +746,8 @@ + (::$gst-registry) "(GstObject *)") + (macro $gst-registry::$gst-registry + (::$gst-object) "GST_REGISTRY") +- (macro $gst-registry-get-default::$gst-registry +- () "gst_registry_get_default") ++ (macro $gst-registry-get::$gst-registry ++ () "gst_registry_get") + (macro $gst-registry-get-element-factory-list::pair-nil + (::$gst-registry) "bgl_gst_registry_get_element_factory_list") + (macro $gst-registry-get-feature-list-by-plugin::pair-nil +@@ -684,6 +771,18 @@ + "GST_SEEK_FLAG_KEY_UNIT") + (macro $gst-seek-flag-segment::$gst-seek-flags + "GST_SEEK_FLAG_SEGMENT") ++ (macro $gst-seek-flag-trickmode::$gst-seek-flags ++ "GST_SEEK_FLAG_TRICKMODE") ++ (macro $gst-seek-flag-snap-before::$gst-seek-flags ++ "GST_SEEK_FLAG_SNAP_BEFORE") ++ (macro $gst-seek-flag-snap-after::$gst-seek-flags ++ "GST_SEEK_FLAG_SNAP_AFTER") ++ (macro $gst-seek-flag-snap-nearest::$gst-seek-flags ++ "GST_SEEK_FLAG_SNAP_NEAREST") ++ (macro $gst-seek-flag-trickmode-key-units::$gst-seek-flags ++ "GST_SEEK_FLAG_TRICKMODE_KEY_UNITS") ++ (macro $gst-seek-flag-trickmode-no-audio::$gst-seek-flags ++ "GST_SEEK_FLAG_TRICKMODE_NO_AUDIO") + + ;; gst-state-change-return + (type $gst-state-change-return long "GstStateChangeReturn") +@@ -701,12 +800,8 @@ + (infix macro $gst-static-pad-template-nil::$gst-static-pad-template () "0L") + (macro $gst-static-pad-template-null?::bool + (::$gst-static-pad-template) "(bool_t)!") +- (macro $gst-static-pad-template->object::$gst-object +- (::$gst-static-pad-template) "(GstObject *)") +- (macro $gst-static-pad-template::$gst-static-pad-template +- (::$gst-object) "GST_STATIC_PAD_TEMPLATE") +- (infix macro $gst-static-pad-template-name-template::string +- (::$gst-static-pad-template) "->name_template") ++ (macro $gst-static-pad-template-name-template::string ++ (::$gst-static-pad-template) "(char *)GST_PAD_TEMPLATE_NAME_TEMPLATE") + (infix macro $gst-static-pad-template-direction::$gst-pad-direction + (::$gst-static-pad-template) "->direction") + (infix macro $gst-static-pad-template-presence::$gst-pad-presence +@@ -719,8 +814,8 @@ + (::$gst-structure) "(bool_t)!") + (macro $gst-structure->object::$gst-object + (::$gst-structure) "(GstObject *)") +- (macro $gst-structure-empty-new::$gst-structure +- (::string) "gst_structure_empty_new") ++ (macro $gst-structure-new-empty::$gst-structure ++ (::string) "gst_structure_new_empty") + (macro $gst-structure::$gst-structure + (::$gst-object) "GST_STRUCTURE") + (macro $gst-structure-free!::void +@@ -741,8 +836,6 @@ + (infix macro $gst-type-find-nil::$gst-type-find () "0L") + (macro $gst-type-find-null?::bool + (::$gst-type-find) "(bool_t)!") +- (macro $gst-type-find::$gst-type-find +- (::$gst-object) "GST_TYPE_FIND") + + ;; bgl-gst-ports-src + (type $bgl-port-src void* "BglPortSrc *") +--- api/gstreamer/src/Llib/gststructure.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gststructure.scm 2019-11-20 09:39:20.047154867 -0700 +@@ -16,8 +16,7 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror +- __gstreamer_gstobject) ++ (import __gstreamer_gsterror) + + (export (class gst-structure + (%gst-structure-init) +--- api/gstreamer/src/Llib/gsttypefind.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Llib/gsttypefind.scm 2019-11-20 09:40:33.703021145 -0700 +@@ -16,11 +16,7 @@ + + (include "gst.sch") + +- (import __gstreamer_gsterror +- __gstreamer_gstobject +- __gstreamer_gstcaps +- __gstreamer_gststructure) +- ++ (import __gstreamer_gsterror) + + (export (class gst-type-find + (%gst-type-find-init) +--- api/gstreamer/src/Misc/make_lib.scm.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Misc/make_lib.scm 2019-11-19 15:31:34.796770757 -0700 +@@ -23,7 +23,6 @@ + __gstreamer_gstbin + __gstreamer_gstbuffer + __gstreamer_gstbus +- __gstreamer_gstghostpad + __gstreamer_gstpipeline + __gstreamer_gstplugin + __gstreamer_gstpluginfeature +@@ -31,6 +30,7 @@ + __gstreamer_gstregistry + __gstreamer_gstpad + __gstreamer_gstpadtemplate ++ __gstreamer_gstghostpad + __gstreamer_gstmessage + __gstreamer_gstcaps + __gstreamer_gststructure +--- api/gstreamer/src/Plugin/bglgst_port.c.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Plugin/bglgst_port.c 2019-11-13 09:03:54.248834074 -0700 +@@ -56,29 +56,14 @@ plugin_init( GstPlugin * plugin ) { + /*---------------------------------------------------------------------*/ + gboolean + bgl_gst_plugin_port_init() { +-#if( defined( GST_PLUGIN_DEFINE_STATIC ) ) +- GST_PLUGIN_DEFINE( PLUGIN_VERSION_MAJOR, +- PLUGIN_VERSION_MINOR, +- PLUGIN_NAME, +- PLUGIN_DESC, +- plugin_init, +- PLUGIN_VERSION, +- PLUGIN_LICENSE, +- PLUGIN_PACKAGE, +- PLUGIN_URL ); +- +- _gst_plugin_register_static( &gst_plugin_desc ); +-#else +- gst_plugin_register_static( PLUGIN_VERSION_MAJOR, +- PLUGIN_VERSION_MINOR, +- PLUGIN_NAME, +- PLUGIN_DESC, +- plugin_init, +- PLUGIN_VERSION, +- PLUGIN_LICENSE, +- PLUGIN_PACKAGE, +- PLUGIN_URL); +-#endif +- +- return TRUE; ++ return gst_plugin_register_static( PLUGIN_VERSION_MAJOR, ++ PLUGIN_VERSION_MINOR, ++ PLUGIN_NAME, ++ PLUGIN_DESC, ++ plugin_init, ++ PLUGIN_VERSION, ++ PLUGIN_LICENSE, ++ PACKAGE, ++ PLUGIN_PACKAGE, ++ PLUGIN_URL ); + } +--- api/gstreamer/src/Plugin/bglgst_portsink.c.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Plugin/bglgst_portsink.c 2019-11-18 13:49:41.195774202 -0700 +@@ -56,17 +56,46 @@ enum { + /*---------------------------------------------------------------------*/ + /* Boilerplate */ + /*---------------------------------------------------------------------*/ +-#define _do_init( _ ) \ +- GST_DEBUG_CATEGORY_INIT( bgl_gst_port_sink_debug, \ +- "bglportsink", \ +- 0, \ +- "bglportsink element" ); + +-GST_BOILERPLATE_FULL( BglPortSink, +- bgl_gst_port_sink, +- GstBaseSink, +- GST_TYPE_BASE_SINK, +- _do_init ); ++/* None of the boilerplate macros expand to a call to g_type_register_static, ++ * just g_type_register_static_simple, so we write this by hand. ++ */ ++static void bgl_gst_port_sink_base_init (gpointer klass); ++static void bgl_gst_port_sink_class_init (gpointer klass, gpointer class_data); ++static void bgl_gst_port_sink_init (GTypeInstance *instance, gpointer klass); ++ ++static gpointer bgl_gst_port_sink_parent_class = NULL; ++ ++GType ++bgl_gst_port_sink_get_type (void) ++{ ++ static volatile gsize g_define_type_id__volatile = 0; ++ ++ if (g_once_init_enter (&g_define_type_id__volatile)) { ++ static const GTypeInfo BglPortSinkTypeInfo = { ++ (guint16) sizeof (BglPortSinkClass), ++ bgl_gst_port_sink_base_init, ++ NULL, /* base_finalize */ ++ bgl_gst_port_sink_class_init, ++ NULL, /* class_finalize */ ++ NULL, /* class_data */ ++ (guint16) sizeof (BglPortSink), ++ 0, /* n_preallocs */ ++ bgl_gst_port_sink_init, ++ NULL /* value_table */ ++ }; ++ ++ GType g_define_type_id = ++ g_type_register_static (GST_TYPE_BASE_SINK, ++ g_intern_static_string ("BglPortSink"), ++ &BglPortSinkTypeInfo, ++ (GTypeFlags) 0); ++ GST_DEBUG_CATEGORY_INIT( bgl_gst_port_sink_debug, "bglportsink", 0, ++ "bglportsink element" ); ++ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); ++ } ++ return g_define_type_id__volatile; ++} + + /*---------------------------------------------------------------------*/ + /* static void */ +@@ -146,7 +175,8 @@ bgl_gst_port_sink_get_property( GObject + } + + +-static gboolean bgl_gst_port_sink_query (GstPad * pad, GstQuery * query); ++static gboolean bgl_gst_port_sink_query (GstPad * pad, GstObject *parent, ++ GstQuery * query); + + static GstFlowReturn bgl_gst_port_sink_render (GstBaseSink * sink, + GstBuffer * buffer); +@@ -160,19 +190,17 @@ static gboolean bgl_gst_port_sink_stop ( + /*---------------------------------------------------------------------*/ + static void + bgl_gst_port_sink_base_init( gpointer g_class ) { +- static GstElementDetails element_details = { +- "Bigloo output-port sink", +- "Sink", +- "Write stream to a bigloo port", +- "Cyprien Nicolas " +- }; + GstElementClass *element_class = GST_ELEMENT_CLASS( g_class ); + + gst_element_class_add_pad_template( + element_class, gst_static_pad_template_get( &sinktemplate ) ); + +- gst_element_class_set_details( +- element_class, &element_details ); ++ gst_element_class_set_static_metadata( ++ element_class, ++ "Bigloo output-port sink", ++ "Sink", ++ "Write stream to a bigloo port", ++ "Cyprien Nicolas " ); + } + + /*---------------------------------------------------------------------*/ +@@ -180,10 +208,12 @@ bgl_gst_port_sink_base_init( gpointer g_ + /* bgl_gst_port_sink_class_init ... */ + /*---------------------------------------------------------------------*/ + static void +-bgl_gst_port_sink_class_init( BglPortSinkClass *klass ) { ++bgl_gst_port_sink_class_init( gpointer klass, gpointer class_data ) { + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + GstBaseSinkClass *gstbasesink_class = GST_BASE_SINK_CLASS (klass); + ++ bgl_gst_port_sink_parent_class = g_type_class_peek_parent (klass); ++ + gobject_class->set_property = + GST_DEBUG_FUNCPTR( bgl_gst_port_sink_set_property ); + gobject_class->get_property = +@@ -219,11 +249,11 @@ bgl_gst_port_sink_class_init( BglPortSin + /* bgl_gst_port_sink_init ... */ + /*---------------------------------------------------------------------*/ + static void +-bgl_gst_port_sink_init( BglPortSink *portsink, BglPortSinkClass *g_class ) { +- GstPad *pad; +- +- pad = GST_BASE_SINK_PAD( portsink ); ++bgl_gst_port_sink_init( GTypeInstance *instance, gpointer klass ) { ++ BglPortSink *portsink = (BglPortSink *)instance; ++ GstPad *pad = GST_BASE_SINK_PAD( portsink ); + ++ GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_NEED_PARENT); + gst_pad_set_query_function( pad, + GST_DEBUG_FUNCPTR( bgl_gst_port_sink_query ) ); + +@@ -241,11 +271,11 @@ bgl_gst_port_sink_init( BglPortSink *por + /* bgl_gst_port_sink_query ... */ + /*---------------------------------------------------------------------*/ + static gboolean +-bgl_gst_port_sink_query( GstPad * pad, GstQuery * query ) { ++bgl_gst_port_sink_query( GstPad * pad, GstObject *parent, GstQuery * query ) { + BglPortSink *self; + GstFormat format; + +- self = BGL_GST_PORT_SINK( GST_PAD_PARENT( pad ) ); ++ self = BGL_GST_PORT_SINK( parent ); + + switch( GST_QUERY_TYPE( query ) ) { + case GST_QUERY_POSITION: +@@ -265,7 +295,7 @@ bgl_gst_port_sink_query( GstPad * pad, G + return TRUE; + + default: +- return gst_pad_query_default( pad, query ); ++ return gst_pad_query_default( pad, parent, query ); + } + } + +@@ -275,17 +305,20 @@ bgl_gst_port_sink_query( GstPad * pad, G + /*---------------------------------------------------------------------*/ + static GstFlowReturn + bgl_gst_port_sink_render( GstBaseSink *sink, GstBuffer *buffer ) { ++ GstMapInfo info; + BglPortSink *portsink; +- guint size; ++ gsize size; + guint8 *data; + gint written; + + portsink = BGL_GST_PORT_SINK( sink ); + +- size = GST_BUFFER_SIZE( buffer ); +- data = GST_BUFFER_DATA( buffer ); ++ if ( !gst_buffer_map( buffer, &info, GST_MAP_WRITE ) ) ++ return GST_FLOW_ERROR; ++ size = info.size; ++ data = info.data; + +- GST_DEBUG_OBJECT( portsink, "writing %u bytes", size ); ++ GST_DEBUG_OBJECT( portsink, "writing %lu bytes", info.size ); + + redo: + if (size > 0 && data != NULL) { +@@ -296,6 +329,7 @@ redo: + ("Error while writing to port <%p>.", portsink->port), + ("%s", g_strerror( errno )) ); + ++ gst_buffer_unmap( buffer, &info ); + return GST_FLOW_ERROR; + } + +@@ -303,15 +337,17 @@ redo: + data += written; + portsink->bytes_written += written; + +- GST_DEBUG_OBJECT( portsink, "wrote %d bytes, %d left", written, size ); ++ GST_DEBUG_OBJECT( portsink, "wrote %d bytes, %ld left", written, size ); + + if (size > 0) + goto redo; + ++ gst_buffer_unmap( buffer, &info ); + return GST_FLOW_OK; + } + +- return GST_FLOW_UNEXPECTED; ++ gst_buffer_unmap( buffer, &info ); ++ return GST_FLOW_EOS; + } + + /*---------------------------------------------------------------------*/ +--- api/gstreamer/src/Plugin/bglgst_portsrc.c.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/gstreamer/src/Plugin/bglgst_portsrc.c 2019-11-18 13:48:21.283140127 -0700 +@@ -93,47 +93,48 @@ enum { + + + /*---------------------------------------------------------------------*/ +-/* Backward gstreamer compatibility */ ++/* Boilerplate */ + /*---------------------------------------------------------------------*/ +-#if( !BGL_GSTREAMER_HAVE_PARSE_INFO ) +-#define gst_buffer_try_new_and_alloc( s ) __gst_buffer_try_new_and_alloc( s ) +- +-static GstBuffer *__gst_buffer_try_new_and_alloc( guint size ) { +- GstBuffer *newbuf; +- guint8 *malloc_data; + +- malloc_data = g_try_malloc( size ); ++/* None of the boilerplate macros expand to a call to g_type_register_static, ++ * just g_type_register_static_simple, so we write this by hand. ++ */ ++static void bgl_gst_port_src_base_init (gpointer klass); ++static void bgl_gst_port_src_class_init (gpointer klass, gpointer class_data); ++static void bgl_gst_port_src_init (GTypeInstance *instance, gpointer klass); + +- if( G_UNLIKELY (malloc_data == NULL && size != 0) ) { +- return NULL; +- } ++static gpointer bgl_gst_port_src_parent_class = NULL; + +- /* FIXME: there's no g_type_try_create_instance() in GObject yet, so this +- * will still abort if a new GstBuffer structure can't be allocated */ +- newbuf = gst_buffer_new(); ++GType ++bgl_gst_port_src_get_type (void) ++{ ++ static volatile gsize g_define_type_id__volatile = 0; + +- GST_BUFFER_MALLOCDATA( newbuf ) = malloc_data; +- GST_BUFFER_DATA( newbuf ) = malloc_data; +- GST_BUFFER_SIZE( newbuf ) = size; ++ if (g_once_init_enter (&g_define_type_id__volatile)) { ++ static const GTypeInfo BglPortSrcTypeInfo = { ++ (guint16) sizeof (BglPortSrcClass), ++ bgl_gst_port_src_base_init, ++ NULL, /* base_finalize */ ++ bgl_gst_port_src_class_init, ++ NULL, /* class_finalize */ ++ NULL, /* class_data */ ++ (guint16) sizeof (BglPortSrc), ++ 0, /* n_preallocs */ ++ bgl_gst_port_src_init, ++ NULL /* value_table */ ++ }; + +- return newbuf; ++ GType g_define_type_id = ++ g_type_register_static (GST_TYPE_BASE_SRC, ++ g_intern_static_string ("BglPortSrc"), ++ &BglPortSrcTypeInfo, ++ (GTypeFlags) 0); ++ GST_DEBUG_CATEGORY_INIT( bgl_gst_port_src_debug, "bglportsrc", 0, ++ "bglportsrc element" ); ++ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); ++ } ++ return g_define_type_id__volatile; + } +-#endif +- +-/*---------------------------------------------------------------------*/ +-/* Boilerplate */ +-/*---------------------------------------------------------------------*/ +-#define _do_init( _ ) \ +- GST_DEBUG_CATEGORY_INIT( bgl_gst_port_src_debug, \ +- "bglportsrc", \ +- 0, \ +- "bglportsrc element" ); +- +-GST_BOILERPLATE_FULL( BglPortSrc, +- bgl_gst_port_src, +- GstBaseSrc, +- GST_TYPE_BASE_SRC, +- _do_init ); + + /*---------------------------------------------------------------------*/ + /* Local functions */ +@@ -309,7 +310,7 @@ bgl_gst_port_src_finalize( GObject * obj + src->uri = 0; + } + +- G_OBJECT_CLASS( parent_class )->finalize( object ); ++ G_OBJECT_CLASS( bgl_gst_port_src_parent_class )->finalize( object ); + } + + /*---------------------------------------------------------------------*/ +@@ -350,11 +351,11 @@ bgl_gst_port_src_set_property( GObject * + src->dump = g_value_get_boolean( value ); + break; + case PROP_CAN_ACTIVATE_PUSH: +- g_return_if_fail( !GST_OBJECT_FLAG_IS_SET( object, GST_BASE_SRC_STARTED) ); ++ g_return_if_fail( !GST_OBJECT_FLAG_IS_SET( object, GST_BASE_SRC_FLAG_STARTED) ); + GST_BASE_SRC( src )->can_activate_push = g_value_get_boolean( value ); + break; + case PROP_CAN_ACTIVATE_PULL: +- g_return_if_fail( !GST_OBJECT_FLAG_IS_SET( object, GST_BASE_SRC_STARTED ) ); ++ g_return_if_fail( !GST_OBJECT_FLAG_IS_SET( object, GST_BASE_SRC_FLAG_STARTED ) ); + src->can_activate_pull = g_value_get_boolean( value ); + break; + case PROP_IS_LIVE: +@@ -460,10 +461,10 @@ bgl_gst_port_src_create( GstBaseSrc *bas + guint64 offset, + guint length, + GstBuffer **ret ) { ++ GstMapInfo info; + BglPortSrc *src; + GstBuffer *buf; +- guint8 *readstr; +- guint readlen; ++ gssize readlen; + + src = BGL_GST_PORT_SRC( basesrc ); + +@@ -485,7 +486,7 @@ bgl_gst_port_src_create( GstBaseSrc *bas + + /* Check the non emptyness of the buffer */ + if( length == 0 ) { +- return GST_FLOW_UNEXPECTED; ++ return GST_FLOW_EOS; + } + + /* if( (src->parentsize == length) && src->parent ) { */ +@@ -503,47 +504,29 @@ bgl_gst_port_src_create( GstBaseSrc *bas + /* The function rgc_blit_string adds and extra 0 after */ + /* the read chars, so we have to allocate a buffer of size */ + /* length + 1, the same thing apply in the g_malloc0 call. */ +- if( !(buf = gst_buffer_try_new_and_alloc( length + 1 ) ) ) { +- /* create a brand new buffer */ +- if( !(buf = gst_buffer_new()) ) { +- GST_ELEMENT_ERROR( src, CORE, FAILED, +- ("Could not allocate buffer.\n"), +- ("Could not allocate buffer for object %p\n", src)); ++ if( !(buf = gst_buffer_new_allocate( NULL, length + 1, NULL ) ) ) { ++ GST_ELEMENT_ERROR( src, CORE, FAILED, ++ ("Could not allocate buffer.\n"), ++ ("Could not allocate buffer for object %p\n", src)); + +- return GST_FLOW_ERROR; +- } else { +- /* allocate a char array */ +- if( !(readstr = g_malloc0( length + 1 ) ) ) {; +- gst_buffer_unref( buf ); +- +- GST_ELEMENT_ERROR( src, CORE, FAILED, +- ("Could not allocate char array.\n"), +- ("Could not allocate buffer for object %p\n", src) ); +- return GST_FLOW_ERROR; +- } else { +- GST_BUFFER_MALLOCDATA( buf ) = readstr; +- } +- } +- } else { +- readstr = GST_BUFFER_MALLOCDATA( buf ); +- +-/* if( src->parent != buf ) { */ +-/* if( src->parent ) gst_buffer_unref( src->parent ); */ +-/* */ +-/* src->parentsize = length; */ +-/* src->parent = buf; */ +-/* gst_buffer_ref( buf ); */ +-/* } */ ++ return GST_FLOW_ERROR; + } + ++ /* Get access to the buffer data */ ++ if ( !gst_buffer_map( buf, &info, GST_MAP_WRITE ) ) { ++ gst_buffer_unref (buf); ++ return GST_FLOW_ERROR; ++ } ++ + #if( defined( BGL_DEBUG ) ) + fprintf( stderr, "bgl_rgc_blit_string( %p, %p, 0, %d )\n", +- src->port, readstr, length ); ++ src->port, info.data, length ); + #endif +- if( !(readlen = bgl_rgc_blit_string( src->port, readstr, 0, length )) ) { ++ if( !(readlen = bgl_rgc_blit_string( src->port, (char *)info.data, 0, length )) ) { + /* end of file */ ++ gst_buffer_unmap( buf, &info ); + gst_buffer_unref( buf ); +- return GST_FLOW_UNEXPECTED; ++ return GST_FLOW_EOS; + } + #if( defined( BGL_DEBUG ) ) + fprintf( stderr, "bgl_gst_port_src_create(%s:%d)\n readlen=%d\n length=%d\n offset=%d\n", +@@ -554,13 +537,14 @@ bgl_gst_port_src_create( GstBaseSrc *bas + fprintf( stderr, " readstr=" ); + for( i = 0; i < readlen; i +=2 ) { + if( (i % 16) == 0 ) fprintf( stderr, "\n %08x ", i ); +- fprintf( stderr, "%02x%02x ", readstr[ i + 1 ], readstr[ i ] ); ++ fprintf( stderr, "%02x%02x ", info.data[ i + 1 ], info.data[ i ] ); + } + fprintf( stderr, "\n" ); + } + #endif + +- GST_BUFFER_SIZE( buf ) = readlen; ++ gst_buffer_unmap( buf, &info ); ++ gst_buffer_set_size( buf, readlen ); + GST_BUFFER_OFFSET( buf ) = offset; + GST_BUFFER_OFFSET_END( buf ) = offset + readlen; + +@@ -575,7 +559,7 @@ bgl_gst_port_src_create( GstBaseSrc *bas + GST_LOG_OBJECT( src, "post handoff emit" ); + } + +- src->bytes_sent += GST_BUFFER_SIZE( buf ); ++ src->bytes_sent += gst_buffer_get_size( buf ); + src->buffer_count++; + + *ret = buf; +@@ -585,44 +569,6 @@ bgl_gst_port_src_create( GstBaseSrc *bas + + + /*---------------------------------------------------------------------*/ +-/* static void */ +-/* marshal_VOID__MINIOBJECT_OBJECT ... */ +-/*---------------------------------------------------------------------*/ +-static void +-marshal_VOID__MINIOBJECT_OBJECT( GClosure *closure, +- GValue *return_value, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint, +- gpointer marshal_data ) { +- typedef void (*marshalfunc_VOID__MINIOBJECT_OBJECT) +- (gpointer obj, gpointer arg1, gpointer arg2, gpointer data2); +- +- marshalfunc_VOID__MINIOBJECT_OBJECT callback; +- GCClosure *cc = (GCClosure *)closure; +- gpointer data1, data2; +- +- g_return_if_fail( n_param_values == 3 ); +- +- if( G_CCLOSURE_SWAP_DATA( closure ) ) { +- data1 = closure->data; +- data2 = g_value_peek_pointer( param_values + 0 ); +- } else { +- data1 = g_value_peek_pointer( param_values + 0 ); +- data2 = closure->data; +- } +- +- callback = +- (marshalfunc_VOID__MINIOBJECT_OBJECT) +- (marshal_data ? marshal_data : cc->callback); +- +- callback( data1, +- gst_value_get_mini_object (param_values + 1), +- g_value_get_object( param_values + 2 ), +- data2); +-} +- +-/*---------------------------------------------------------------------*/ + /* static gboolean */ + /* bgl_gst_port_src_event_handler ... */ + /*---------------------------------------------------------------------*/ +@@ -690,19 +636,17 @@ bgl_gst_port_src_get_times( GstBaseSrc * + /*---------------------------------------------------------------------*/ + static void + bgl_gst_port_src_base_init( gpointer g_class ) { +- static GstElementDetails element_details = { +- "Bigloo input-port source", +- "Source", +- "Get data from a Bigloo input port", +- "Cyprien Nicolas " +- }; + GstElementClass *element_class = GST_ELEMENT_CLASS( g_class ); + + gst_element_class_add_pad_template( + element_class, gst_static_pad_template_get( &srctemplate ) ); + +- gst_element_class_set_details( +- element_class, &element_details ); ++ gst_element_class_set_static_metadata( ++ element_class, ++ "Bigloo input-port source", ++ "Source", ++ "Get data from a Bigloo input port", ++ "Cyprien Nicolas " ); + } + + /*---------------------------------------------------------------------*/ +@@ -710,11 +654,13 @@ bgl_gst_port_src_base_init( gpointer g_c + /* bgl_gst_port_src_class_init ... */ + /*---------------------------------------------------------------------*/ + static void +-bgl_gst_port_src_class_init( BglPortSrcClass * klass ) { ++bgl_gst_port_src_class_init( gpointer klass, gpointer class_data ) { + GObjectClass *gobject_class = G_OBJECT_CLASS( klass ); + GstElementClass *gstelement_class = GST_ELEMENT_CLASS( klass ); + GstBaseSrcClass *gstbase_src_class = GST_BASE_SRC_CLASS( klass ); + ++ bgl_gst_port_src_parent_class = g_type_class_peek_parent (klass); ++ + gobject_class->finalize = + GST_DEBUG_FUNCPTR( bgl_gst_port_src_finalize ); + gobject_class->set_property = +@@ -793,7 +739,7 @@ bgl_gst_port_src_class_init( BglPortSrcC + bgl_gst_port_src_signals[ SIGNAL_HANDOFF ] = + g_signal_new( "handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (BglPortSrcClass, handoff), NULL, NULL, +- marshal_VOID__MINIOBJECT_OBJECT, G_TYPE_NONE, 2, GST_TYPE_BUFFER, ++ g_cclosure_marshal_generic, G_TYPE_NONE, 2, GST_TYPE_BUFFER, + GST_TYPE_PAD ); + + +@@ -829,7 +775,8 @@ bgl_gst_port_src_class_init( BglPortSrcC + /* bgl_gst_port_src_init ... */ + /*---------------------------------------------------------------------*/ + static void +-bgl_gst_port_src_init( BglPortSrc *portsrc, BglPortSrcClass *g_class) { ++bgl_gst_port_src_init( GTypeInstance *instance, gpointer klass ) { ++ BglPortSrc *portsrc = (BglPortSrc *)instance; + portsrc->buffer_count = 0; + portsrc->silent = DEFAULT_SILENT; + portsrc->signal_handoffs = DEFAULT_SIGNAL_HANDOFFS; +@@ -868,29 +815,14 @@ plugin_init( GstPlugin * plugin ) { + /*---------------------------------------------------------------------*/ + gboolean + bgl_gst_plugin_port_src_init() { +-#if( defined( GST_PLUGIN_DEFINE_STATIC ) ) +- GST_PLUGIN_DEFINE( GST_VERSION_MAJOR, +- GST_VERSION_MINOR, +- "bglportsrc", +- "Bigloo Port Plugin", +- plugin_init, +- PLUGIN_VERSION, +- PLUGIN_LICENSE, +- PLUGIN_PACKAGE, +- PLUGIN_URL ); +- +- _gst_plugin_register_static( &gst_plugin_desc ); +- +- return TRUE; +-#else +- gst_plugin_register_static( GST_VERSION_MAJOR, +- GST_VERSION_MINOR, +- "bglportsrc", +- "Bigloo Port Plugin", +- plugin_init, +- PLUGIN_VERSION, +- PLUGIN_LICENSE, +- PLUGIN_PACKAGE, +- PLUGIN_URL ); +-#endif ++ return gst_plugin_register_static( GST_VERSION_MAJOR, ++ GST_VERSION_MINOR, ++ "bglportsrc", ++ "Bigloo Port Plugin", ++ plugin_init, ++ PLUGIN_VERSION, ++ PLUGIN_LICENSE, ++ PACKAGE, ++ PLUGIN_PACKAGE, ++ PLUGIN_URL ); + } +--- autoconf/gstreamer.orig 2019-07-04 00:09:45.000000000 -0600 ++++ autoconf/gstreamer 2019-09-12 13:47:36.634486388 -0600 +@@ -14,7 +14,7 @@ + #* flags */ + #*---------------------------------------------------------------------*/ + cflags= +-gstversion=0.10 ++gstversion=1.0 + pkgconfig=pkg-config + pkg= + +@@ -122,7 +122,7 @@ new_pad (GstElement *element, GstPad *pa + GstPad *sinkpad; + g_print ("Dynamic pad created, linking parser/decoder\n"); + +- sinkpad = gst_element_get_pad (decoder, "sink"); ++ sinkpad = gst_element_get_static_pad (decoder, "sink"); + gst_pad_link (pad, sinkpad); + + gst_object_unref (sinkpad); +@@ -136,7 +136,7 @@ int main (int argc, char *argv[]) { + loop = g_main_loop_new (NULL, FALSE); + + { +- GstRegistry* gregistry = gst_registry_get_default (); ++ GstRegistry* gregistry = gst_registry_get (); + GList *glist = gst_registry_get_feature_list( gregistry, GST_TYPE_ELEMENT_FACTORY ); + while( glist ) { + GstElementFactory *factory; +--- autoconf/gstreameraudio.orig 2019-07-04 00:09:45.000000000 -0600 ++++ autoconf/gstreameraudio 2019-09-12 14:20:23.092542598 -0600 +@@ -14,7 +14,7 @@ + #* flags */ + #*---------------------------------------------------------------------*/ + cflags= +-gstversion=0.10 ++gstversion=1.0 + pkgconfig=pkg-config + + #*---------------------------------------------------------------------*/ diff --git a/bigloo-underlink.patch b/bigloo-underlink.patch new file mode 100644 index 0000000..167a609 --- /dev/null +++ b/bigloo-underlink.patch @@ -0,0 +1,128 @@ +--- api/avahi/src/Makefile.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/avahi/src/Makefile 2019-11-20 13:24:09.075756935 -0700 +@@ -47,11 +47,15 @@ CEFLAGS = + + # Additional pthread lib for C + ifeq "$(AVAHILIBS) " " " +-EXTRALIBS = ++EXTRALIBS = $(PTHREADLIBS) + else +-EXTRALIBS = $(AVAHILIBS) ++EXTRALIBS = $(AVAHILIBS) $(PTHREADLIBS) + endif + ++EXTRALIBS_S = -lbigloopthread_s-$(RELEASE) ++EXTRALIBS_U = -lbigloopthread_u-$(RELEASE) ++ ++ + DISTRIB_FILES = $(C_SRC_DIR)/bglavahi.h + + #*---------------------------------------------------------------------*/ +--- api/mpg123/src/Makefile.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/mpg123/src/Makefile 2019-11-20 13:22:17.084569700 -0700 +@@ -52,11 +52,11 @@ EXTRALIBS = + else + ifeq "$(ALSALIBS) " " " + else +-EXTRALIBS += $(MPG123LIBS) $(ALSALIBS) -lbigloomultimedia_u-$(RELEASE) -lbiglooalsa_u-$(RELEASE) ++EXTRALIBS += -lbigloomultimedia_u-$(RELEASE) -lbiglooalsa_u-$(RELEASE) $(MPG123LIBS) $(ALSALIBS) + endif + ifeq "$(PULSEAUDIOLIBS) " " " + else +-EXTRALIBS += $(MPG123LIBS) $(PULSEAUDIOLIBS) -lbigloomultimedia_u-$(RELEASE) -lbigloopulseaudio_u-$(RELEASE) ++EXTRALIBS += -lbigloomultimedia_u-$(RELEASE) -lbigloopulseaudio_u-$(RELEASE) $(MPG123LIBS) $(PULSEAUDIOLIBS) + endif + endif + +--- api/pkglib/src/Makefile.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/pkglib/src/Makefile 2019-11-20 13:20:12.573585115 -0700 +@@ -45,8 +45,8 @@ SPIFLAGS = + BMISCFLAGS = -I Llib + + # Extra libs +-EXTRALIBS_S = -lbigloosqlite_s-$(RELEASE) +-EXTRALIBS_U = -lbigloosqlite_u-$(RELEASE) ++EXTRALIBS_S = -lbigloosqlite_s-$(RELEASE) $(SQLITELIBS) ++EXTRALIBS_U = -lbigloosqlite_u-$(RELEASE) $(SQLITELIBS) + + #*---------------------------------------------------------------------*/ + #* Scheme extended objects */ +--- api/pulseaudio/src/Makefile.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/pulseaudio/src/Makefile 2019-11-20 13:26:14.914720023 -0700 +@@ -53,6 +53,10 @@ else + EXTRALIBS = $(PULSEAUDIOLIBS) + endif + ++EXTRALIBS_S = -lbigloomultimedia_s-$(RELEASE) ++EXTRALIBS_U = -lbigloomultimedia_u-$(RELEASE) ++ ++ + #*---------------------------------------------------------------------*/ + #* Scheme extended objects */ + #*---------------------------------------------------------------------*/ +--- api/wav/src/Makefile.orig 2019-07-04 00:09:45.000000000 -0600 ++++ api/wav/src/Makefile 2019-11-20 13:21:03.173766069 -0700 +@@ -47,12 +47,12 @@ BHEAPFLAGS = -unsafe -q -mkaddheap -mkad + CEFLAGS = $(WAVCFLAGS) + + # Additional libraries +-EXTRALIBS = $(WAVLIBS) -lbigloomultimedia_u-$(RELEASE) ++EXTRALIBS = -lbigloomultimedia_u-$(RELEASE) $(WAVLIBS) + ifneq "$(ALSALIBS) " " " +-EXTRALIBS += $(ALSALIBS) -lbiglooalsa_u-$(RELEASE) ++EXTRALIBS += -lbiglooalsa_u-$(RELEASE) $(ALSALIBS) + endif + ifneq "$(PULSEAUDIOLIBS) " " " +-EXTRALIBS += $(PULSEAUDIOLIBS) -lbigloopulseaudio_u-$(RELEASE) ++EXTRALIBS += -lbigloopulseaudio_u-$(RELEASE) $(PULSEAUDIOLIBS) + endif + + #*---------------------------------------------------------------------*/ +--- Makefile.misc.orig 2019-07-04 00:09:45.000000000 -0600 ++++ Makefile.misc 2019-11-20 11:59:44.139796140 -0700 +@@ -89,8 +89,8 @@ shared-install-name: + $(OBJECTS) \ + $(GCSTDOBJECTS) \ + $(LDFLAGS) $(EXTRA_LD_OPT) \ +- $(EXTRALIBS) $(CLOSELIBS) \ +- $(LDLIBS) $(LDOPTS) $(LDEXTRA) && \ ++ $(CLOSELIBS) \ ++ $(LDLIBS) $(LDOPTS) $(LDEXTRA) $(EXTRALIBS) && \ + if [ "$(notdir $(LIBDEST))" != "$(LIBDEST)" ]; then \ + mv $(notdir $(LIBDEST)) $(LIBDEST); \ + fi +@@ -102,8 +102,8 @@ MS-CARE-shared-install-name: + $(OBJECTS) \ + $(GCSTDOBJECTS) \ + $(LDFLAGS) $(EXTRA_LD_OPT) \ +- $(EXTRALIBS) $(CLOSELIBS) \ +- $(LDLIBS) $(LDOPTS) $(LDEXTRA) && \ ++ $(CLOSELIBS) \ ++ $(LDLIBS) $(LDOPTS) $(LDEXTRA) $(EXTRALIBS) && \ + if [ "$(notdir $(LIBDEST))" != "$(LIBDEST)" ]; then \ + mv $(notdir $(LIBDEST)) $(LIBDEST); \ + fi +@@ -113,9 +113,9 @@ shared-sans-soname: + $(LDRPATH) \ + $(OBJECTS) \ + $(GCSTDOBJECTS) \ +- $(LDFLAGS) \ +- $(EXTRALIBS) $(CLOSELIBS) \ +- $(LDLIBS) $(LDOPTS) $(EXTRA_LD_OPT) $(LDEXTRA) && \ ++ $(LDFLAGS) $(EXTRA_LD_OPT) \ ++ $(CLOSELIBS) \ ++ $(LDLIBS) $(LDOPTS) $(LDEXTRA) $(EXTRALIBS) && \ + if [ "$(notdir $(LIBDEST))" != "$(LIBDEST)" ]; then \ + mv $(notdir $(LIBDEST)) $(LIBDEST); \ + fi +@@ -127,8 +127,8 @@ shared-soname: + $(OBJECTS) \ + $(GCSTDOBJECTS) \ + $(LDOPTS) $(EXTRA_LD_OPT) \ +- $(EXTRALIBS) $(CLOSELIBS) \ +- $(LDLIBS) $(LDFLAGS) $(LDEXTRA) && \ ++ $(CLOSELIBS) \ ++ $(LDLIBS) $(LDFLAGS) $(LDEXTRA) $(EXTRALIBS) && \ + if [ "$(notdir $(LIBDEST))" != "$(LIBDEST)" ]; then \ + mv $(notdir $(LIBDEST)) $(LIBDEST); \ + fi diff --git a/bigloo.rpmlintrc b/bigloo.rpmlintrc new file mode 100644 index 0000000..5591602 --- /dev/null +++ b/bigloo.rpmlintrc @@ -0,0 +1,38 @@ +# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# Bigloo is a language system, and therefore implicitly a devel package +addFilter(r'bigloo\.[^:]+: E: explicit-lib-dependency') +addFilter(r'bigloo\.[^:]+: W: devel-file-in-non-devel-package') + +# The Requires ensure these symlinks do not dangle +addFilter(r'bigloo\.[^:]+: W: dangling-relative-symlink') + +# No man pages for the internal commands +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bdb') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bglafile\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bgldepend\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bgljas') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bgljas\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bgljfile\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bglmake\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bglmco\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bglmem') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bglmemrun') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bglpp\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bglprof\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bgltags\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bigloo\.sh') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary bigloo4\..*') +addFilter(r'bigloo\.[^:]+: W: no-manual-page-for-binary cigloo') + +# The plugins do not necessarily invoke any glibc symbols +addFilter(r'bigloo-libs\.[^:]+: E: library-not-linked-against-libc') + +# These calls are exposed to Scheme. Calling them correctly is up to any +# Scheme code that calls them. +addFilter(r'bigloo-libs\.[^:]+: E: missing-call-to-setgroups-before-setuid') +addFilter(r'bigloo-libs\.[^:]+: W: crypto-policy-non-compliance-openssl') + +# The documentation is in the -doc subpackage +addFilter(r'bigloo-libs\.[^:]+: W: no-documentation') diff --git a/bigloo.spec b/bigloo.spec index cbbaab3..d65b8ad 100644 --- a/bigloo.spec +++ b/bigloo.spec @@ -18,12 +18,12 @@ %global pkgname Bigloo # Bigloo has a customized copy of gc -%bcond_without customgc +%bcond_with customgc %global bundledgc 8.0.2 Name: bigloo Version: 4.3f -Release: 2%{?patch_ver:.%{patch_ver}}%{?prerel:.%{prerel}}%{?dist} +Release: 3%{?patch_ver:.%{patch_ver}}%{?prerel:.%{prerel}}%{?dist} Summary: A compiler for the Scheme programming language License: GPLv2+ @@ -48,6 +48,11 @@ Patch6: %{name}-params.patch Patch7: %{name}-test.patch # Round top of stack to a multiple of 1024. Fixes stack overflow on s390x. Patch8: %{name}-callcc.patch +# Additional linkage for underlinked plugins +Patch9: %{name}-underlink.patch +# Build with gstreamer 1.x instead of gstreamer 0.10 +# https://github.com/manuel-serrano/bigloo/pull/38 +Patch10: %{name}-gstreamer1.patch BuildRequires: emacs BuildRequires: xemacs @@ -66,8 +71,8 @@ BuildRequires: flac-devel BuildRequires: gc-devel %endif BuildRequires: gmp-devel -BuildRequires: gstreamer-devel -BuildRequires: gstreamer-plugins-base-devel +BuildRequires: gstreamer1-devel +BuildRequires: gstreamer1-plugins-base-devel %if %{with customgc} BuildRequires: libatomic_ops-devel %endif @@ -85,6 +90,7 @@ BuildRequires: texi2html Requires: bigloo-libs%{?_isa} = %{version}-%{release} Requires: emacs-filesystem >= %{_emacs_version} Requires: xemacs-filesystem >= %{_xemacs_version} +Requires: javapackages-filesystem Requires: indent Requires: gmp-devel%{?_isa} %if %{without customgc} @@ -162,6 +168,11 @@ sed -i 's/LDOPTS=\"/&-Wl,--as-needed -lgc /' Makefile.misc # Defeat attempts at inserting unnecessary rpaths sed -ri 's/ ?-Wl,-rpath=[^"]+(")/\1/' configure +# Keep generated files for debuginfo +sed -i 's/fcfa-arithmetic/& -rm/' configure +sed -i 's/no-hello/& -rm/' bdb/bdb/Makefile +sed -i 's/-O2/& -rm/' cigloo/Makefile + # Work around division by zero issue in 4.3c - 4.3f %ifarch aarch64 ppc64 ppc64le sed -i 's/a \. b/+inf.0 . +inf.0/' recette/error.scm @@ -251,6 +262,10 @@ ln -sf ../../*.so.0 . ln -sf ../../*.so.0.0.0 . popd +# move jigloo to the proper place +mkdir %{buildroot}%{_javadir} +mv %{buildroot}%{_bindir}/jigloo.class %{buildroot}%{_javadir} + # Remove references to the build root sed -e 's|^BOOTDIR=.*|BOOTDIR=%{_prefix}|g' \ -e 's|^BOOTBINDIR=.*|BOOTBINDIR=%{_bindir}|g' \ @@ -308,6 +323,7 @@ make test %files %{_bindir}/* +%{_javadir}/jigloo.class %{_libdir}/bigloo %{_libdir}/lib*.so %{_infodir}/* @@ -331,6 +347,12 @@ make test %changelog +* Thu Nov 21 2019 Jerry James - 4.3f-3 +- Fix underlinked plugins +- Port gstreamer plugin to 1.0 (gstreamer1) +- Move the jigloo class to the Java directory +- Go back to the system gc; the bundled version is too buggy + * Wed Jul 24 2019 Fedora Release Engineering - 4.3f-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild