Ticket #4270: 4270-plugins-v1.patch

File 4270-plugins-v1.patch, 11.0 KB (added by danielk, 16 years ago)

What is left of the plugins patch; mythmusic & mythgallery.

  • configure

     
    471471        fi
    472472    fi
    473473
    474     if test "$paranoia" = "no" -a "$targetos" != "Darwin"; then
     474    if test "$paranoia" = "no" -a "$targetos" != "Darwin" -a "$targetos" != "MINGW32_NT-6.0"; then
    475475        echo "MythMusic requires CDDA Paranoia."
    476476    fi
    477477
     
    489489        echo "MythMusic requires taglib 1.4."
    490490    fi
    491491
    492     if test "$targetos" != "Darwin" ; then
     492    if test "$targetos" != "Darwin" -a "$targetos" != "MINGW32_NT-6.0" ; then
    493493        if test "$cdaudio" = "no" -o "$paranoia" = "no" ; then
    494494            cdlibs="no"
    495495        fi
  • mythmusic/mythmusic/playbackbox.cpp

     
    1515#include <mythtv/lcddevice.h>
    1616#include <mythtv/mythmedia.h>
    1717#include <mythtv/audiooutput.h>
     18#include <mythtv/compat.h>
    1819
    1920// MythMusic includes
    2021#include "metadata.h"
    2122#include "constants.h"
    2223#include "streaminput.h"
    2324#include "decoder.h"
    24 #include "cddecoder.h"
    2525#include "playbackbox.h"
    2626#include "databasebox.h"
    2727#include "mainvisual.h"
    2828#include "smartplaylist.h"
    2929#include "search.h"
    3030
     31#ifndef CONFIG_MINGW
     32#include "cddecoder.h"
     33#endif
     34
    3135PlaybackBoxMusic::PlaybackBoxMusic(MythMainWindow *parent, QString window_name,
    3236                                   QString theme_filename, const QString &dev, const char *name)
    3337
  • mythmusic/mythmusic/synaesthesia.cpp

     
    2626#include <iostream>
    2727using namespace std;
    2828
     29#include <mythtv/compat.h>
     30
    2931Synaesthesia::Synaesthesia(long int winid)
    3032{
    3133    fps = 29;
  • mythmusic/mythmusic/mythmusic.pro

     
    6868    QMAKE_LFLAGS += -flat_namespace -undefined error
    6969}
    7070
     71mingw {
     72    DEFINES += USING_MINGW
     73
     74    HEADERS -= cdrip.h   importmusic.h
     75    SOURCES -= cdrip.cpp importmusic.cpp cddecoder.cpp
     76
     77    LIBS += -logg
     78}
  • mythmusic/mythmusic/globalsettings.cpp

     
    1616
    1717// mythtv
    1818#include <mythtv/util.h>
     19#include <mythtv/compat.h>
    1920
    2021// mythmusic
    2122#include "globalsettings.h"
  • mythmusic/mythmusic/playlist.cpp

     
    88#include <mythtv/mythcontext.h>
    99#include "smartplaylist.h"
    1010#include <mythtv/mythdbcon.h>
     11#include <mythtv/compat.h>
    1112
    1213#include <qfileinfo.h>
    1314#include <qprocess.h>
  • mythmusic/mythmusic/decoder.cpp

     
    191191        Decoder::registerFactory(new VorbisDecoderFactory);
    192192        Decoder::registerFactory(new MadDecoderFactory);
    193193        Decoder::registerFactory(new FlacDecoderFactory);
     194#ifndef CONFIG_MINGW
    194195        Decoder::registerFactory(new CdDecoderFactory);
     196#endif
    195197        Decoder::registerFactory(new avfDecoderFactory);
    196198#ifdef AAC_SUPPORT
    197199        Decoder::registerFactory(new aacDecoderFactory);
  • mythmusic/mythmusic/bumpscope.cpp

     
    11#include "mainvisual.h"
    22#include "bumpscope.h"
    33
     4#include <mythtv/compat.h>
     5
    46// This was:
    57// Bump Scope - Visualization Plugin for XMMS
    68// Copyright (C) 1999-2001 Zinx Verituse
  • mythmusic/mythmusic/avfdecoder.cpp

     
    3131
    3232#include <mythtv/mythcontext.h>
    3333
    34 typedef struct {
    35     uint32_t v1;
    36     uint16_t v2;
    37     uint16_t v3;
    38     uint8_t v4[8];
    39 } GUID;
    40 
    4134avfDecoder::avfDecoder(const QString &file, DecoderFactory *d, QIODevice *i,
    4235                       AudioOutput *o)
    4336          : Decoder(d, i, o)
  • mythmusic/mythmusic/databasebox.cpp

     
    2424#include "cddecoder.h"
    2525#include "playlist.h"
    2626#include "musicplayer.h"
     27#ifndef CONFIG_MINGW
     28#include "cddecoder.h"
     29#endif
    2730
    2831DatabaseBox::DatabaseBox(MythMainWindow *parent,
    2932                         const QString dev, const QString &window_name,
     
    12601263
    12611264void ReadCDThread::run()
    12621265{
     1266#ifndef CONFIG_MINGW
    12631267    // lock all_music and cd_status_changed while running thread
    12641268    QMutexLocker locker(getLock());
    12651269
     
    13471351    }
    13481352
    13491353    delete decoder;
     1354#endif
    13501355}
    13511356
  • mythmusic/mythmusic/main.cpp

     
    1515#include <mythtv/mythdbcon.h>
    1616#include <mythtv/mythpluginapi.h>
    1717#include <mythtv/libmythui/myththemedmenu.h>
     18#include <mythtv/compat.h>
    1819
    1920// MythMusic headers
    2021#include "decoder.h"
     
    2324#include "vorbisdecoder.h"
    2425#include "databasebox.h"
    2526#include "playbackbox.h"
    26 #include "cdrip.h"
    2727#include "playlist.h"
    2828#include "globalsettings.h"
    2929#include "dbcheck.h"
    30 #include "importmusic.h"
    3130#include "filescanner.h"
    3231#include "musicplayer.h"
    3332#include "config.h"
     33#ifndef CONFIG_MINGW
     34#include "cdrip.h"
     35#include "importmusic.h"
     36#endif
    3437
    3538// System header (relies on config.h define)
    3639#ifdef HAVE_CDAUDIO
     
    171174
    172175bool startRipper(void)
    173176{
     177#ifndef CONFIG_MINGW
    174178    Ripper rip(chooseCD(), gContext->GetMainWindow(), "cd ripper");
    175179
    176180    qApp->unlock();
     
    179183
    180184    if (rip.somethingWasRipped())
    181185      return true;
    182 
     186#endif
    183187    return false;
    184188}
    185189
    186190bool startImport(void)
    187191{
     192#ifndef CONFIG_MINGW
    188193    ImportMusicDialog import(gContext->GetMainWindow(), "import music");
    189194
    190195    qApp->unlock();
     
    193198
    194199    if (import.somethingWasImported())
    195200        return true;
    196 
     201#endif
    197202    return false;
    198203}
    199204
  • mythmusic/mythmusic/mainvisual.cpp

     
    149149    {
    150150        if (pVisFactory->name() == visName)
    151151        {
    152             vis = pVisFactory->create(this, winId(), pluginName);
     152            vis = pVisFactory->create(this, (long int) winId(), pluginName);
    153153            vis->resize(size());
    154154            fps = vis->getDesiredFPS();
    155155            break;
  • mythmusic/mythmusic/libvisualplugin.cpp

     
    33using namespace std;
    44
    55#include <mythtv/mythcontext.h>
     6#include <mythtv/compat.h>
    67
    78#include "libvisualplugin.h"
    89
  • mythmusic/mythmusic/goom/goom_core.c

     
    22#include <stdio.h>
    33#include <string.h>
    44
    5 #include "config.h"
     5#include "../config.h"
    66#ifdef HAVE_STDINT_H
    77#include <stdint.h>
    88#endif
     
    126126        buffsize = resx * resy;
    127127
    128128        pixel = (guint32 *) malloc (buffsize * sizeof (guint32) + 128);
    129         bzero (pixel, buffsize * sizeof (guint32) + 128);
     129        memset (pixel, 0, buffsize * sizeof (guint32) + 128);
    130130        back = (guint32 *) malloc (buffsize * sizeof (guint32) + 128);
    131         bzero (back, buffsize * sizeof (guint32) + 128);
     131        memset (back, 0, buffsize * sizeof (guint32) + 128);
    132132        p1 = (guint32 *) ((1 + ((uintptr_t) (pixel)) / 128) * 128);
    133133        p2 = (guint32 *) ((1 + ((uintptr_t) (back)) / 128) * 128);
    134134
  • mythmusic/mythmusic/metaiooggvorbiscomment.cpp

     
    1 #include <iostream>
     1// POSIX headers
    22#include <unistd.h>
    33#include <sys/stat.h>
    4 #include <math.h>
     4
     5// C headers
     6#include <cmath>
     7
     8// C++ headers
     9#include <iostream>
    510using namespace std;
    611
     12// MythTV headers
     13#include <mythtv/compat.h>
     14#include <mythtv/util.h>
     15
     16// MythMusic headers
    717#include "metaiooggvorbiscomment.h"
    818#include "metaiovorbiscomment.h"
    919#include "metadata.h"
    1020#include "vcedit.h"
    1121#include <vorbis/vorbisfile.h>
     22#include <qfileinfo.h>
    1223
    13 
    1424//==========================================================================
    1525MetaIOOggVorbisComment::MetaIOOggVorbisComment(void)
    1626    : MetaIO(".ogg")
     
    186196   
    187197    if (!p_input)
    188198        return false;
    189    
    190     // This may not be the neatest way to create a temporary file....
    191     QString newfilename = mdata->Filename() + ".XXXXXX";
    192     char* tmp = new char[newfilename.length()+1];
    193     strncpy(tmp, newfilename, newfilename.length());
    194     tmp[newfilename.length()] = '\0';
    195    
    196     int fd = mkstemp(tmp);
    197     if (fd < 1)
    198     {
    199         delete[] tmp;
    200         fclose(p_input);
    201         return false;
    202     }
    203    
    204     // We need a FILE* not a file descriptor....
    205     FILE* p_output = fdopen(fd, "wb");
    206     newfilename = tmp;
    207199
     200    QString newfilename = createTempFile(
     201        mdata->Filename().local8Bit() + ".XXXXXX");
     202
     203    FILE *p_output = fopen(newfilename, "wb");
     204
    208205    if (!p_output)
    209206    {
    210207        fclose(p_input);
  • settings.pro

     
    88
    99LIBS *= -L$${PREFIX}/lib
    1010
     11isEmpty(TARGET_OS) : win32 {
     12    CONFIG += mingw
     13    LIBS += -L/bin -lmyth-0.20 -lmythui-0.20 -lmythtv-0.20
     14    LIBS += -lmythavformat-0.20 -lmythavcodec-0.20 -lmythavutil-0.20
     15}
     16
    1117DEFINES += _GNU_SOURCE
    1218DEFINES += PREFIX=\"$${PREFIX}\"
    1319
  • mythgallery/mythgallery/qtiffio.cpp

     
    1717//
    1818
    1919#include <stdio.h>
     20#ifndef CONFIG_MINGW
    2021#include <sys/mman.h>
     22#else
     23#define MAP_FAILED -1
     24#endif
    2125
    2226#include <tiffio.h>
    2327#include <qimage.h>