rpms/amarok/devel amarok-asf.patch,NONE,1.1 amarok.spec,1.91,1.92

Rex Dieter (rdieter) fedora-extras-commits at redhat.com
Thu Nov 29 20:30:47 UTC 2007


Author: rdieter

Update of /cvs/pkgs/rpms/amarok/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13490

Modified Files:
	amarok.spec 
Added Files:
	amarok-asf.patch 
Log Message:
* Thu Nov 29 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.4.7-12
- --with-mp4v2 (rh#346011)
- fix asf/wma support (rh#346011,kde#151733)


amarok-asf.patch:

--- NEW FILE amarok-asf.patch ---

Property changes on: amarok/src/metadata/asf
___________________________________________________________________
Name: svn:ignore
   + .libs
.deps
Makefile
Makefile.in


Index: amarok/src/metadata/asf/asffile.h
===================================================================
--- amarok/src/metadata/asf/asffile.h	(revision 0)
+++ amarok/src/metadata/asf/asffile.h	(revision 743005)
@@ -0,0 +1,114 @@
+/**************************************************************************
+    copyright            : (C) 2005-2007 by Lukáš Lalinský
+    email                : lalinsky at gmail.com
+ **************************************************************************/
+
+/***************************************************************************
+ *   This library is free software; you can redistribute it and/or modify  *
+ *   it  under the terms of the GNU Lesser General Public License version  *
+ *   2.1 as published by the Free Software Foundation.                     *
+ *                                                                         *
+ *   This library is distributed in the hope that it will be useful, but   *
+ *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
+ *   Lesser General Public License for more details.                       *
+ *                                                                         *
+ *   You should have received a copy of the GNU Lesser General Public      *
+ *   License along with this library; if not, write to the Free Software   *
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
+ *   USA                                                                   *
+ ***************************************************************************/
+
+#ifndef TAGLIB_ASFFILE_H
+#define TAGLIB_ASFFILE_H
+
+#include <tag.h>
+#include <tfile.h>
+#include "asfproperties.h"
+#include "asftag.h"
+
+namespace TagLib {
+
+  //! An implementation of ASF (WMA) metadata
+  namespace ASF {
+
+    /*!
+     * This implements and provides an interface for ASF files to the
+     * TagLib::Tag and TagLib::AudioProperties interfaces by way of implementing
+     * the abstract TagLib::File API as well as providing some additional
+     * information specific to ASF files.
+     */
+    class File : public TagLib::File
+    {
+    public:
+
+      /*!
+       * Contructs an ASF file from \a file.  If \a readProperties is true the
+       * file's audio properties will also be read using \a propertiesStyle.  If
+       * false, \a propertiesStyle is ignored.
+       *
+       * \note In the current implementation, both \a readProperties and
+       * \a propertiesStyle are ignored.
+       */
+      File(const char *file, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
+
+      /*!
+       * Destroys this instance of the File.
+       */
+      virtual ~File();
+
+      /*!
+       * Returns a pointer to the ASF tag of the file.
+       *
+       * ASF::Tag implements the tag interface, so this serves as the
+       * reimplementation of TagLib::File::tag().
+       *
+       * \note The Tag <b>is still</b> owned by the ASF::File and should not be
+       * deleted by the user.  It will be deleted when the file (object) is
+       * destroyed.
+       */
+      virtual Tag *tag() const;
+
+      /*!
+       * Returns the ASF audio properties for this file.
+       */
+      virtual Properties *audioProperties() const;
+
+      /*!
+       * Save the file.
+       *
+       * This returns true if the save was successful.
+       */
+      virtual bool save();
+
+    private:
+
+      int readBYTE();
+      int readWORD();
+      unsigned int readDWORD();
+      long long readQWORD();
+      static ByteVector renderString(const String &str, bool includeLength = false);
+      String readString(int len);
+      void read(bool readProperties, Properties::ReadStyle propertiesStyle);
+
+      friend class Attribute;
+
+      class BaseObject;
+      class UnknownObject;
+      class FilePropertiesObject;
+      class StreamPropertiesObject;
+      class ContentDescriptionObject;
+      class ExtendedContentDescriptionObject;
+      class HeaderExtensionObject;
+      class MetadataObject;
+      class MetadataLibraryObject;
+
+      class FilePrivate;
+      FilePrivate *d;
+    };
+
+  }
+
+}
+
+#endif

Property changes on: amarok/src/metadata/asf/asffile.h
___________________________________________________________________
Name: svn:eol-style
   + native

Index: amarok/src/metadata/asf/taglib_asffiletyperesolver.cpp
===================================================================
--- amarok/src/metadata/asf/taglib_asffiletyperesolver.cpp	(revision 0)
+++ amarok/src/metadata/asf/taglib_asffiletyperesolver.cpp	(revision 743005)
@@ -0,0 +1,47 @@
+/***************************************************************************
+    copyright            : (C) 2005 by Martin Aumueller
+    email                : aumuell at reserv.at
+ ***************************************************************************/
+
+/***************************************************************************
+ *   This library is free software; you can redistribute it and/or modify  *
+ *   it  under the terms of the GNU Lesser General Public License version  *
+ *   2.1 as published by the Free Software Foundation.                     *
+ *                                                                         *
+ *   This library is distributed in the hope that it will be useful, but   *
+ *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
+ *   Lesser General Public License for more details.                       *
+ *                                                                         *
+ *   You should have received a copy of the GNU Lesser General Public      *
+ *   License along with this library; if not, write to the Free Software   *
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            *
+ *   MA  02110-1301  USA                                                   *
+ ***************************************************************************/
+
+// (c) 2005 Martin Aumueller <aumuell at reserv.at>
+// See COPYING file for licensing information
+
+#include "taglib_asffiletyperesolver.h"
+#include "asffile.h"
+
+#include <string.h>
+
+TagLib::File *ASFFileTypeResolver::createFile(const char *fileName,
+        bool readProperties,
+        TagLib::AudioProperties::ReadStyle propertiesStyle) const
+{
+    const char *ext = strrchr(fileName, '.');
+    if(ext && (!strcasecmp(ext, ".wma") || !strcasecmp(ext, ".asf")))
+    {
+        TagLib::ASF::File *f = new TagLib::ASF::File(fileName, readProperties, propertiesStyle);
+        if(f->isValid())
+            return f;
+        else
+        {
+            delete f;
+        }
+    }
+
+    return 0;
+}
Index: amarok/src/metadata/asf/asfattribute.h
===================================================================
--- amarok/src/metadata/asf/asfattribute.h	(revision 0)
+++ amarok/src/metadata/asf/asfattribute.h	(revision 743005)
@@ -0,0 +1,176 @@
+/**************************************************************************
+    copyright            : (C) 2005-2007 by Lukáš Lalinský
+    email                : lalinsky at gmail.com
+ **************************************************************************/
+
+/***************************************************************************
+ *   This library is free software; you can redistribute it and/or modify  *
[...3134 lines suppressed...]
-        }
-    }
-
-    return 0;
-}
Index: amarok/src/metadata/wma/wmaattribute.h
===================================================================
--- amarok/src/metadata/wma/wmaattribute.h	(revision 705231)
+++ amarok/src/metadata/wma/wmaattribute.h	(working copy)
@@ -1,125 +0,0 @@
-/***************************************************************************
-    copyright            : (C) 2005 by Lukas Lalinsky
-    email                : lalinsky at gmail.com
- ***************************************************************************/
-
-/***************************************************************************
- *   This library is free software; you can redistribute it and/or modify  *
- *   it  under the terms of the GNU Lesser General Public License version  *
- *   2.1 as published by the Free Software Foundation.                     *
- *                                                                         *
- *   This library is distributed in the hope that it will be useful, but   *
- *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
- *   Lesser General Public License for more details.                       *
- *                                                                         *
- *   You should have received a copy of the GNU Lesser General Public      *
- *   License along with this library; if not, write to the Free Software   *
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            *
- *   MA  02110-1301  USA                                                   *
- ***************************************************************************/
-
-#ifndef TAGLIB_WMAATTRIBUTE_H
-#define TAGLIB_WMAATTRIBUTE_H
-
-#include <tstring.h>
-#include <tbytevector.h>
-
-namespace TagLib {
-
-  namespace WMA {
- 
-    class File;  
-      
-    class Attribute {
-
-      friend class File;  
-        
-    public:
-
-      /*!
-       * Enum of types an Attribute can have.
-       */
-      enum AttributeTypes {
-        UnicodeType = 0,
-        BytesType   = 1,
-        BoolType    = 2,
-        DWordType   = 3,
-        QWordType   = 4,
-        WordType    = 5
-      };
-
-      /*!
-       * Constructs an empty attribute.
-       */       
-      Attribute();
-      
-      /*!
-       * Constructs an attribute with \a key and \a value.
-       */       
-      Attribute(const String &key, const String &value);
-      Attribute(const String &key, const ByteVector &value);
-      Attribute(const String &key, unsigned int value);
-      Attribute(const String &key, unsigned long long value);
-      Attribute(const String &key, unsigned short value);
-      Attribute(const String &key, bool value);
-      
-      /*!
-       * Construct an attribute as a copy of \a item.
-       */
-      Attribute(const Attribute &item);       
-      
-      /*!
-       * Destroys the attribute.
-       */ 
-      virtual ~Attribute();
-
-      /*!
-       * Returns the name.
-       */
-      String name() const;
-      
-      /*!
-       * Returns type of the value.
-       */
-      AttributeTypes type() const;
-      
-      /*!
-       * Returns the value as a String.
-       */
-      String toString() const;
-      
-      /*!
-       * Returns the value as a ByteVector.
-       */
-      ByteVector toByteVector() const;
-      
-      /*!
-       * Returns the value as an integer.
-       */
-      int toInt() const;
-      
-      /*!
-       * Returns the value as a long long.
-       */
-      long long toLongLong() const;
-      
-      ByteVector render() const;
-      
-    protected:
-    
-      Attribute(WMA::File &file);
-      bool parse(WMA::File &file);
-      
-    private:
-      
-      class AttributePrivate;
-      AttributePrivate *d;
-    
-    };
-  
-  }
-  
-}
-
-#endif

Property changes on: amarok/src/metadata/wma
___________________________________________________________________
Name: svn:ignore
   - .libs
.deps
Makefile
Makefile.in


Index: amarok/src/metadata/tplugins.cpp
===================================================================
--- amarok/src/metadata/tplugins.cpp	(revision 705231)
+++ amarok/src/metadata/tplugins.cpp	(working copy)
@@ -42,8 +42,8 @@
 #include "wavpack/wvfile.h"
 #include "speex/taglib_speexfiletyperesolver.h"
 #include "speex/speexfile.h"
-#include "wma/taglib_wmafiletyperesolver.h"
-#include "wma/wmafile.h"
+#include "asf/taglib_asffiletyperesolver.h"
+#include "asf/asffile.h"
 #include "rmff/taglib_realmediafiletyperesolver.h"
 #include "rmff/taglib_realmediafile.h"
 #include "audible/taglib_audiblefiletyperesolver.h"
@@ -95,7 +95,7 @@
             || mimetype->is( "video/x-msvideo" )
             || mimetype->is( "video/x-ms-wmv" ) )
     {
-        return new TagLib::WMA::File(fileName, readProperties, propertiesStyle);
+        return new TagLib::ASF::File(fileName, readProperties, propertiesStyle);
     }
     else if( mimetype->is( "audio/vnd.rn-realaudio" )
             || mimetype->is( "audio/x-pn-realaudio" )
@@ -130,7 +130,7 @@
 {
     //TagLib::FileRef::addFileTypeResolver(new MimeTypeFileTypeResolver);
     TagLib::FileRef::addFileTypeResolver(new MP4FileTypeResolver);
-    TagLib::FileRef::addFileTypeResolver(new WMAFileTypeResolver);
+    TagLib::FileRef::addFileTypeResolver(new ASFFileTypeResolver);
     TagLib::FileRef::addFileTypeResolver(new RealMediaFileTypeResolver);
     TagLib::FileRef::addFileTypeResolver(new AudibleFileTypeResolver);
     TagLib::FileRef::addFileTypeResolver(new AACFileTypeResolver);
Index: amarok/src/metadata/Makefile.am
===================================================================
--- amarok/src/metadata/Makefile.am	(revision 705231)
+++ amarok/src/metadata/Makefile.am	(working copy)
@@ -6,7 +6,7 @@
 MP4_LDADD = m4a/libtagm4a.la
 endif
 
-SUBDIRS = speex wavpack trueaudio wma audible rmff $(MP4_SUBDIR) aac wav
+SUBDIRS = speex wavpack trueaudio asf audible rmff $(MP4_SUBDIR) aac wav
 
 
 INCLUDES           = -I$(top_srcdir)/amarok/src $(all_includes) $(taglib_includes)
@@ -24,7 +24,7 @@
                      speex/libtagspeex.la \
                      trueaudio/libtagtrueaudio.la \
                      wavpack/libtagwavpack.la \
-                     wma/libtagwma.la \
+                     asf/libtagasf.la \
                      wav/libtagwav.la \
                      rmff/libtagrealmedia.la \
                      $(MP4_LDADD) \


Index: amarok.spec
===================================================================
RCS file: /cvs/pkgs/rpms/amarok/devel/amarok.spec,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- amarok.spec	21 Nov 2007 17:26:50 -0000	1.91
+++ amarok.spec	29 Nov 2007 20:30:13 -0000	1.92
@@ -1,10 +1,12 @@
 # TODO:
 # Rio Karma support : libkarma
 
+%define _with_mp4v2 --with-mp4v2
+
 Name:       amarok
 Summary:    Media player
 Version:    1.4.7
-Release:    11%{?dist}
+Release:    12%{?dist}
 
 Group: 	    Applications/Multimedia
 License:    GPLv2+
@@ -21,8 +23,12 @@
 # http://bugs.kde.org/148317 - dynamic mode floods playlist ...
 # http://websvn.kde.org/branches/stable/extragear/multimedia/amarok/src/playlist.cpp?r1=705494&r2=705493&pathrev=705494&view=patch
 Patch3:     amarok-1.4.7-148317.patch 
+# fix asf/wma support (with recent taglib)
+# svn diff amarok/src/metadata --revision 705231
+Patch4:     amarok-asf.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+BuildRequires:  automake libtool
 BuildRequires:  alsa-lib-devel
 BuildRequires:  desktop-file-utils
 BuildRequires:  esound-devel
@@ -40,6 +46,7 @@
 BuildRequires:  libifp-devel
 # Ipod
 BuildRequires:  libgpod-devel
+%{?_with_mp4v2:BuildRequires: libmp4v2-devel}
 # MTP players
 BuildRequires:  libmtp-devel
 BuildRequires:  libmusicbrainz-devel
@@ -99,12 +106,16 @@
 
 
 %prep
-%setup -q
+%setup -q 
+
 %patch0 -p0 -b .147126
 %patch1 -p1 -b .utf8
 %patch2 -p1 -b .xdg
 %patch3 -p4 -b .148317
+%patch4 -p0 -b .asf
 
+# for patch4
+make -f admin/Makefile.common 
 
 
 %build
@@ -120,7 +131,8 @@
 %ifnarch ppc64 x86_64 s390 s390x ia64 sparc sparc64 alpha
      --with-helix=%{_libdir}/helix \
 %endif
-     %{?_with_gstreamer}
+     %{?_with_gstreamer} \
+     %{?_with_livm4v2}
 
 #     --enable-final \
 #     --with-nmm \
@@ -148,12 +160,14 @@
 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 
 
-%find_lang %{name}
+%find_lang %{name} 
 # HTML
 for lang_dir in $RPM_BUILD_ROOT%{_docdir}/HTML/* ; do
-  lang=$(basename $lang_dir)
-  [ "$lang" == "en" ] && d=en/%{name} || d=$lang
-  echo "%lang($lang) %doc %{_docdir}/HTML/$d" >> %{name}.lang
+  if [ -d $lang_dir ]; then
+    lang=$(basename $lang_dir)
+    [ "$lang" == "en" ] && d=en/%{name} || d=$lang
+    echo "%lang($lang) %doc %{_docdir}/HTML/$d" >> %{name}.lang
+  fi
 done
 
 
@@ -248,14 +262,16 @@
 %{_datadir}/services/amarok_helixengine_plugin.desktop
 %endif
 
-
 %files visualisation
 %defattr(-,root,root,-)
 %{_bindir}/amarok_libvisual
 
 
-
 %changelog
+* Thu Nov 29 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.4.7-12
+- --with-mp4v2 (rh#346011)
+- fix asf/wma support (rh#346011,kde#151733)
+
 * Wed Nov 21 2007 Rex Dieter <rdieter[AT]fedoraproject.org> 1.4.7-11
 - dynamic mode floods playlist ... (kde #148317)
 




More information about the fedora-extras-commits mailing list