I've successfully patched our gstreamer plugin to build with gstreamer-1.0, but how do I test it? Does someone have a sample document that uses gstreamer?
The patch is attached for anyone interested. Parts may still be wrong, eg. filter names. Changes between GStreamer 0.1 and 1.0 are documented here: https://gstreamer.freedesktop.org/documentation/application-development/appendix/porting-1-0.html https://cgit.freedesktop.org/gstreamer/gstreamer/plain/docs/random/porting-to-1.0.txt On Wed, Feb 28, 2018 at 10:22 AM, Damjan Jovanovic <dam...@apache.org> wrote: > Hi > > I've begun having a look. > > We currently test for gstreamer in configure.ac but don't use the result, > re-running pkg-config in a main/avmedia's makefile. > > Changing the version number to 1.0 breaks the build due a missing header > file. Removing that "#include" gets it a little further, but it breaks due > to changed gstreamer API functions. There is also lots of warnings about > deprecated GDK functions. I'll continue trying later. > > We should really get rid of gstreamer 0.1 ASAP one way or the other: given > how it's been unmaintained since 2013, it may well have security > vulnerabilities. We can't ship it to users since its license is > incompatible, but having users install it separately still invites trouble. > > Damjan > > > On Tue, Feb 27, 2018 at 9:16 AM, Torokhov Sergey <torokhov-...@yandex.ru> > wrote: > >> Hello, Peter. >> >> Thank you for reply and for adding additional info into AOO wiki. >> >> Yes I'm posted on that project is short of developers this time. >> I hope that current implementation still will hold several years >> because gstreamer-0.10 of long process of skiping this brach >> in linux distributibes. >> >> Maybe during this transition period at least the way to standalone build >> of appropriate multimedia AOO library will be found if it possible at all. >> >> Unfortunately I suppose I have no enough programming skills >> to understand how build system works and the difference between >> gstreamer-0.10 and 1.0 API/ABI . >> >> -- >> Sergey >> >> 25.02.2018, 12:20, "Peter Kovacs" <pe...@apache.org>: >> > Hello, >> > >> > I have hoped that you will get a more positive answer then mine. >> > I have found no evidence that we have ever worked on an update of >> > multimedia Libs in any direction. The only thing I have found is someone >> > tried to compile the old 0.1.0 Gstreamer interface on modern systems. >> > I think it is unlikely we will see an update in 4.2.0, since there is no >> > evidence of a volunteer working on it. Of course we would like to have a >> > better solution then we have now. >> > >> > In order to advance step by step I have started to collect Information >> > of possible solutions. And prepared to collect more Informations where >> > maybe another volunteer could start on. >> > I have not started any dicusssion, because my limit on driving topics >> > has been been reached. If you like you could help collecting the >> > informations needed to implement the stuff. If you have programming >> > skills you are welcome to try, but I believe it is a challenging >> Journey. >> > My current plan is to reduce all the szuff that makes work on Open >> > Office step by step in order to get into a better shape that we can work >> > on topics. But currently this is all but in infant state. I welcome any >> > help. >> > >> > The Point of Interest List I have started you find at >> > https://cwiki.apache.org/confluence/pages/viewpage.action? >> pageId=67633711 >> > it collects all sort of topics I think I need look into. >> > The Wikipage I have started to collect Information for a new multimedia >> > backened you find at >> > https://cwiki.apache.org/confluence/display/OOOUSERS/new+ >> multimedia+Backend >> > >> > I am sorry I could not invest more time in this point. >> > >> > All the best >> > Peter >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org >> > For additional commands, e-mail: dev-h...@openoffice.apache.org >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org >> For additional commands, e-mail: dev-h...@openoffice.apache.org >> >> >
Index: main/avmedia/Library_avmediagst.mk =================================================================== --- main/avmedia/Library_avmediagst.mk (revision 1825307) +++ main/avmedia/Library_avmediagst.mk (working copy) @@ -32,7 +32,7 @@ -I$(SRCDIR)/avmedia/inc \ -I$(SRCDIR)/avmedia/source/inc \ $(filter -I%,$(GTK_CFLAGS)) \ - $(shell pkg-config --cflags-only-I gstreamer-0.10 gstreamer-interfaces-0.10) \ + $(shell pkg-config --cflags-only-I gstreamer-1.0 gstreamer-video-1.0) \ )) $(eval $(call gb_Library_add_cflags,avmediagst,\ @@ -63,7 +63,7 @@ $(eval $(call gb_Library_add_libs,avmediagst,\ $(GTK_LIBS) \ - $(shell pkg-config --libs gstreamer-0.10 gstreamer-interfaces-0.10) \ + $(shell pkg-config --libs gstreamer-1.0 gstreamer-video-1.0) \ )) $(eval $(call gb_Library_add_exception_objects,avmediagst,\ Index: main/avmedia/source/gstreamer/gstframegrabber.cxx =================================================================== --- main/avmedia/source/gstreamer/gstframegrabber.cxx (revision 1825307) +++ main/avmedia/source/gstreamer/gstframegrabber.cxx (working copy) @@ -130,9 +130,9 @@ { bool bDone = false; - if( pMsg && pMsg->structure ) + if( pMsg && gst_message_get_structure( pMsg ) ) { - GstStructure* pStruct = pMsg->structure; + const GstStructure* pStruct = gst_message_get_structure( pMsg ); const gchar* pStructName = gst_structure_get_name( pStruct ); if( ( ::std::string( pStructName ).find( "pixbuf" ) != ::std::string::npos ) && Index: main/avmedia/source/gstreamer/gstplayer.cxx =================================================================== --- main/avmedia/source/gstreamer/gstplayer.cxx (revision 1825307) +++ main/avmedia/source/gstreamer/gstplayer.cxx (working copy) @@ -29,7 +29,7 @@ #include <math.h> #include <string> #include <gst/gstelement.h> -#include <gst/interfaces/xoverlay.h> +#include <gst/video/videooverlay.h> // maximum timeout time in nanoseconds @@ -312,10 +312,7 @@ if( implInitPlayer() ) { - GstFormat aFormat = GST_FORMAT_TIME; - - if( !gst_element_query_duration( mpPlayer, &aFormat, &nDuration ) || - ( GST_FORMAT_TIME != aFormat ) || + if( !gst_element_query_duration( mpPlayer, GST_FORMAT_TIME, &nDuration ) || ( nDuration < 0 ) ) { nDuration = 0; @@ -348,11 +345,9 @@ ::osl::MutexGuard aGuard(m_aMutex); if( implInitPlayer() ) { - GstFormat aFormat = GST_FORMAT_TIME; gint64 nCurTime = 0; - if( gst_element_query_position( mpPlayer, &aFormat, &nCurTime ) && - ( GST_FORMAT_TIME == aFormat ) && + if( gst_element_query_position( mpPlayer, GST_FORMAT_TIME, &nCurTime ) && ( nCurTime >= 0 ) ) { fRet = static_cast< double >( nCurTime ) / NANO_TIME_FACTOR; @@ -756,7 +751,7 @@ g_free( pElementName ); #endif - GstCaps* pCaps = gst_pad_get_caps( pPad ); + GstCaps* pCaps = gst_pad_get_current_caps( pPad ); // we are interested only in getting video properties // width and height or if we have a video source at all @@ -829,6 +824,10 @@ return( true ); } +static void dummyDestroyNotify(void *ptr) +{ +} + // ------------------------------------------------------------------------------ gpointer Player::run() { @@ -863,7 +862,7 @@ // add bus sync handler to intercept video window creation for setting our own window gst_bus_set_sync_handler( static_cast< GstBusSource* >( pBusSource )->mpBus, - &lcl_implHandleCreateWindowFunc, this ); + &lcl_implHandleCreateWindowFunc, this, dummyDestroyNotify ); // watch for all elements (and pads) that will be added to the playbin, // in order to retrieve properties like video width and height @@ -929,12 +928,12 @@ if( pMsg && ( GST_MESSAGE_TYPE( pMsg ) == GST_MESSAGE_ELEMENT ) && - gst_structure_has_name( pMsg->structure, "prepare-xwindow-id" ) && + gst_is_video_overlay_prepare_window_handle_message( pMsg ) && g_atomic_pointer_get( &mpPlayerWindow ) ) { OSL_TRACE( ">>> Got Request to create XOverlay" ); - gst_x_overlay_set_xwindow_id( GST_X_OVERLAY( GST_MESSAGE_SRC( pMsg ) ), + gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY( GST_MESSAGE_SRC( pMsg ) ), static_cast< Window* >( g_atomic_pointer_get( &mpPlayerWindow ) )->getXWindowHandle() );
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org