[Libreoffice-commits] .: 3 commits - avmedia/Library_avmediagst.mk avmedia/Module_avmedia.mk avmedia/source config_host.mk.in configure.in dbaccess/source distro-configs/LibreOfficeAndroid.conf distro-configs/LibreOfficeAndroidX86.conf distro-configs/LibreOfficeiOS.conf distro-configs/LibreOfficeLinux.conf distro-configs/LibreOfficeOpenBSD.conf distro-configs/OxygenOfficeLinux.conf postprocess/packcomponents Repository.mk scp2/InstallModule_ooo.mk scp2/source svx/source

Michael Meeks michael at kemper.freedesktop.org
Thu Aug 9 12:48:45 PDT 2012


 Repository.mk                                            |    1 
 avmedia/Library_avmediagst.mk                            |    8 
 avmedia/Module_avmedia.mk                                |    6 
 avmedia/source/gstreamer/avmediagstreamer_0_10.component |    6 
 avmedia/source/gstreamer/gst_0_10.cxx                    |   15 +
 avmedia/source/gstreamer/gstplayer.cxx                   |  155 +++++++++++----
 avmedia/source/gstreamer/gstplayer.hxx                   |    4 
 avmedia/source/gstreamer/gstuno.cxx                      |   17 +
 avmedia/source/inc/mediamisc.hxx                         |   11 -
 avmedia/source/viewer/mediawindowbase_impl.cxx           |   21 +-
 config_host.mk.in                                        |    3 
 configure.in                                             |   41 +++
 dbaccess/source/ui/control/marktree.cxx                  |    4 
 dbaccess/source/ui/control/sqledit.cxx                   |   11 -
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx          |   14 -
 dbaccess/source/ui/dlg/adtabdlg.cxx                      |    4 
 dbaccess/source/ui/dlg/dbfindex.cxx                      |   28 +-
 dbaccess/source/ui/dlg/queryfilter.cxx                   |   10 
 dbaccess/source/ui/dlg/queryorder.cxx                    |    2 
 distro-configs/LibreOfficeAndroid.conf                   |    1 
 distro-configs/LibreOfficeAndroidX86.conf                |    1 
 distro-configs/LibreOfficeLinux.conf                     |    2 
 distro-configs/LibreOfficeOpenBSD.conf                   |    2 
 distro-configs/LibreOfficeiOS.conf                       |    1 
 distro-configs/OxygenOfficeLinux.conf                    |    2 
 postprocess/packcomponents/makefile.mk                   |    4 
 scp2/InstallModule_ooo.mk                                |    3 
 scp2/source/ooo/file_library_ooo.scp                     |    6 
 scp2/source/ooo/module_hidden_ooo.scp                    |   19 -
 svx/source/sdr/contact/viewcontact.cxx                   |    2 
 30 files changed, 281 insertions(+), 123 deletions(-)

New commits:
commit b803fa2579256979bac83f0b193f2c30d524d76b
Author: Daniel Herde <daniel at dher.de>
Date:   Thu Aug 9 18:25:53 2012 +0200

    translated the german comments in a bunch of source files in dbaccess/source
    
    Change-Id: I2d4b10d96668502a4fe84af70d43bd3abaa5ed23

diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx
index e1b17b0..830f138 100644
--- a/dbaccess/source/ui/control/marktree.cxx
+++ b/dbaccess/source/ui/control/marktree.cxx
@@ -193,7 +193,7 @@ void OMarkableTreeListBox::CheckButtonHdl()
 void OMarkableTreeListBox::checkedButton_noBroadcast(SvLBoxEntry* _pEntry)
 {
     SvButtonState eState = GetCheckButtonState( _pEntry);
-    if (GetModel()->HasChildren(_pEntry)) // Falls Kinder, dann diese auch checken
+    if (GetModel()->HasChildren(_pEntry)) // if it has children, check those too
     {
         SvLBoxEntry* pChildEntry = GetModel()->Next(_pEntry);
         SvLBoxEntry* pSiblingEntry = GetModel()->NextSibling(_pEntry);
@@ -208,7 +208,7 @@ void OMarkableTreeListBox::checkedButton_noBroadcast(SvLBoxEntry* _pEntry)
     while(pEntry)
     {
         SetCheckButtonState(pEntry,eState);
-        if(GetModel()->HasChildren(pEntry))   // Falls Kinder, dann diese auch checken
+        if(GetModel()->HasChildren(pEntry))   // if it has children, check those too
         {
             SvLBoxEntry* pChildEntry = GetModel()->Next(pEntry);
             SvLBoxEntry* pSiblingEntry = GetModel()->NextSibling(pEntry);
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 0ce5c2b..289960a 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -134,7 +134,7 @@ void OSqlEdit::KeyInput( const KeyEvent& rKEvt )
     rController.InvalidateFeature(SID_CUT);
     rController.InvalidateFeature(SID_COPY);
 
-    // Ist dies ein Cut, Copy, Paste Event?
+    // Is this a cut, copy, paste event?
     KeyFuncType aKeyFunc = rKEvt.GetKeyCode().GetFunction();
     if( (aKeyFunc==KEYFUNC_CUT)||(aKeyFunc==KEYFUNC_COPY)||(aKeyFunc==KEYFUNC_PASTE) )
         m_bAccelAction = sal_True;
@@ -149,10 +149,9 @@ void OSqlEdit::KeyInput( const KeyEvent& rKEvt )
 sal_Bool OSqlEdit::IsInAccelAct()
 {
     DBG_CHKTHIS(OSqlEdit,NULL);
-    // Das Cut, Copy, Paste per Accel. fuehrt neben der Aktion im Edit im View
-    // auch die entsprechenden Slots aus. Die  Aktionen finden also zweimal statt.
-    // Um dies zu verhindern, kann im View beim SlotExec diese Funktion
-    // aufgerufen werden.
+    // Cut, Copy, Paste by Accel. runs the action in the Edit but also the
+    // corresponding slot in the View. Therefore, the action occurs twice.
+    // To prevent this, SlotExec in View can call this function.
 
     return m_bAccelAction;
 }
@@ -220,7 +219,7 @@ void OSqlEdit::SetText(const String& rNewText)
 {
     DBG_CHKTHIS(OSqlEdit,NULL);
     if (m_timerUndoActionCreation.IsActive())
-    {   // die noch anstehenden Undo-Action erzeugen
+    {   // create the trailing undo-actions
         m_timerUndoActionCreation.Stop();
         LINK(this, OSqlEdit, OnUndoActionTimer).Call(NULL);
     }
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index ab4b150..d057f13 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -320,47 +320,47 @@ DBG_NAME(OTextConnectionHelper)
         Control* pErrorWin = NULL;
         String aDelText(m_aFieldSeparator.GetText());
         if(!aDelText.Len())
-        {   // Kein FeldTrenner
+        {   // No FieldSeparator
             aErrorText = String(ModuleRes(STR_AUTODELIMITER_MISSING));
             aErrorText.SearchAndReplaceAscii("#1",m_aFieldSeparatorLabel.GetText());
             pErrorWin = &m_aFieldSeparator;
         }
         else if (!m_aDecimalSeparator.GetText().Len())
-        {   // kein Decimaltrenner
+        {   // No DecimalSeparator
             aErrorText = String(ModuleRes(STR_AUTODELIMITER_MISSING));
             aErrorText.SearchAndReplaceAscii("#1",m_aDecimalSeparatorLabel.GetText());
             pErrorWin = &m_aDecimalSeparator;
         }
         else if (m_aTextSeparator.GetText() == m_aFieldSeparator.GetText())
-        {   // Feld und TextTrenner duerfen nicht gleich sein
+        {   // Field and TextSeparator must not be the same
             aErrorText = String(ModuleRes(STR_AUTODELIMITER_MUST_DIFFER));
             aErrorText.SearchAndReplaceAscii("#1",m_aTextSeparatorLabel.GetText());
             aErrorText.SearchAndReplaceAscii("#2",m_aFieldSeparatorLabel.GetText());
             pErrorWin = &m_aTextSeparator;
         }
         else if (m_aDecimalSeparator.GetText() == m_aThousandsSeparator.GetText())
-        {   // Tausender und DecimalTrenner duerfen nicht gleich sein
+        {   // Thousands and DecimalSeparator must not be the same
             aErrorText = String(ModuleRes(STR_AUTODELIMITER_MUST_DIFFER));
             aErrorText.SearchAndReplaceAscii("#1",m_aDecimalSeparatorLabel.GetText());
             aErrorText.SearchAndReplaceAscii("#2",m_aThousandsSeparatorLabel.GetText());
             pErrorWin = &m_aDecimalSeparator;
         }
         else if (m_aFieldSeparator.GetText() == m_aThousandsSeparator.GetText())
-        {   // Tausender und FeldTrenner duerfen nicht gleich sein
+        {   // Thousands and FieldSeparator must not be the same
             aErrorText = String(ModuleRes(STR_AUTODELIMITER_MUST_DIFFER));
             aErrorText.SearchAndReplaceAscii("#1",m_aFieldSeparatorLabel.GetText());
             aErrorText.SearchAndReplaceAscii("#2",m_aThousandsSeparatorLabel.GetText());
             pErrorWin = &m_aFieldSeparator;
         }
         else if (m_aFieldSeparator.GetText() == m_aDecimalSeparator.GetText())
-        {   // Zehner und FeldTrenner duerfen nicht gleich sein
+        {   // Tenner and FieldSeparator must not be the same
             aErrorText = String(ModuleRes(STR_AUTODELIMITER_MUST_DIFFER));
             aErrorText.SearchAndReplaceAscii("#1",m_aFieldSeparatorLabel.GetText());
             aErrorText.SearchAndReplaceAscii("#2",m_aDecimalSeparatorLabel.GetText());
             pErrorWin = &m_aFieldSeparator;
         }
         else if (m_aTextSeparator.GetText() == m_aThousandsSeparator.GetText())
-        {   // Tausender und TextTrenner duerfen nicht gleich sein
+        {   // Thousands and TextSeparator must not be the same
             aErrorText = String(ModuleRes(STR_AUTODELIMITER_MUST_DIFFER));
             aErrorText.SearchAndReplaceAscii("#1",m_aTextSeparatorLabel.GetText());
             aErrorText.SearchAndReplaceAscii("#2",m_aThousandsSeparatorLabel.GetText());
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index f4c4ea9..10e0836 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -344,8 +344,8 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext )
              ,aHelpButton( this, ModuleRes( PB_HELP ) )
              ,m_rContext( _rContext )
 {
-    // der Close-Button hat schon einen Standard-Help-Text, den ich aber hier nicht haben moechte, also den Text ruecksetzen
-    // und eine neue ID verteilen
+    // the Close-Button already has a standard help text which should not
+    // occur here. Therefore, resetting the text and giving a new ID
     aCloseButton.SetHelpText(String());
     aCloseButton.SetHelpId(HID_JOINSH_ADDTAB_CLOSE);
 
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 2d8d4b2..c398ab4 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -301,10 +301,10 @@ void ODbaseIndexDialog::Init()
     aIB_RemoveAll.Disable();
 
     ///////////////////////////////////////////////////////////////////////////
-    // Alle Indizes werden erst einmal zur Liste der freien Indizes hinzugefuegt.
-    // Dann wird fuer jede Tabelle in der Inf-Datei nachgeschaut, welche Indizes sie besitzt.
-    // Diese Indizes werden aus der Liste der freien Indizes entfernt
-    // und in die Indexliste der Tabelle eingetragen
+    // All indizes are first added to a list of free indizes.
+    // Afterwards, check the index of each table in the Inf-file.
+    // These indizes are removed from the list of free indizes and
+    // entered in the indexlist of the the table.
 
     ///////////////////////////////////////////////////////////////////////////
     // if the string does not contain a path, cut the string
@@ -423,13 +423,13 @@ void ODbaseIndexDialog::SetCtrls()
         )
         aCB_Tables.InsertEntry( aLoop->aTableName );
 
-    // Den ersten Datensatz ins Edit stellen
+    // put the first dataset into Edit
     if( m_aTableInfoList.size() )
     {
         const OTableInfo& rTabInfo = m_aTableInfoList.front();
         aCB_Tables.SetText( rTabInfo.aTableName );
 
-        // ListBox der Tabellenindizes aufbauen
+        // build ListBox of the table indizes
         for (   ConstTableIndexListIterator aIndex = rTabInfo.aIndexList.begin();
                 aIndex != rTabInfo.aIndexList.end();
                 ++aIndex
@@ -441,7 +441,7 @@ void ODbaseIndexDialog::SetCtrls()
 
     }
 
-    // ListBox freie Indizes
+    // ListBox of the free indizes
     for (   ConstTableIndexListIterator aFree = m_aFreeIndexList.begin();
             aFree != m_aFreeIndexList.end();
             ++aFree
@@ -457,7 +457,7 @@ void ODbaseIndexDialog::SetCtrls()
 }
 
 //////////////////////////////////////////////////////////////////////////
-// Klasse OTableInfo
+// Class OTableInfo
 //-------------------------------------------------------------------------
 void OTableInfo::WriteInfFile( const String& rDSN ) const
 {
@@ -477,18 +477,18 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
     Config aInfFile( aTransformer.get(OFileNotation::N_SYSTEM) );
     aInfFile.SetGroup( aGroupIdent );
 
-    // Erst einmal alle Tabellenindizes loeschen
+    // first, delete all table indizes
     rtl::OString aNDX;
     sal_uInt16 nKeyCnt = aInfFile.GetKeyCount();
     sal_uInt16 nKey = 0;
 
     while( nKey < nKeyCnt )
     {
-        // Verweist der Key auf ein Indexfile?...
+        // Does the key point to an index file?...
         rtl::OString aKeyName = aInfFile.GetKeyName( nKey );
         aNDX = aKeyName.copy(0,3);
 
-        //...wenn ja, Indexfile loeschen, nKey steht dann auf nachfolgendem Key
+        //...if yes, delete index file, nKey is at subsequent key
         if (aNDX.equalsL(RTL_CONSTASCII_STRINGPARAM("NDX")))
         {
             aInfFile.DeleteKey(aKeyName);
@@ -499,7 +499,7 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
 
     }
 
-    // Jetzt alle gespeicherten Indizes hinzufuegen
+    // now add all saved indizes
     sal_uInt16 nPos = 0;
     for (   ConstTableIndexListIterator aIndex = aIndexList.begin();
             aIndex != aIndexList.end();
@@ -507,7 +507,7 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
         )
     {
         rtl::OStringBuffer aKeyName(RTL_CONSTASCII_STRINGPARAM("NDX"));
-        if( nPos > 0 )  // Erster Index erhaelt keine Ziffer
+        if( nPos > 0 )  // first index contains no number
             aKeyName.append(static_cast<sal_Int32>(nPos));
         aInfFile.WriteKey(
             aKeyName.makeStringAndClear(),
@@ -517,7 +517,7 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const
 
     aInfFile.Flush();
 
-    // Falls nur noch [dbase] in INF-File steht, Datei loeschen
+    // if only [dbase] is left in INF-file, delete file
     if(!nPos)
     {
         try
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index f8ef52b..e4775b4 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -103,14 +103,14 @@ DlgFilterCrit::DlgFilterCrit(Window * pParent,
     ,m_aPredicateInput( _rxORB, _rxConnection, getParseContext() )
 {
     DBG_CTOR(DlgFilterCrit,NULL);
-    // Den String fuer noEntry in die ListBoxen der Feldnamen schreiben
+    // Write the String for noEntry into the ListBoxes of the field names
     aLB_WHEREFIELD1.InsertEntry( aSTR_NOENTRY );
     aLB_WHEREFIELD2.InsertEntry( aSTR_NOENTRY );
     aLB_WHEREFIELD3.InsertEntry( aSTR_NOENTRY );
 
     try
     {
-        // ... sowie auch die restlichen Felder
+        // ... also write it into the remaining fields
         Sequence< ::rtl::OUString> aNames = m_xColumns->getElementNames();
         const ::rtl::OUString* pIter = aNames.getConstArray();
         const ::rtl::OUString* pEnd   = pIter + aNames.getLength();
@@ -590,7 +590,7 @@ void DlgFilterCrit::SelectField( ListBox& rBox, const String& rField )
 void DlgFilterCrit::EnableLines()
 {
     DBG_CHKTHIS(DlgFilterCrit,NULL);
-    // Enablen/Disablen ganzer Zeilen
+    // enabling/disabling of whole lines
     if( LbPos(aLB_WHEREFIELD1) == 0 )
     {
         aLB_WHEREFIELD2.Disable();
@@ -631,7 +631,7 @@ void DlgFilterCrit::EnableLines()
         aET_WHEREVALUE3.Enable();
     }
 
-    // Vergleichsfeld gleich NOENTRY
+    // comparison field equal to NOENTRY
     if( LbPos(aLB_WHEREFIELD1) == 0 )
     {
         aLB_WHERECOMP1.Disable();
@@ -673,7 +673,7 @@ void DlgFilterCrit::EnableLines()
         aET_WHEREVALUE3.Enable();
     }
 
-    // Vergleichsoperator gleich ISNULL oder ISNOTNULL
+    // comparison operator equal to ISNULL or ISNOTNULL
     if(aLB_WHERECOMP1.GetEntryCount() > 2 &&
         ((LbPos(aLB_WHERECOMP1) == aLB_WHERECOMP1.GetEntryCount()-1) ||
          (LbPos(aLB_WHERECOMP1) == aLB_WHERECOMP1.GetEntryCount()-2)) )
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx
index c817669..fa05721 100644
--- a/dbaccess/source/ui/dlg/queryorder.cxx
+++ b/dbaccess/source/ui/dlg/queryorder.cxx
@@ -103,7 +103,7 @@ DlgOrderCrit::DlgOrderCrit( Window * pParent,
     }
     try
     {
-        // ... sowie auch die restlichen Felder
+        // ... also the remaining fields
         Sequence< ::rtl::OUString> aNames = m_xColumns->getElementNames();
         const ::rtl::OUString* pIter = aNames.getConstArray();
         const ::rtl::OUString* pEnd   = pIter + aNames.getLength();
commit 21d7f4b4bba79558de830d9e815e127f67274355
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Mon Jul 30 15:15:58 2012 +0200

    gstreamer: make gstreamer 1.0 and 0.10 dual compile
    
    Add fallback activation of an _OLD media component to the core.
    Compile both a 0.10 and 1.0 version of the gstreamer component
    
    Change-Id: I91f65d05391cb2d7e02f9cff18f96178a128705O1

diff --git a/Repository.mk b/Repository.mk
index 8e8df07..8e782d3 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -426,6 +426,7 @@ endif
 
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
     avmediagst \
+    avmediagst_0_10 \
     avmediawin \
     cached1 \
     collator_data \
diff --git a/avmedia/Library_avmediagst.mk b/avmedia/Library_avmediagst.mk
index 6336ee4..ee8a09a 100644
--- a/avmedia/Library_avmediagst.mk
+++ b/avmedia/Library_avmediagst.mk
@@ -33,8 +33,9 @@ $(eval $(call gb_Library_set_componentfile,avmediagst,avmedia/source/gstreamer/a
 $(eval $(call gb_Library_set_include,avmediagst,\
 	$$(INCLUDE) \
 	-I$(SRCDIR)/avmedia/source/inc \
-	$(shell pkg-config --cflags gstreamer-0.10, gstreamer-plugins-base-0.10) \
+	$(GSTREAMER_CFLAGS) \
 ))
+$(eval $(call gb_Library_add_libs,avmediagst,$(GSTREAMER_LIBS)))
 
 $(eval $(call gb_Library_use_sdk_api,avmediagst))
 
@@ -54,11 +55,6 @@ $(eval $(call gb_Library_use_libraries,avmediagst,\
 	$(gb_STDLIBS) \
 ))
 
-$(eval $(call gb_Library_add_libs,avmediagst,\
-	$(shell pkg-config --libs gstreamer-0.10, gstreamer-plugins-base-0.10) \
-	-lgstinterfaces-0.10 \
-))
-
 $(eval $(call gb_Library_add_exception_objects,avmediagst,\
 	avmedia/source/gstreamer/gstmanager \
 	avmedia/source/gstreamer/gstplayer \
diff --git a/avmedia/Module_avmedia.mk b/avmedia/Module_avmedia.mk
index 729c24f..ef50457 100644
--- a/avmedia/Module_avmedia.mk
+++ b/avmedia/Module_avmedia.mk
@@ -40,6 +40,12 @@ $(eval $(call gb_Module_add_targets,avmedia,\
 ))
 endif
 
+ifeq ($(ENABLE_GSTREAMER_0_10),TRUE)
+$(eval $(call gb_Module_add_targets,avmedia,\
+	Library_avmediagst_0_10 \
+))
+endif
+
 ifeq ($(GUIBASE),aqua)
 $(eval $(call gb_Module_add_targets,avmedia,\
 	Library_avmediaQuickTime \
diff --git a/avmedia/source/gstreamer/avmediagstreamer_0_10.component b/avmedia/source/gstreamer/avmediagstreamer_0_10.component
new file mode 100644
index 0000000..3fc61d7
--- /dev/null
+++ b/avmedia/source/gstreamer/avmediagstreamer_0_10.component
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component loader="com.sun.star.loader.SharedLibrary" xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.media.Manager_GStreamer_0_10">
+    <service name="com.sun.star.comp.avmedia.Manager_GStreamer_0_10"/>
+  </implementation>
+</component>
diff --git a/avmedia/source/gstreamer/gst_0_10.cxx b/avmedia/source/gstreamer/gst_0_10.cxx
new file mode 100644
index 0000000..a0624c4
--- /dev/null
+++ b/avmedia/source/gstreamer/gst_0_10.cxx
@@ -0,0 +1,15 @@
+#define AVMEDIA_GST_0_10
+
+// forward compatibility goodness
+#include <gst/interfaces/xoverlay.h>
+#define gst_video_overlay_expose(a) gst_x_overlay_expose(GST_X_OVERLAY (a))
+#define gst_video_overlay_set_window_handle(a,b) gst_x_overlay_set_xwindow_id( \
+                                                    reinterpret_cast<GstXOverlay *>(a), (b) )
+#define GST_VIDEO_OVERLAY(a) reinterpret_cast<GstVideoOverlay *>(a)
+
+// #define GstVideoOverlay GstXOverlay
+
+#include "gstmanager.cxx"
+#include "gstplayer.cxx"
+#include "gstuno.cxx"
+#include "gstwindow.cxx"
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index d95342a..28e5d34 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -33,7 +33,6 @@
 #include <vcl/syschild.hxx>
 #include <vcl/sysdata.hxx>
 
-
 #include "gstplayer.hxx"
 #include "gstframegrabber.hxx"
 #include "gstwindow.hxx"
@@ -45,8 +44,14 @@
 #define AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_GStreamer"
 #define AVMEDIA_GST_PLAYER_SERVICENAME "com.sun.star.media.Player_GStreamer"
 
-#if OSL_DEBUG_LEVEL > 2
-#define DBG OSL_TRACE
+#ifdef AVMEDIA_GST_0_10
+#  define AVVERSION "gst 0.10: "
+#else
+#  define AVVERSION "gst 1.0: "
+#endif
+
+#if 1 //OSL_DEBUG_LEVEL > 2
+#define DBG(...) do { fprintf (stderr, "%s", AVVERSION); fprintf (stderr, __VA_ARGS__); fprintf (stderr, "\n"); } while (0);
 #else
 #define DBG(...)
 #endif
@@ -83,15 +88,22 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
 
     mbInitialized = gst_init_check( &argc, &argv, &pError );
 
+    DBG( "%p Player::Player", this );
+
     if (pError != NULL)
+    {
         // TODO: thow an exception?
+        DBG( "%p Player::Player error '%s'", this, pError->message );
         g_error_free (pError);
+    }
 }
 
 // ------------------------------------------------------------------------------
 
 Player::~Player()
 {
+    DBG( "%p Player::~Player", this );
+
     // Release the elements and pipeline
     if( mbInitialized )
     {
@@ -160,7 +172,7 @@ static gboolean wrap_element_query_position (GstElement *element, GstFormat form
 {
 #ifdef AVMEDIA_GST_0_10
     GstFormat my_format = format;
-    return gst_element_query_position( mpPlaybin, &my_format, cur) && my_format == format && *cur > 0L;
+    return gst_element_query_position( element, &my_format, cur) && my_format == format && *cur > 0L;
 #else
     return gst_element_query_position( element, format, cur );
 #endif
@@ -170,7 +182,7 @@ static gboolean wrap_element_query_duration (GstElement *element, GstFormat form
 {
 #ifdef AVMEDIA_GST_0_10
     GstFormat my_format = format;
-    return gst_element_query_duration( mpPlaybin, &my_format, duration) && my_format == format && *duration > 0L;
+    return gst_element_query_duration( element, &my_format, duration) && my_format == format && *duration > 0L;
 #else
     return gst_element_query_duration( element, format, duration );
 #endif
@@ -178,21 +190,27 @@ static gboolean wrap_element_query_duration (GstElement *element, GstFormat form
 
 GstBusSyncReply Player::processSyncMessage( GstMessage *message )
 {
-    DBG( "%p processSyncMessage: %s", this, GST_MESSAGE_TYPE_NAME( message ) );
+//    DBG( "%p processSyncMessage has handle: %s", this, GST_MESSAGE_TYPE_NAME( message ) );
 
-#if OSL_DEBUG_LEVEL > 0
+#if 1 // OSL_DEBUG_LEVEL > 0
     if ( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR )
     {
         GError* error;
         gchar* error_debug;
 
         gst_message_parse_error( message, &error, &error_debug );
-        OSL_TRACE("gstreamer error: '%s' debug: '%s'", error->message, error_debug);
+        fprintf(stderr, "gstreamer error: '%s' debug: '%s'", error->message, error_debug);
     }
 #endif
 
-    if (gst_message_has_name (message, "prepare-xwindow-id") && mnWindowID != 0 )
+#ifdef AVMEDIA_GST_0_10
+    if (message->structure &&
+        !strcmp( gst_structure_get_name( message->structure ), "prepare-xwindow-id" ) && mnWindowID != 0 )
+#else
+    if (gst_message_has_name (message, "prepare-window-handle") && mnWindowID != 0 )
+#endif
     {
+        DBG( "%p processSyncMessage has handle: %s", this, GST_MESSAGE_TYPE_NAME( message ) );
         if( mpXOverlay )
             g_object_unref( G_OBJECT ( mpXOverlay ) );
         mpXOverlay = GST_VIDEO_OVERLAY( GST_MESSAGE_SRC( message ) );
@@ -208,7 +226,8 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
 
             gst_message_parse_state_changed (message, NULL, &newstate, &pendingstate);
 
-            DBG( "%p state change received, new state %d", this, newstate );
+            DBG( "%p state change received, new state %d pending %d", this,
+                 (int)newstate, (int)pendingstate );
             if( newstate == GST_STATE_PAUSED &&
                 pendingstate == GST_STATE_VOID_PENDING ) {
 
@@ -280,7 +299,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
                     mnWidth = w;
                     mnHeight = h;
 
-                    DBG( "queried size: %d x %d", mnWidth, mnHeight );
+                    fprintf (stderr, "queried size: %d x %d", mnWidth, mnHeight );
 
                     maSizeCondition.set();
                 }
@@ -289,6 +308,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
         }
 #endif
     } else if( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR ) {
+        fprintf (stderr, "Error !\n");
         if( mnWidth == 0 ) {
             // an error occurred, set condition so that OOo thread doesn't wait for us
             maSizeCondition.set();
@@ -353,7 +373,7 @@ bool Player::create( const ::rtl::OUString& rURL )
 
 // ------------------------------------------------------------------------------
 
-void SAL_CALL Player::start(  )
+void SAL_CALL Player::start()
     throw (uno::RuntimeException)
 {
     // set the pipeline state to READY and run the loop
@@ -366,7 +386,7 @@ void SAL_CALL Player::start(  )
 
 // ------------------------------------------------------------------------------
 
-void SAL_CALL Player::stop(  )
+void SAL_CALL Player::stop()
     throw (uno::RuntimeException)
 {
     // set the pipeline in PAUSED STATE
@@ -397,7 +417,7 @@ sal_Bool SAL_CALL Player::isPlaying()
 
 // ------------------------------------------------------------------------------
 
-double SAL_CALL Player::getDuration(  )
+double SAL_CALL Player::getDuration()
     throw (uno::RuntimeException)
 {
     // slideshow checks for non-zero duration, so cheat here
@@ -432,14 +452,13 @@ void SAL_CALL Player::setMediaTime( double fTime )
 
 // ------------------------------------------------------------------------------
 
-double SAL_CALL Player::getMediaTime(  )
+double SAL_CALL Player::getMediaTime()
     throw (uno::RuntimeException)
 {
     double position = 0.0;
 
     if( mpPlaybin ) {
         // get current position in the stream
-        GstFormat format = GST_FORMAT_TIME;
         gint64 gst_position;
         if( wrap_element_query_position( mpPlaybin, GST_FORMAT_TIME, &gst_position ) )
             position = gst_position / 1E9;
@@ -450,7 +469,7 @@ double SAL_CALL Player::getMediaTime(  )
 
 // ------------------------------------------------------------------------------
 
-double SAL_CALL Player::getRate(  )
+double SAL_CALL Player::getRate()
     throw (uno::RuntimeException)
 {
     double rate = 0.0;
@@ -475,7 +494,7 @@ void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet )
 
 // ------------------------------------------------------------------------------
 
-sal_Bool SAL_CALL Player::isPlaybackLoop(  )
+sal_Bool SAL_CALL Player::isPlaybackLoop()
     throw (uno::RuntimeException)
 {
     // TODO check how to do with GST
@@ -506,7 +525,7 @@ void SAL_CALL Player::setMute( sal_Bool bSet )
 
 // ------------------------------------------------------------------------------
 
-sal_Bool SAL_CALL Player::isMute(  )
+sal_Bool SAL_CALL Player::isMute()
     throw (uno::RuntimeException)
 {
     return mbMuted;
@@ -530,7 +549,7 @@ void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB )
 
 // ------------------------------------------------------------------------------
 
-sal_Int16 SAL_CALL Player::getVolumeDB(  )
+sal_Int16 SAL_CALL Player::getVolumeDB()
     throw (uno::RuntimeException)
 {
     sal_Int16 nVolumeDB(0);
@@ -548,7 +567,7 @@ sal_Int16 SAL_CALL Player::getVolumeDB(  )
 
 // ------------------------------------------------------------------------------
 
-awt::Size SAL_CALL Player::getPreferredPlayerWindowSize(  )
+awt::Size SAL_CALL Player::getPreferredPlayerWindowSize()
     throw (uno::RuntimeException)
 {
     awt::Size aSize( 0, 0 );
@@ -556,7 +575,7 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize(  )
     DBG( "%p Player::getPreferredPlayerWindowSize, member %d x %d", this, mnWidth, mnHeight );
 
     TimeValue aTimeout = { 10, 0 };
-#if OSL_DEBUG_LEVEL > 2
+#if 1 // OSL_DEBUG_LEVEL > 2
     osl::Condition::Result aResult =
 #endif
                                  maSizeCondition.wait( &aTimeout );
@@ -612,7 +631,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
 
 // ------------------------------------------------------------------------------
 
-uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber(  )
+uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber()
     throw (uno::RuntimeException)
 {
     uno::Reference< media::XFrameGrabber > xRet;
@@ -622,7 +641,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber(  )
 
 // ------------------------------------------------------------------------------
 
-::rtl::OUString SAL_CALL Player::getImplementationName(  )
+::rtl::OUString SAL_CALL Player::getImplementationName()
     throw (uno::RuntimeException)
 {
     return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME ) );
@@ -638,7 +657,7 @@ sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName )
 
 // ------------------------------------------------------------------------------
 
-uno::Sequence< ::rtl::OUString > SAL_CALL Player::getSupportedServiceNames(  )
+uno::Sequence< ::rtl::OUString > SAL_CALL Player::getSupportedServiceNames()
     throw (uno::RuntimeException)
 {
     uno::Sequence< ::rtl::OUString > aRet(1);
diff --git a/avmedia/source/gstreamer/gstplayer.hxx b/avmedia/source/gstreamer/gstplayer.hxx
index aa6c020..c6f4635 100644
--- a/avmedia/source/gstreamer/gstplayer.hxx
+++ b/avmedia/source/gstreamer/gstplayer.hxx
@@ -34,7 +34,7 @@
 
 #include "com/sun/star/media/XPlayer.hpp"
 
-typedef struct _GstXOverlay GstXOverlay;
+typedef struct _GstVideoOverlay GstVideoOverlay;
 
 namespace avmedia { namespace gstreamer {
 
@@ -95,7 +95,7 @@ private:
     sal_Bool                mbInitialized;
 
     long                    mnWindowID;
-    GstXOverlay*            mpXOverlay;
+    GstVideoOverlay*        mpXOverlay;
     gint64                  mnDuration;
     int                     mnWidth;
     int                     mnHeight;
diff --git a/avmedia/source/gstreamer/gstuno.cxx b/avmedia/source/gstreamer/gstuno.cxx
index 8095353..affb8eb 100644
--- a/avmedia/source/gstreamer/gstuno.cxx
+++ b/avmedia/source/gstreamer/gstuno.cxx
@@ -26,6 +26,7 @@
  *
  ************************************************************************/
 
+#include "mediamisc.hxx"
 #include "gstmanager.hxx"
 
 using namespace ::com::sun::star;
@@ -34,6 +35,14 @@ using namespace ::com::sun::star;
 // - factory methods -
 // -------------------
 
+#ifdef AVMEDIA_GST_0_10
+#  define IMPL_NAME    "com.sun.star.comp.media.Manager_GStreamer_0_10"
+#  define SERVICE_NAME AVMEDIA_MANAGER_SERVICE_NAME_OLD // "com.sun.star.comp.avmedia.Manager_GStreamer_0_10"
+#else
+#  define IMPL_NAME    "com.sun.star.comp.media.Manager_GStreamer"
+#  define SERVICE_NAME AVMEDIA_MANAGER_SERVICE_NAME // "com.sun.star.comp.avmedia.Manager_GStreamer"
+#endif
+
 static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& rxFact )
 {
     return uno::Reference< uno::XInterface >( *new ::avmedia::gstreamer::Manager( rxFact ) );
@@ -44,14 +53,12 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_C
     uno::Reference< lang::XSingleServiceFactory > xFactory;
     void*                                   pRet = 0;
 
-    if( rtl_str_compare( pImplName, "com.sun.star.comp.media.Manager_GStreamer" ) == 0 )
+    if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
     {
-        const ::rtl::OUString aServiceName( ::rtl::OUString("com.sun.star.media.Manager_GStreamer" ) );
-
+        const ::rtl::OUString aServiceName( SERVICE_NAME );
         xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
                         reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
-                        ::rtl::OUString("com.sun.star.comp.media.Manager_GStreamer" ),
-                        create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
+                        IMPL_NAME, create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) );
     }
 
     if( xFactory.is() )
diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx
index 8f129bb..f042629 100644
--- a/avmedia/source/inc/mediamisc.hxx
+++ b/avmedia/source/inc/mediamisc.hxx
@@ -30,23 +30,14 @@ class ResMgr;
 
 #define AVMEDIA_RESID( nId ) ResId( nId, * ::avmedia::GetResMgr() )
 
-#ifdef GSTREAMER
-#define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_GStreamer"
-#else
 #ifdef WNT
-
 #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_DirectX"
-
 #else
 #ifdef QUARTZ
-
 #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_QuickTime"
-
 #else
-
+#define AVMEDIA_MANAGER_SERVICE_NAME_OLD "com.sun.star.comp.avmedia.Manager_GStreamer_0_10"
 #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_GStreamer"
-
-#endif
 #endif
 #endif
 
diff --git a/avmedia/source/viewer/mediawindowbase_impl.cxx b/avmedia/source/viewer/mediawindowbase_impl.cxx
index e7d4534..bc81869 100644
--- a/avmedia/source/viewer/mediawindowbase_impl.cxx
+++ b/avmedia/source/viewer/mediawindowbase_impl.cxx
@@ -70,10 +70,25 @@ uno::Reference< media::XPlayer > MediaWindowBaseImpl::createPlayer( const ::rtl:
     {
         try
         {
+            uno::Reference< ::com::sun::star::media::XManager > xManager;
 
-            uno::Reference< ::com::sun::star::media::XManager > xManager(
-                xFactory->createInstance( ::rtl::OUString( AVMEDIA_MANAGER_SERVICE_NAME ) ),
-                uno::UNO_QUERY );
+            try {
+                xManager = uno::Reference< ::com::sun::star::media::XManager >(
+                        xFactory->createInstance( AVMEDIA_MANAGER_SERVICE_NAME ),
+                        uno::UNO_QUERY );
+            } catch ( const uno::Exception &e ) {
+            }
+
+// a fallback path just for gstreamer which has
+// two significant versions deployed at once ...
+#ifdef AVMEDIA_MANAGER_SERVICE_NAME_OLD
+            if( !xManager.is() )
+            {
+                xManager = uno::Reference< ::com::sun::star::media::XManager >(
+                        xFactory->createInstance( AVMEDIA_MANAGER_SERVICE_NAME_OLD ),
+                        uno::UNO_QUERY );
+            }
+#endif
 
             if( xManager.is() )
             {
diff --git a/config_host.mk.in b/config_host.mk.in
index 5dd2b8f..a3501f1 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -115,6 +115,7 @@ export ENABLE_GNOMEVFS=@ENABLE_GNOMEVFS@
 export ENABLE_CORETEXT=@ENABLE_CORETEXT@
 export ENABLE_GRAPHITE=@ENABLE_GRAPHITE@
 export ENABLE_GSTREAMER=@ENABLE_GSTREAMER@
+export ENABLE_GSTREAMER_0_10=@ENABLE_GSTREAMER_0_10@
 export ENABLE_GTK3=@ENABLE_GTK3@
 export ENABLE_GTK=@ENABLE_GTK@
 export ENABLE_GTK_PRINT=@ENABLE_GTK_PRINT@
@@ -188,6 +189,8 @@ export GRAPHITE_LIBS=@GRAPHITE_LIBS@
 @x_Cygwin@ export GREP=@WIN_GREP@
 export GSTREAMER_CFLAGS=@GSTREAMER_CFLAGS@
 export GSTREAMER_LIBS=@GSTREAMER_LIBS@
+export GSTREAMER_0_10_CFLAGS=@GSTREAMER_0_10_CFLAGS@
+export GSTREAMER_0_10_LIBS=@GSTREAMER_0_10_LIBS@
 export GTHREAD_CFLAGS=@GTHREAD_CFLAGS@
 export GTHREAD_LIBS=@GTHREAD_LIBS@
 export GTK3_CFLAGS=@GTK3_CFLAGS@
diff --git a/configure.in b/configure.in
index fb50dee..637058f 100644
--- a/configure.in
+++ b/configure.in
@@ -247,6 +247,7 @@ case "$host_os" in
 solaris*)
     test_gtk=yes
     build_gstreamer=yes
+    build_gstreamer_0_10=yes
     test_tde=yes
     test_kde=yes
     test_freetype=yes
@@ -276,6 +277,7 @@ solaris*)
 linux-gnu*|k*bsd*-gnu*)
     test_gtk=yes
     build_gstreamer=yes
+    build_gstreamer_0_10=yes
     test_tde=yes
     test_kde=yes
     test_kde4=yes
@@ -363,6 +365,7 @@ darwin*) # Mac OS X or iOS
 freebsd*)
     test_gtk=yes
     build_gstreamer=yes
+    build_gstreamer_0_10=yes
     test_tde=yes
     test_kde=yes
     test_kde4=yes
@@ -392,6 +395,7 @@ freebsd*)
 *netbsd*)
     test_gtk=yes
     build_gstreamer=yes
+    build_gstreamer_0_10=yes
     test_tde=no
     test_kde=no
     test_kde4=yes
@@ -420,6 +424,7 @@ openbsd*)
 dragonfly*)
     test_gtk=yes
     build_gstreamer=yes
+    build_gstreamer_0_10=yes
     test_tde=yes
     test_kde=yes
     test_kde4=yes
@@ -430,6 +435,7 @@ dragonfly*)
 
 linux-androideabi*)
     build_gstreamer=no
+    build_gstreamer_0_10=no
     test_cups=no
     test_fontconfig=no
     test_freetype=no
@@ -930,9 +936,14 @@ AC_ARG_ENABLE(randr-link,
 ,enable_randr_link=yes)
 
 AC_ARG_ENABLE(gstreamer,
-    AS_HELP_STRING([--disable-gstreamer],
+    AS_HELP_STRING([--enable-gstreamer],
+        [Enable building with the new gstreamer 1.0 avmedia backend.]),
+,enable_gstreamer=no)
+
+AC_ARG_ENABLE(gstreamer-0-10,
+    AS_HELP_STRING([--disable-gstreamer-0-10],
         [Disable building the gstreamer avmedia backend.]),
-,enable_gstreamer=yes)
+,enable_gstreamer_0_10=yes)
 
 AC_ARG_ENABLE(neon,
     AS_HELP_STRING([--disable-neon],
@@ -3903,6 +3914,7 @@ if test "$enable_headless" = "yes"; then
     test_fontconfig=yes
     test_gtk=no
     build_gstreamer=no
+    build_gstreamer_0_10=no
     test_tde=no
     test_kde=no
     test_kde4=no
@@ -9207,20 +9219,39 @@ dnl ===================================================================
 
 ENABLE_GSTREAMER=""
 
-if test  "$build_gstreamer" = "yes"; then
+if test "$build_gstreamer" = "yes"; then
 
     AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
     if test "x$enable_gstreamer" != "xno"; then
         ENABLE_GSTREAMER="TRUE"
         AC_MSG_RESULT([yes])
-        PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
+        PKG_CHECK_MODULES( GSTREAMER, gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-video-1.0 )
     else
         AC_MSG_RESULT([no])
     fi
 fi
-
+AC_SUBST(GSTREAMER_CFLAGS)
+AC_SUBST(GSTREAMER_LIBS)
 AC_SUBST(ENABLE_GSTREAMER)
 
+
+ENABLE_GSTREAMER_0_10=""
+if test "$build_gstreamer_0_10" = "yes"; then
+
+    AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
+    if test "x$enable_gstreamer_0_10" != "xno"; then
+        ENABLE_GSTREAMER_0_10="TRUE"
+        AC_MSG_RESULT([yes])
+        PKG_CHECK_MODULES( GSTREAMER_0_10, gstreamer-0.10 gstreamer-plugins-base-0.10 )
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+
+AC_SUBST(GSTREAMER_0_10_CFLAGS)
+AC_SUBST(GSTREAMER_0_10_LIBS)
+AC_SUBST(ENABLE_GSTREAMER_0_10)
+
 dnl ===================================================================
 dnl Check whether the OpenGL libraries are available
 dnl ===================================================================
diff --git a/distro-configs/LibreOfficeAndroid.conf b/distro-configs/LibreOfficeAndroid.conf
index 7d50098..aac1da7 100644
--- a/distro-configs/LibreOfficeAndroid.conf
+++ b/distro-configs/LibreOfficeAndroid.conf
@@ -6,6 +6,7 @@
 --disable-ext-report-builder
 --disable-gconf
 --disable-gnome-vfs
+--disable-gstreamer-0-10
 --disable-gstreamer
 --disable-lockdown
 --disable-mozilla
diff --git a/distro-configs/LibreOfficeAndroidX86.conf b/distro-configs/LibreOfficeAndroidX86.conf
index 24907e4..a60fec7 100644
--- a/distro-configs/LibreOfficeAndroidX86.conf
+++ b/distro-configs/LibreOfficeAndroidX86.conf
@@ -7,6 +7,7 @@
 --disable-ext-report-builder
 --disable-gconf
 --disable-gnome-vfs
+--disable-gstreamer-0-10
 --disable-gstreamer
 --disable-lockdown
 --disable-mozilla
diff --git a/distro-configs/LibreOfficeLinux.conf b/distro-configs/LibreOfficeLinux.conf
index 647001e..92726f8 100644
--- a/distro-configs/LibreOfficeLinux.conf
+++ b/distro-configs/LibreOfficeLinux.conf
@@ -25,7 +25,7 @@
 --enable-odk
 --enable-lockdown
 --enable-kde
---enable-gstreamer
+--enable-gstreamer-0-10
 --enable-gnome-vfs
 --enable-ext-wiki-publisher
 --enable-ext-report-builder
diff --git a/distro-configs/LibreOfficeOpenBSD.conf b/distro-configs/LibreOfficeOpenBSD.conf
index 8315fe3..bcc5291 100644
--- a/distro-configs/LibreOfficeOpenBSD.conf
+++ b/distro-configs/LibreOfficeOpenBSD.conf
@@ -11,7 +11,7 @@
 --disable-randr-link
 --disable-unix-qstart-libpng
 --enable-binfilter
---enable-gstreamer
+--enable-gstreamer-0-10
 --enable-lockdown
 --enable-ext-presenter-minimizer
 --enable-ext-pdfimport
diff --git a/distro-configs/LibreOfficeiOS.conf b/distro-configs/LibreOfficeiOS.conf
index 705cb63..67afb67 100644
--- a/distro-configs/LibreOfficeiOS.conf
+++ b/distro-configs/LibreOfficeiOS.conf
@@ -7,6 +7,7 @@
 --disable-extension-integration
 --disable-gconf
 --disable-gnome-vfs
+--disable-gstreamer-0-10
 --disable-gstreamer
 --disable-librsvg
 --disable-lockdown
diff --git a/distro-configs/OxygenOfficeLinux.conf b/distro-configs/OxygenOfficeLinux.conf
index b4e27b9..274dd9e 100644
--- a/distro-configs/OxygenOfficeLinux.conf
+++ b/distro-configs/OxygenOfficeLinux.conf
@@ -73,7 +73,7 @@
 --without-junit
 --with-helppack-integration
 --enable-odk
---enable-gstreamer
+--enable-gstreamer-0-10
 --enable-graphite
 --enable-dependency-tracking
 --enable-python=internal
diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk
index 4ced4c1..eb5574b 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -398,6 +398,10 @@ my_components += component/connectivity/source/drivers/evoab2/evoab
 my_components += component/avmedia/source/gstreamer/avmediagstreamer
 .END
 
+.IF "$(OS)" != "WNT" && "$(ENABLE_GSTREAMER_0_10)" != ""
+my_components += component/avmedia/source/gstreamer/avmediagstreamer_0_10
+.END
+
 .INCLUDE: target.mk
 
 ALLTAR : $(MISC)/services.rdb
diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk
index edfebe6..685b70e 100644
--- a/scp2/InstallModule_ooo.mk
+++ b/scp2/InstallModule_ooo.mk
@@ -152,6 +152,9 @@ $(eval $(call gb_InstallModule_add_defs,scp2/ooo,\
 	$(if $(filter TRUE,$(ENABLE_GSTREAMER)),\
 		-DGSTREAMER \
 	) \
+	$(if $(filter TRUE,$(ENABLE_GSTREAMER_0_10)),\
+		-DGSTREAMER_0_10 \
+	) \
 	$(if $(WINDOWS_SDK_HOME),\
 		-DHAVE_WINDOWS_SDK \
 	) \
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 79f48c5..eaeb58f 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1476,7 +1476,11 @@ STD_LIB_FILE( gid_File_Lib_AVMedia, avmedia )
 
 #ifdef GSTREAMER
 SPECIAL_LIB_FILE_PATCH( gid_File_Lib_AVMediaGStreamer, avmediagst )
-#elif defined WNT
+#endif
+#ifdef GSTREAMER_0_10
+SPECIAL_LIB_FILE_PATCH( gid_File_Lib_AVMediaGStreamer_0_10, avmediagst_0_10 )
+#endif
+#if defined WNT
 #ifdef ENABLE_DIRECTX
 SPECIAL_LIB_FILE( gid_File_Lib_AVMediaWin, avmediawin )
 #endif
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index c0b3495..66563e5 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -202,15 +202,15 @@ Module gid_Module_Root_Files_4
 	gid_File_Lib_Chartcontroller,
 	gid_File_Lib_Ctl,
 	gid_File_Lib_Cui,
-    gid_File_Lib_Sdbt,
-    gid_File_Lib_Dbmm,
+	gid_File_Lib_Sdbt,
+	gid_File_Lib_Dbmm,
 	gid_File_Lib_Dba,
 	gid_File_Lib_Dbase2,
 	gid_File_Lib_Dbaxml,
 	gid_File_Lib_Dbt,
 	gid_File_Lib_Dbfile,
 	gid_File_Lib_Drawinglayer,
-        gid_File_Lib_Editeng,
+	gid_File_Lib_Editeng,
 	gid_File_Lib_Flat,
 	gid_File_Lib_For,
 	gid_File_Lib_Forui,
@@ -249,15 +249,16 @@ Module gid_Module_Root_Files_4
 	gid_File_Lib_Svx,
 	gid_File_Lib_AVMedia,
 	gid_File_Lib_AVMediaWin,
-    gid_File_Lib_AVMediaGStreamer,
+	gid_File_Lib_AVMediaGStreamer,
+	gid_File_Lib_AVMediaGStreamer_0_10,
 	gid_File_Lib_BaseGfx,
-    gid_File_Lib_Merged,
+	gid_File_Lib_Merged,
 	gid_File_Lib_Sysdtrans,
 	gid_File_Lib_Sw,
 	gid_File_Lib_TextConversionDlgs,
 	gid_File_Lib_Tk,
-    gid_File_Lib_Acc,
-    gid_File_Lib_BaseBmp,
+	gid_File_Lib_Acc,
+	gid_File_Lib_BaseBmp,
 	gid_File_Lib_Tools,
 	gid_File_Lib_Utl,
 	gid_File_Lib_Uui,
@@ -283,8 +284,8 @@ Module gid_Module_Root_Files_4
 	gid_File_Lib_Fwm,
 	gid_File_Lib_Lprx2,
 	gid_File_Lib_Lprxw,
-    gid_File_Lib_Libtextcat,
-    gid_File_Lib_Guesslang,
+	gid_File_Lib_Libtextcat,
+	gid_File_Lib_Guesslang,
 	gid_File_Lib_Tfu);
 End
 
diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx
index 4abf31b..4c18c8b 100644
--- a/svx/source/sdr/contact/viewcontact.cxx
+++ b/svx/source/sdr/contact/viewcontact.cxx
@@ -269,7 +269,7 @@ namespace sdr
 
         drawinglayer::primitive2d::Primitive2DSequence ViewContact::createViewIndependentPrimitive2DSequence() const
         {
-            // This is the default impelemtation and should never be called (see header). If this is called,
+            // This is the default implementation and should never be called (see header). If this is called,
             // someone implemented a ViewContact (VC) visualisation object without defining the visualisation by
             // providing a seqence of primitives -> which cannot be correct.
             // Since we have no access to any known model data here, the default implementation creates a yellow placeholder
commit 95938a123cbc8c0741a505b61ca874c0153c3f7a
Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Sun Jul 29 19:14:05 2012 +0200

    tentative initial attempt at re-work for new playbin
    
    Change-Id: I257bdda8469be624d0cbeab21cff2c2e1c94cc6f

diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 863d1e8..d95342a 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -38,7 +38,9 @@
 #include "gstframegrabber.hxx"
 #include "gstwindow.hxx"
 
-#include <gst/interfaces/xoverlay.h>
+#ifndef AVMEDIA_GST_0_10
+#  include <gst/video/videooverlay.h>
+#endif
 
 #define AVMEDIA_GST_PLAYER_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Player_GStreamer"
 #define AVMEDIA_GST_PLAYER_SERVICENAME "com.sun.star.media.Player_GStreamer"
@@ -96,7 +98,7 @@ Player::~Player()
         if( mpPlaybin )
         {
             gst_element_set_state( mpPlaybin, GST_STATE_NULL );
-            gst_object_unref( GST_OBJECT( mpPlaybin ) );
+            g_object_unref( G_OBJECT( mpPlaybin ) );
 
             mpPlaybin = NULL;
         }
@@ -110,7 +112,7 @@ Player::~Player()
 
 // ------------------------------------------------------------------------------
 
-static gboolean gst_pipeline_bus_callback( GstBus *, GstMessage *message, gpointer data )
+static gboolean pipeline_bus_callback( GstBus *, GstMessage *message, gpointer data )
 {
     Player* pPlayer = static_cast<Player*>(data);
 
@@ -119,7 +121,7 @@ static gboolean gst_pipeline_bus_callback( GstBus *, GstMessage *message, gpoint
     return TRUE;
 }
 
-static GstBusSyncReply gst_pipeline_bus_sync_handler( GstBus *, GstMessage * message, gpointer data )
+static GstBusSyncReply pipeline_bus_sync_handler( GstBus *, GstMessage * message, gpointer data )
 {
     Player* pPlayer = static_cast<Player*>(data);
 
@@ -144,7 +146,7 @@ void Player::processMessage( GstMessage *message )
             if( newstate == GST_STATE_PAUSED &&
                 pendingstate == GST_STATE_VOID_PENDING &&
                 mpXOverlay )
-                gst_x_overlay_expose( mpXOverlay );
+                gst_video_overlay_expose( mpXOverlay );
 
         if (mbPlayPending)
             mbPlayPending = ((newstate == GST_STATE_READY) || (newstate == GST_STATE_PAUSED));
@@ -154,6 +156,26 @@ void Player::processMessage( GstMessage *message )
     }
 }
 
+static gboolean wrap_element_query_position (GstElement *element, GstFormat format, gint64 *cur)
+{
+#ifdef AVMEDIA_GST_0_10
+    GstFormat my_format = format;
+    return gst_element_query_position( mpPlaybin, &my_format, cur) && my_format == format && *cur > 0L;
+#else
+    return gst_element_query_position( element, format, cur );
+#endif
+}
+
+static gboolean wrap_element_query_duration (GstElement *element, GstFormat format, gint64 *duration)
+{
+#ifdef AVMEDIA_GST_0_10
+    GstFormat my_format = format;
+    return gst_element_query_duration( mpPlaybin, &my_format, duration) && my_format == format && *duration > 0L;
+#else
+    return gst_element_query_duration( element, format, duration );
+#endif
+}
+
 GstBusSyncReply Player::processSyncMessage( GstMessage *message )
 {
     DBG( "%p processSyncMessage: %s", this, GST_MESSAGE_TYPE_NAME( message ) );
@@ -169,17 +191,17 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
     }
 #endif
 
-    if (message->structure) {
-        if( !strcmp( gst_structure_get_name( message->structure ), "prepare-xwindow-id" ) && mnWindowID != 0 ) {
-            if( mpXOverlay )
-                g_object_unref( G_OBJECT ( mpXOverlay ) );
-            mpXOverlay = GST_X_OVERLAY( GST_MESSAGE_SRC( message ) );
-            g_object_ref( G_OBJECT ( mpXOverlay ) );
-            gst_x_overlay_set_xwindow_id( mpXOverlay, mnWindowID );
-            return GST_BUS_DROP;
-        }
+    if (gst_message_has_name (message, "prepare-xwindow-id") && mnWindowID != 0 )
+    {
+        if( mpXOverlay )
+            g_object_unref( G_OBJECT ( mpXOverlay ) );
+        mpXOverlay = GST_VIDEO_OVERLAY( GST_MESSAGE_SRC( message ) );
+        g_object_ref( G_OBJECT ( mpXOverlay ) );
+        gst_video_overlay_set_window_handle( mpXOverlay, mnWindowID );
+        return GST_BUS_DROP;
     }
 
+#ifdef AVMEDIA_GST_0_10
     if( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_STATE_CHANGED ) {
         if( message->src == GST_OBJECT( mpPlaybin ) ) {
             GstState newstate, pendingstate;
@@ -193,10 +215,8 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
                 DBG( "%p change to paused received", this );
 
                 if( mnDuration == 0) {
-                    GstFormat format = GST_FORMAT_TIME;
                     gint64 gst_duration = 0L;
-
-                    if( gst_element_query_duration( mpPlaybin, &format, &gst_duration) && format == GST_FORMAT_TIME && gst_duration > 0L )
+                    if( wrap_element_query_duration( mpPlaybin, GST_FORMAT_TIME, &gst_duration) )
                         mnDuration = gst_duration;
                 }
 
@@ -234,6 +254,40 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
                 }
             }
         }
+#else
+    // We get to use the exciting new playbin2 ! (now known as playbin)
+    if( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ASYNC_DONE ) {
+        if( mnDuration == 0) {
+            gint64 gst_duration = 0L;
+            if( wrap_element_query_duration( mpPlaybin, GST_FORMAT_TIME, &gst_duration) )
+                mnDuration = gst_duration;
+        }
+        if( mnWidth == 0 ) {
+            GstPad *pad = NULL;
+            GstCaps *caps;
+
+            g_signal_emit_by_name( mpPlaybin, "get-video-pad", 0, &pad );
+
+            if( pad ) {
+                int w = 0, h = 0;
+
+                caps = gst_pad_get_current_caps( pad );
+
+                if( gst_structure_get( gst_caps_get_structure (caps, 0),
+                                       "width", G_TYPE_INT, &w,
+                                       "height", G_TYPE_INT, &h,
+                                       NULL ) ) {
+                    mnWidth = w;
+                    mnHeight = h;
+
+                    DBG( "queried size: %d x %d", mnWidth, mnHeight );
+
+                    maSizeCondition.set();
+                }
+                gst_caps_unref( caps );
+            }
+        }
+#endif
     } else if( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR ) {
         if( mnWidth == 0 ) {
             // an error occurred, set condition so that OOo thread doesn't wait for us
@@ -265,9 +319,9 @@ void Player::preparePlaybin( const ::rtl::OUString& rURL, bool bFakeVideo )
         g_object_set( G_OBJECT( mpPlaybin ), "uri", ascURL.getStr() , NULL );
 
         pBus = gst_element_get_bus( mpPlaybin );
-        gst_bus_add_watch( pBus, gst_pipeline_bus_callback, this );
+        gst_bus_add_watch( pBus, pipeline_bus_callback, this );
         DBG( "%p set sync handler", this );
-        gst_bus_set_sync_handler( pBus, gst_pipeline_bus_sync_handler, this );
+        gst_bus_set_sync_handler( pBus, pipeline_bus_sync_handler, this );
         g_object_unref( pBus );
 }
 
@@ -387,7 +441,7 @@ double SAL_CALL Player::getMediaTime(  )
         // get current position in the stream
         GstFormat format = GST_FORMAT_TIME;
         gint64 gst_position;
-        if( gst_element_query_position( mpPlaybin, &format, &gst_position ) && format == GST_FORMAT_TIME && gst_position > 0L )
+        if( wrap_element_query_position( mpPlaybin, GST_FORMAT_TIME, &gst_position ) )
             position = gst_position / 1E9;
     }
 


More information about the Libreoffice-commits mailing list