[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-multimedia
Subject:    [PATCH] mpeglib_artsplug portability
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2000-09-01 12:23:45
[Download RAW message or body]

Hi!

Some code in mpeglib_artsplug seems to be quite portability resistant (i.e.
causing errors like the one I quoted below (reported by Alex on FreeBSD).
Without getting in a should-we-have-mpeglib-on-bsd discussion: there is
a reason for this error, and it seems a good idea for a compiler to complain
about it (whether or not g++-2.95.2 currently does), so I'd like to correct
it.

The reason is that you may only inherit a <someartsinterface>_(base/skel)
object in your implementation, if you do so in the IDL file. However,
mpeglib_artsplug currently doesn't follow this rule, as it's DecoderBaseObject
inherits and partially implements the StdSynthModule interface (which is
derived from Arts::SynthModule) without doing so in the .idl file.

So there are two choices for fixing this:

 * do not inherit Arts::SynthModule in the .idl file (as it is now) and do not
   inherit StdSynthModule it in DecoderBaseObject either

 * inherit it in the .idl file (and no longer in the derived MPGPlayObject,
   MP3PlayObject,...), and keep the DecoderBaseObject implementation as it
   is

As *all* DecoderBaseObject derived classes also inherit Arts::SynthModule, I
suggest using the second option. I attached a patch for doing so, and if there
are no objections, I'll commit it (Alex tested it, and it does fix the compile
error of FreeBSD).

   Cu... Stefan

gmake[1]: Entering directory \
                `/usr/home/alex/cvs/kde-cvs/kdemultimedia/obj-i386/mpeglib_artsplug'
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../mpeglib_artsplug \
-I.. -I/usr/local/kde/include -I/usr/local/qt/include -I/usr/X11R6/include  \
-I../mpeglib/lib 					-I/usr/local/kde/include/artsc \
-I/usr/local/kde/include/artsc/../arts  -I/include  -gstabs3 -Wall -W -ansi -pedantic \
-pipe -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST  -c decoderBaseObject.cc \
mkdir .libs g++ -DHAVE_CONFIG_H -I. -I../../mpeglib_artsplug -I.. \
-I/usr/local/kde/include -I/usr/local/qt/include -I/usr/X11R6/include \
-I../mpeglib/lib -I/usr/local/kde/include/artsc \
-I/usr/local/kde/include/artsc/../arts -I/include -gstabs3 -Wall -W -ansi -pedantic \
-pipe -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST \
-Wp,-MD,.deps/decoderBaseObject.pp -c decoderBaseObject.cc  -fPIC -DPIC -o \
                .libs/decoderBaseObject.o
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../mpeglib_artsplug \
-I.. -I/usr/local/kde/include -I/usr/local/qt/include -I/usr/X11R6/include  \
-I../mpeglib/lib 					-I/usr/local/kde/include/artsc \
-I/usr/local/kde/include/artsc/../arts  -I/include  -gstabs3 -Wall -W -ansi -pedantic \
-pipe -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST  -c \
../../mpeglib_artsplug/oggPlayObject_impl.cpp g++ -DHAVE_CONFIG_H -I. \
-I../../mpeglib_artsplug -I.. -I/usr/local/kde/include -I/usr/local/qt/include \
-I/usr/X11R6/include -I../mpeglib/lib -I/usr/local/kde/include/artsc \
-I/usr/local/kde/include/artsc/../arts -I/include -gstabs3 -Wall -W -ansi -pedantic \
-pipe -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST \
-Wp,-MD,.deps/oggPlayObject_impl.pp -c ../../mpeglib_artsplug/oggPlayObject_impl.cpp  \
-fPIC -DPIC -o .libs/oggPlayObject_impl.o In file included from \
../../mpeglib_artsplug/oggPlayObject_impl.h:18,  from \
                ../../mpeglib_artsplug/oggPlayObject_impl.cpp:16:
../../mpeglib_artsplug/decoderBaseObject_impl.h:93: `class \
vector<basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> \
>,allocator<basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> \
> > > > Arts::SynthModule_base::_defaultPortsIn() const' needs a final overrider
../../mpeglib_artsplug/decoderBaseObject_impl.h:93: `class \
vector<basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> \
>,allocator<basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> \
> > > > Arts::SynthModule_base::_defaultPortsOut() const' needs a final overrider
../../mpeglib_artsplug/decoderBaseObject_impl.h:93: `void * \
                Arts::SynthModule_base::_cast(long unsigned int)' needs a final \
                overrider
../../mpeglib_artsplug/oggPlayObject_impl.cpp: In method `class DecoderPlugin * \
                OGGPlayObject_impl::createPlugin()':
../../mpeglib_artsplug/oggPlayObject_impl.cpp:55: warning: assignment to `char *' \
from `const char *' discards qualifiers gmake[1]: *** [oggPlayObject_impl.lo] Error 1
gmake[1]: Leaving directory \
                `/usr/home/alex/cvs/kde-cvs/kdemultimedia/obj-i386/mpeglib_artsplug'
gmake: *** [all-recursive] Error 1
-- 
  -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-         


["20000901-decoder-inherit-fix.diff" (text/plain)]

Index: decoderBaseObject.idl
===================================================================
RCS file: /home/kde/kdemultimedia/mpeglib_artsplug/decoderBaseObject.idl,v
retrieving revision 1.1.1.1
diff -b -u -p -r1.1.1.1 decoderBaseObject.idl
--- decoderBaseObject.idl	2000/07/04 19:37:00	1.1.1.1
+++ decoderBaseObject.idl	2000/08/31 10:38:13
@@ -3,40 +3,31 @@
 
 
 
-interface DecoderBaseObject : Arts::PlayObject
+interface DecoderBaseObject : Arts::PlayObject, Arts::SynthModule
 {
 
-
-
 };
 
 
-interface MP3PlayObject : DecoderBaseObject , Arts::SynthModule
+interface MP3PlayObject : DecoderBaseObject
 {
   out audio stream left,right;
-
 };
 
 
-interface WAVPlayObject : DecoderBaseObject , Arts::SynthModule
+interface WAVPlayObject : DecoderBaseObject
 {
   out audio stream left,right;
-
 };
 
 
-interface MPGPlayObject : DecoderBaseObject , Arts::SynthModule
+interface MPGPlayObject : DecoderBaseObject
 {
   out audio stream left,right;
-
 };
 
 
-interface OGGPlayObject : DecoderBaseObject , Arts::SynthModule
+interface OGGPlayObject : DecoderBaseObject
 {
   out audio stream left,right;
-
 };
-
-
-

_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic