Changeset 846 for trunk/src/multimedia


Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
61 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/multimedia/audio/audio.pri

    r769 r846  
    4343
    4444} else:symbian {
    45     INCLUDEPATH += /epoc32/include/mmf/common
    46     INCLUDEPATH += /epoc32/include/mmf/server
     45    INCLUDEPATH += epoc32/include/mmf/common
     46    INCLUDEPATH += epoc32/include/mmf/server
    4747
    4848    HEADERS += $$PWD/qaudio_symbian_p.h \
  • trunk/src/multimedia/audio/qaudio.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudio.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudio_mac.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    6969    audioFormat.setSampleSize(sf.mBitsPerChannel);
    7070    audioFormat.setCodec(QString::fromLatin1("audio/pcm"));
    71     audioFormat.setByteOrder(sf.mFormatFlags & kLinearPCMFormatFlagIsBigEndian != 0 ? QAudioFormat::BigEndian : QAudioFormat::LittleEndian);
     71    audioFormat.setByteOrder( != 0 ? QAudioFormat::BigEndian : QAudioFormat::LittleEndian);
    7272    QAudioFormat::SampleType type = QAudioFormat::UnSignedInt;
    73     if ((sf.mFormatFlags & kLinearPCMFormatFlagIsSignedInteger) != 0)
     73    if ((sf.mFormatFlags & kFormatFlagIsSignedInteger) != 0)
    7474        type = QAudioFormat::SignedInt;
    75     else if ((sf.mFormatFlags & kLinearPCMFormatFlagIsFloat) != 0)
     75    else if ((sf.mFormatFlags & kFormatFlagIsFloat) != 0)
    7676        type = QAudioFormat::Float;
    7777    audioFormat.setSampleType(type);
     
    9999    case QAudioFormat::Unknown:  default: break;
    100100    }
     101
     102
     103
    101104
    102105    return sf;
  • trunk/src/multimedia/audio/qaudio_mac_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudio_symbian_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    314314    case IdleState:
    315315        return QAudio::IdleState;
    316     case SuspendedState:
     316    case SuspendedPausedState:
     317    case SuspendedStoppedState:
    317318        return QAudio::SuspendedState;
    318319    default:
     
    433434int DevSoundWrapper::samplesProcessed() const
    434435{
    435     Q_ASSERT(StateInitialized == m_state);
    436436    int result = 0;
    437     switch (m_mode) {
    438     case QAudio::AudioInput:
    439         result = m_devsound->SamplesRecorded();
    440         break;
    441     case QAudio::AudioOutput:
    442         result = m_devsound->SamplesPlayed();
    443         break;
     437    if (StateInitialized == m_state) {
     438        switch (m_mode) {
     439        case QAudio::AudioInput:
     440            result = m_devsound->SamplesRecorded();
     441            break;
     442        case QAudio::AudioOutput:
     443            result = m_devsound->SamplesPlayed();
     444            break;
     445        }
    444446    }
    445447    return result;
     
    476478}
    477479
    478 void DevSoundWrapper::pause()
    479 {
    480     Q_ASSERT(StateInitialized == m_state);
    481     m_devsound->Pause();
     480bool DevSoundWrapper::pause()
     481{
     482    Q_ASSERT(StateInitialized == m_state);
     483    const bool canPause = isResumeSupported();
     484    if (canPause)
     485        m_devsound->Pause();
     486    else
     487        stop();
     488    return canPause;
     489}
     490
     491void DevSoundWrapper::resume()
     492{
     493    Q_ASSERT(StateInitialized == m_state);
     494    Q_ASSERT(isResumeSupported());
     495    // TODO: QTBUG-13625
    482496}
    483497
     
    558572}
    559573
     574
     575
     576
     577
     578
     579
    560580void DevSoundWrapper::InitializeComplete(TInt aError)
    561581{
  • trunk/src/multimedia/audio/qaudio_symbian_p.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    8282    ,   ActiveState
    8383    ,   IdleState
    84     ,   SuspendedState
     84    // QAudio is suspended; DevSound is paused
     85    ,   SuspendedPausedState
     86    // QAudio is suspended; DevSound is stopped
     87    ,   SuspendedStoppedState
    8588};
    8689
     
    118121    bool setFormat(const QAudioFormat &format);
    119122    bool start();
    120     void pause();
     123
     124    // If DevSound implementation supports pause, calls pause and returns true.
     125    // Otherwise calls stop and returns false.  In this case, all DevSound buffers
     126    // currently held by the backend must be discarded.
     127    bool pause();
     128
     129    void resume();
     130
    121131    void stop();
    122132    void bufferProcessed();
     
    141151    void getSupportedCodecs();
    142152    void populateCapabilities();
     153
    143154
    144155private:
  • trunk/src/multimedia/audio/qaudiodevicefactory.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    6868QT_BEGIN_NAMESPACE
    6969
     70
     71
    7072Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
    7173        (QAudioEngineFactoryInterface_iid, QLatin1String("/audio"), Qt::CaseInsensitive))
    72 
     74#endif
    7375
    7476class QNullDeviceInfo : public QAbstractAudioDeviceInfo
     
    138140#endif
    139141#endif
     142
    140143    QFactoryLoader* l = loader();
    141144
     
    149152        delete plugin;
    150153    }
    151 
     154#endif
    152155    return devices;
    153156}
     
    155158QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
    156159{
     160
    157161    QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
    158162
     
    162166            return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioInput);
    163167    }
     168
     169
    164170#ifndef QT_NO_AUDIO_BACKEND
    165171#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN))
     
    172178QAudioDeviceInfo QAudioDeviceFactory::defaultOutputDevice()
    173179{
     180
    174181    QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
    175182
     
    179186            return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioOutput);
    180187    }
     188
     189
    181190#ifndef QT_NO_AUDIO_BACKEND
    182191#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN))
     
    197206#endif
    198207#endif
     208
    199209    QAudioEngineFactoryInterface* plugin =
    200210        qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(realm));
     
    202212    if (plugin)
    203213        rc = plugin->createDeviceInfo(handle, mode);
    204 
     214#endif
    205215    return rc == 0 ? new QNullDeviceInfo() : rc;
    206216}
     
    226236#endif
    227237#endif
     238
    228239    QAudioEngineFactoryInterface* plugin =
    229240        qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
     
    231242    if (plugin)
    232243        return plugin->createInput(deviceInfo.handle(), format);
    233 
     244#endif
    234245    return new QNullInputDevice();
    235246}
     
    245256#endif
    246257#endif
     258
    247259    QAudioEngineFactoryInterface* plugin =
    248260        qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
     
    250262    if (plugin)
    251263        return plugin->createOutput(deviceInfo.handle(), format);
    252 
     264#endif
    253265    return new QNullOutputDevice();
    254266}
  • trunk/src/multimedia/audio/qaudiodevicefactory_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudiodeviceinfo.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    107107    The values supported by the the device for each of these
    108108    parameters can be fetched with
    109     supportedByteOrders(), supportedChannels(), supportedCodecs(),
    110     supportedFrequencies(), supportedSampleSizes(), and
     109    supportedByteOrders(), supportedChannels(), supportedCodecs(),
     110    supportedes(), supportedSampleSizes(), and
    111111    supportedSampleTypes(). The combinations supported are dependent on the platform,
    112112    audio plugins installed and the audio device capabilities. If you need a specific format, you can check if
     
    320320
    321321/*!
    322     Returns a list of supported frequencies.
     322    Returns a list of supported sample rates.
     323
     324    \since 4.7
     325*/
     326
     327QList<int> QAudioDeviceInfo::supportedSampleRates() const
     328{
     329    return supportedFrequencies();
     330}
     331
     332/*!
     333    \obsolete
     334
     335    Use supportedSampleRates() instead.
    323336*/
    324337
     
    329342
    330343/*!
    331     Returns a list of supported channels.
     344    Returns a list of supported channel counts.
     345
     346    \since 4.7
     347*/
     348
     349QList<int> QAudioDeviceInfo::supportedChannelCounts() const
     350{
     351    return supportedChannels();
     352}
     353
     354/*!
     355    \obsolete
     356
     357    Use supportedChannelCount() instead.
    332358*/
    333359
  • trunk/src/multimedia/audio/qaudiodeviceinfo.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    8585    QStringList supportedCodecs() const;
    8686    QList<int> supportedFrequencies() const;
     87
    8788    QList<int> supportedChannels() const;
     89
    8890    QList<int> supportedSampleSizes() const;
    8991    QList<QAudioFormat::Endian> supportedByteOrders() const;
  • trunk/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    6363    device = QLatin1String(dev);
    6464    this->mode = mode;
     65
     66
     67
     68
    6569}
    6670
     
    256260    snd_pcm_hw_params_set_channels(handle,params,format.channels());
    257261    snd_pcm_hw_params_set_rate(handle,params,format.frequency(),dir);
     262
     263
     264
    258265    switch(format.sampleSize()) {
    259266        case 8:
    260267            if(format.sampleType() == QAudioFormat::SignedInt)
    261                 snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S8);
     268                snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S8);
    262269            else if(format.sampleType() == QAudioFormat::UnSignedInt)
    263                 snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U8);
     270                snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U8);
    264271            break;
    265272        case 16:
    266273            if(format.sampleType() == QAudioFormat::SignedInt) {
    267274                if(format.byteOrder() == QAudioFormat::LittleEndian)
    268                     snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S16_LE);
     275                    snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S16_LE);
    269276                else if(format.byteOrder() == QAudioFormat::BigEndian)
    270                     snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S16_BE);
     277                    snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S16_BE);
    271278            } else if(format.sampleType() == QAudioFormat::UnSignedInt) {
    272279                if(format.byteOrder() == QAudioFormat::LittleEndian)
    273                     snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U16_LE);
     280                    snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U16_LE);
    274281                else if(format.byteOrder() == QAudioFormat::BigEndian)
    275                     snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U16_BE);
     282                    snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U16_BE);
    276283            }
    277284            break;
     
    279286            if(format.sampleType() == QAudioFormat::SignedInt) {
    280287                if(format.byteOrder() == QAudioFormat::LittleEndian)
    281                     snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S32_LE);
     288                    snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S32_LE);
    282289                else if(format.byteOrder() == QAudioFormat::BigEndian)
    283                     snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S32_BE);
     290                    snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_S32_BE);
    284291            } else if(format.sampleType() == QAudioFormat::UnSignedInt) {
    285292                if(format.byteOrder() == QAudioFormat::LittleEndian)
    286                     snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U32_LE);
     293                    snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U32_LE);
    287294                else if(format.byteOrder() == QAudioFormat::BigEndian)
    288                     snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U32_BE);
     295                    snd_pcm_hw_params_set_format(handle,params,SND_PCM_FORMAT_U32_BE);
    289296            }
    290297    }
     
    390397    channelz.append(1);
    391398    channelz.append(2);
     399
     400
     401
     402
     403
    392404    sizez.append(8);
    393405    sizez.append(16);
     
    427439    while (*n != NULL) {
    428440        name = snd_device_name_get_hint(*n, "NAME");
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
     462
     463
     464
     465
     466
     467
     468
     469
     470
     471
     472
     473
     474
     475
     476
     477
     478
     479
     480
     481
     482
     483
     484
     485
     486
     487
     488
     489
     490
     491
     492
     493
     494
     495
     496
     497
     498
     499
     500
     501
     502
     503
     504
     505
     506
     507
     508
     509
     510
     511
     512
     513
     514
     515
     516
     517
     518
    429519        descr = snd_device_name_get_hint(*n, "DESC");
    430520        io = snd_device_name_get_hint(*n, "IOID");
    431         if((name != NULL) && (descr != NULL) && ((io == NULL) || (io == filter))) {
     521        if((name != NULL) && (descr != NULL)) {
    432522            QString deviceName = QLatin1String(name);
    433             QString deviceDescription = QLatin1String(descr);
    434             allDevices.append(deviceName.toLocal8Bit().constData());
    435             if(deviceDescription.contains(QLatin1String("Default Audio Device")))
    436                 devices.append(deviceName.toLocal8Bit().constData());
     523            if (mode == QAudio::AudioOutput) {
     524                if(deviceName.contains(QLatin1String("surround40")))
     525                    surround40 = true;
     526                if(deviceName.contains(QLatin1String("surround51")))
     527                    surround51 = true;
     528                if(deviceName.contains(QLatin1String("surround71")))
     529                    surround71 = true;
     530            }
    437531        }
    438532        if(name != NULL)
     
    445539    }
    446540    snd_device_name_free_hint(hints);
    447 
    448     if(devices.size() > 0) {
    449         devices.append("default");
    450     }
    451 #else
    452     int idx = 0;
    453     char* name;
    454 
    455     while(snd_card_get_name(idx,&name) == 0) {
    456         devices.append(name);
    457         idx++;
    458     }
    459     if (idx > 0)
    460         devices.append("default");
    461 #endif
    462     if (devices.size() == 0 && allDevices.size() > 0)
    463         return allDevices;
    464 
    465     return devices;
    466 }
    467 
    468 QByteArray QAudioDeviceInfoInternal::defaultInputDevice()
    469 {
    470     QList<QByteArray> devices = availableDevices(QAudio::AudioInput);
    471     if(devices.size() == 0)
    472         return QByteArray();
    473 
    474     return devices.first();
    475 }
    476 
    477 QByteArray QAudioDeviceInfoInternal::defaultOutputDevice()
    478 {
    479     QList<QByteArray> devices = availableDevices(QAudio::AudioOutput);
    480     if(devices.size() == 0)
    481         return QByteArray();
    482 
    483     return devices.first();
    484 }
     541}
     542#endif
    485543
    486544QT_END_NAMESPACE
  • trunk/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    9999    void close();
    100100
     101
     102
     103
     104
     105
     106
     107
    101108    QString device;
    102109    QAudio::Mode mode;
  • trunk/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    7979bool QAudioDeviceInfoInternal::isFormatSupported(const QAudioFormat& format) const
    8080{
    81     return format.codec() == QString::fromLatin1("audio/pcm");
     81    QAudioDeviceInfoInternal *self = const_cast<QAudioDeviceInfoInternal*>(this);
     82
     83    return format.isValid()
     84            && format.codec() == QString::fromLatin1("audio/pcm")
     85            && self->frequencyList().contains(format.frequency())
     86            && self->channelsList().contains(format.channels())
     87            && self->sampleSizeList().contains(format.sampleSize());
    8288}
    8389
  • trunk/src/multimedia/audio/qaudiodeviceinfo_mac_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudiodeviceinfo_symbian_p.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    9898    if(mode == QAudio::AudioOutput) {
    9999        nearest.setFrequency(44100);
    100         nearest.setChannels(2);
     100        nearest.setChannel(2);
    101101        nearest.setByteOrder(QAudioFormat::LittleEndian);
    102102        nearest.setSampleType(QAudioFormat::SignedInt);
     
    105105    } else {
    106106        nearest.setFrequency(11025);
    107         nearest.setChannels(1);
     107        nearest.setChannel(1);
    108108        nearest.setByteOrder(QAudioFormat::LittleEndian);
    109109        nearest.setSampleType(QAudioFormat::SignedInt);
     
    197197            }
    198198        }
    199     }
    200     if (!match) failed = true;
     199        if (!match)
     200            failed = true;
     201    }
    201202
    202203    // check frequency
     
    209210            }
    210211        }
     212
     213
    211214    }
    212215
     
    220223            }
    221224        }
     225
     226
    222227    }
    223228
     
    231236            }
    232237        }
     238
     239
    233240    }
    234241
     
    242249            }
    243250        }
     251
     252
    244253    }
    245254
     
    269278            if(waveOutGetDevCaps(i, &woc, sizeof(WAVEOUTCAPS))
    270279                == MMSYSERR_NOERROR) {
    271                 tmp = QString::fromUtf16((const unsigned short*)woc.szPname);
     280                tmp = QString*)woc.szPname);
    272281                if(tmp.compare(device) == 0) {
    273282                    match = true;
     
    289298            if(waveInGetDevCaps(i, &woc, sizeof(WAVEINCAPS))
    290299                == MMSYSERR_NOERROR) {
    291                 tmp = QString::fromUtf16((const unsigned short*)woc.szPname);
     300                tmp = QString*)woc.szPname);
    292301                if(tmp.compare(device) == 0) {
    293302                    match = true;
     
    375384        channelz.append(1);
    376385        channelz.append(2);
     386
     387
     388
     389
     390
    377391
    378392        byteOrderz.append(QAudioFormat::LittleEndian);
     
    400414            if(waveOutGetDevCaps(i, &woc, sizeof(WAVEOUTCAPS))
    401415                == MMSYSERR_NOERROR) {
    402                 devices.append(QString::fromUtf16((const unsigned short*)woc.szPname).toLocal8Bit().constData());
     416                devices.append(QString*)woc.szPname).toLocal8Bit().constData());
    403417            }
    404418        }
     
    410424            if(waveInGetDevCaps(i, &woc, sizeof(WAVEINCAPS))
    411425                == MMSYSERR_NOERROR) {
    412                 devices.append(QString::fromUtf16((const unsigned short*)woc.szPname).toLocal8Bit().constData());
     426                devices.append(QString*)woc.szPname).toLocal8Bit().constData());
    413427            }
    414428        }
  • trunk/src/multimedia/audio/qaudiodeviceinfo_win32_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudioengine.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    134134    creates an internal QIODevice. Returns a pointer to the QIODevice being used to handle
    135135    the data transfer. This QIODevice can be used to write() audio data directly. Passing a
    136     QIODevice allows the data to be transfered without any extra code.
     136    QIODevice allows the data to be transfered without any extra code.
    137137*/
    138138
     
    248248    then the class creates an internal QIODevice. Returns a pointer to the
    249249    QIODevice being used to handle the data transfer. This QIODevice can be used to
    250     read() audio data directly. Passing a QIODevice allows the data to be transfered
     250    read() audio data directly. Passing a QIODevice allows the data to be transfered
    251251    without any extra code.
    252252*/
  • trunk/src/multimedia/audio/qaudioengine.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudioengineplugin.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudioengineplugin.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudioformat.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    112112            \o Description
    113113        \row
    114             \o Frequency
     114            \o
    115115            \o Samples per second of audio data in Hertz.
    116116        \row
     
    144144    Values are initialized as follows:
    145145    \list
    146     \o frequency()  = -1
    147     \o channels()  = -1
     146    \o ()  = -1
     147    \o channel = -1
    148148    \o sampleSize() = -1
    149149    \o byteOrder()  = QAudioFormat::Endian(QSysInfo::ByteOrder)
     
    225225
    226226/*!
    227    Sets the frequency to \a frequency.
     227   Sets the sample rate to \a samplerate Hertz.
     228
     229   \since 4.7
     230*/
     231
     232void QAudioFormat::setSampleRate(int samplerate)
     233{
     234    d->frequency = samplerate;
     235}
     236
     237/*!
     238   \obsolete
     239
     240   Use setSampleRate() instead.
    228241*/
    229242
     
    234247
    235248/*!
    236     Returns the current frequency value.
     249    Returns the current sample rate in Hertz.
     250
     251    \since 4.7
     252*/
     253
     254int QAudioFormat::sampleRate() const
     255{
     256    return d->frequency;
     257}
     258
     259/*!
     260   \obsolete
     261
     262   Use sampleRate() instead.
    237263*/
    238264
     
    243269
    244270/*!
    245    Sets the channels to \a channels.
     271   Sets the channel count to \a channels.
     272
     273   \since 4.7
     274*/
     275
     276void QAudioFormat::setChannelCount(int channels)
     277{
     278    d->channels = channels;
     279}
     280
     281/*!
     282   \obsolete
     283
     284   Use setChannelCount() instead.
    246285*/
    247286
     
    252291
    253292/*!
    254     Returns the current channel value.
     293    Returns the current channel count value.
     294
     295    \since 4.7
     296*/
     297
     298int QAudioFormat::channelCount() const
     299{
     300    return d->channels;
     301}
     302
     303/*!
     304    \obsolete
     305
     306    Use channelCount() instead.
    255307*/
    256308
  • trunk/src/multimedia/audio/qaudioformat.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    7676    void setFrequency(int frequency);
    7777    int frequency() const;
     78
     79
    7880
    7981    void setChannels(int channels);
    8082    int channels() const;
     83
     84
    8185
    8286    void setSampleSize(int sampleSize);
  • trunk/src/multimedia/audio/qaudioinput.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    202202/*!
    203203     Uses the \a device as the QIODevice to transfer data.
    204      Passing a QIODevice allows the data to be transfered without any extra code.
     204     Passing a QIODevice allows the data to be transfered without any extra code.
    205205     All that is required is to open the QIODevice.
    206206
     
    212212     state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
    213213
    214     In either case, the stateChanged() signal may be emitted either synchronously
    215     during execution of the start() function or asynchronously after start() has
    216     returned to the caller.
    217 
    218      \sa {Symbian Platform Security Requirements}
     214     \l{QAudioInput#Symbian Platform Security Requirements}
    219215
    220216     \sa QIODevice
     
    238234    state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
    239235
    240     In either case, the stateChanged() signal may be emitted either synchronously
    241     during execution of the start() function or asynchronously after start() has
    242     returned to the caller.
    243 
    244     \sa {Symbian Platform Security Requirements}
     236    \l{QAudioInput#Symbian Platform Security Requirements}
    245237
    246238    \sa QIODevice
     
    287279    Sets error() to QAudio::NoError, state() to QAudio::SuspendedState and
    288280    emit stateChanged() signal.
    289 
    290     Note: signal will always be emitted during execution of the resume() function.
    291281*/
    292282
     
    311301
    312302/*!
    313     Sets the audio buffer size to \a value bytes.
     303    Sets the audio buffer size to \a value s.
    314304
    315305    Note: This function can be called anytime before start(), calls to this
     
    326316
    327317/*!
    328     Returns the audio buffer size in bytes.
     318    Returns the audio buffer size in s.
    329319
    330320    If called before start(), returns platform default value.
  • trunk/src/multimedia/audio/qaudioinput.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudioinput_alsa_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    121121            reset = true;
    122122        else {
    123             bytesAvailable = bytesReady();
     123            bytesAvailable = ytesReady();
    124124            if (bytesAvailable <= 0)
    125125                reset = true;
     
    153153int QAudioInputPrivate::setFormat()
    154154{
    155     snd_pcm_format_t format = SND_PCM_FORMAT_S16;
     155    snd_pcm_format_t format = SND_PCM_FORMAT_;
    156156
    157157    if(settings.sampleSize() == 8) {
     
    205205    }
    206206
    207     return snd_pcm_hw_params_set_format( handle, hwparams, format);
     207    return format != SND_PCM_FORMAT_UNKNOWN
     208            ? snd_pcm_hw_params_set_format( handle, hwparams, format)
     209            : -1;
    208210}
    209211
     
    260262
    261263    int dir;
    262     int err=-1;
     264    int err;
    263265    int count=0;
    264266    unsigned int freakuency=settings.frequency();
     267
     268
     269
     270
     271
     272
     273
     274
     275
     276
     277
     278
     279
     280
     281
     282
    265283
    266284    QString dev = QString(QLatin1String(m_device.constData()));
     
    409427
    410428    // Step 5: Setup timer
    411     bytesAvailable = bytesReady();
     429    bytesAvailable = ytesReady();
    412430
    413431    if(pullMode)
     
    438456}
    439457
     458
     459
     460
     461
     462
     463
     464
     465
     466
     467
     468
     469
     470
     471
     472
     473
     474
     475
     476
     477
    440478int QAudioInputPrivate::bytesReady() const
    441479{
    442     if(resuming)
    443         return period_size;
    444 
    445     if(deviceState != QAudio::ActiveState && deviceState != QAudio::IdleState)
    446         return 0;
    447     int frames = snd_pcm_avail_update(handle);
    448     if (frames < 0) return frames;
    449     if((int)frames > (int)buffer_frames)
    450         frames = buffer_frames;
    451 
    452     return snd_pcm_frames_to_bytes(handle, frames);
     480    return qMax(bytesAvailable, 0);
    453481}
    454482
    455483qint64 QAudioInputPrivate::read(char* data, qint64 len)
    456484{
    457     Q_UNUSED(len)
    458 
    459485    // Read in some audio data and write it to QIODevice, pull mode
    460486    if ( !handle )
    461487        return 0;
    462488
    463     bytesAvailable = bytesReady();
    464 
    465     if (bytesAvailable < 0) {
     489    // bytesAvaiable is saved as a side effect of checkBytesReady().
     490    int bytesToRead = checkBytesReady();
     491
     492    if (bytesToRead < 0) {
    466493        // bytesAvailable as negative is error code, try to recover from it.
    467         xrun_recovery(bytesAvailable);
    468         bytesAvailable = bytesReady();
    469         if (bytesAvailable < 0) {
     494        xrun_recovery(bytes);
     495        bytesytesReady();
     496        if (bytes < 0) {
    470497            // recovery failed must stop and set error.
    471498            close();
     
    477504    }
    478505
     506
     507
    479508    int count=0, err = 0;
    480509    while(count < 5) {
    481         int chunks = bytesAvailable/period_size;
     510        int chunks = bytes/period_size;
    482511        int frames = chunks*period_frames;
    483512        if(frames > (int)buffer_frames)
     
    527556                }
    528557            } else {
     558
    529559                totalTimeValue += err;
    530560                resuming = false;
     
    539569        } else {
    540570            memcpy(data,audioBuffer,err);
     571
    541572            totalTimeValue += err;
    542573            resuming = false;
     
    634665    if(pullMode) {
    635666        // reads some audio data and writes it to QIODevice
    636         read(0,0);
     667        read(0,);
    637668    } else {
    638669        // emits readyRead() so user will call read() on QIODevice to get some audio data
     
    640671        a->trigger();
    641672    }
    642     bytesAvailable = bytesReady();
     673    bytesAvailable = ytesReady();
    643674
    644675    if(deviceState != QAudio::ActiveState)
    645676        return true;
     677
     678
     679
     680
     681
     682
     683
     684
     685
     686
     687
     688
     689
     690
    646691
    647692    if(intervalTime && (timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) {
  • trunk/src/multimedia/audio/qaudioinput_alsa_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    6262#include <QtCore/qstring.h>
    6363#include <QtCore/qstringlist.h>
     64
    6465#include <QtCore/qdatetime.h>
    6566
     
    110111
    111112private:
     113
    112114    int xrun_recovery(int err);
    113115    int setFormat();
     
    117119
    118120    QTimer* timer;
    119     QTime timeStamp;
    120     QTime clockStamp;
     121    Q timeStamp;
     122    Q clockStamp;
    121123    qint64 elapsedTimeOffset;
    122124    int intervalTime;
  • trunk/src/multimedia/audio/qaudioinput_mac_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    211211    }
    212212
     213
     214
     215
     216
     217
    213218private:
    214219    UInt32 totalPackets;
     
    260265                             UInt32 inNumberFrames)
    261266    {
    262         const bool  wasEmpty = m_buffer->used() == 0;
     267        const bool  == 0;
    263268
    264269        OSStatus    err;
     
    276281            QAudioPacketFeeder  feeder(m_inputBufferList);
    277282
    278             bool    wecan = true;
    279283            int     copied = 0;
    280 
    281284            const int available = m_buffer->free();
    282285
    283             while (err == noErr && wecan) {
     286            while (err == noErr && ) {
    284287                QAudioRingBuffer::Region region = m_buffer->acquireWriteRegion(available);
    285288
    286                 if (region.second > 0) {
    287                     AudioBufferList     output;
    288                     output.mNumberBuffers = 1;
    289                     output.mBuffers[0].mNumberChannels = 1;
    290                     output.mBuffers[0].mDataByteSize = region.second;
    291                     output.mBuffers[0].mData = region.first;
    292 
    293                     UInt32  packetSize = region.second / m_outputFormat.mBytesPerPacket;
    294                     err = AudioConverterFillComplexBuffer(m_audioConverter,
    295                                                           converterCallback,
    296                                                           &feeder,
    297                                                           &packetSize,
    298                                                           &output,
    299                                                           0);
    300 
    301                     region.second = output.mBuffers[0].mDataByteSize;
    302                     copied += region.second;
    303 
    304                     m_buffer->releaseWriteRegion(region);
    305                 }
    306                 else
    307                     wecan = false;
     289                if (region.second == 0)
     290                    break;
     291
     292                AudioBufferList     output;
     293                output.mNumberBuffers = 1;
     294                output.mBuffers[0].mNumberChannels = 1;
     295                output.mBuffers[0].mDataByteSize = region.second;
     296                output.mBuffers[0].mData = region.first;
     297
     298                UInt32  packetSize = region.second / m_outputFormat.mBytesPerPacket;
     299                err = AudioConverterFillComplexBuffer(m_audioConverter,
     300                                                      converterCallback,
     301                                                      &feeder,
     302                                                      &packetSize,
     303                                                      &output,
     304                                                      0);
     305                region.second = output.mBuffers[0].mDataByteSize;
     306                copied += region.second;
     307
     308                m_buffer->releaseWriteRegion(region);
    308309            }
    309310
     
    331332        }
    332333
    333         if (wasEmpty && framesRendered > 0)
     334        if ( && framesRendered > 0)
    334335            emit readyRead();
    335336
     
    717718    QIODevice*  op = device;
    718719
    719     if (!audioFormat.isValid() || !open()) {
     720    if (!audio) || !open()) {
    720721        stateCode = QAudio::StoppedState;
    721722        errorCode = QAudio::OpenError;
  • trunk/src/multimedia/audio/qaudioinput_mac_p.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudioinput_symbian_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    175175        m_notifyTimer->stop();
    176176        m_pullTimer->stop();
    177         m_devSound->pause();
    178177        const qint64 samplesRecorded = getSamplesRecorded();
    179178        m_totalSamplesRecorded += samplesRecorded;
    180179
    181         if (m_devSoundBuffer) {
    182             m_devSoundBufferQ.append(m_devSoundBuffer);
     180        const bool paused = m_devSound->pause();
     181        if (paused) {
     182            if (m_devSoundBuffer)
     183                m_devSoundBufferQ.append(m_devSoundBuffer);
    183184            m_devSoundBuffer = 0;
     185
     186
     187
     188
     189
     190
    184191        }
    185 
    186         setState(SymbianAudio::SuspendedState);
    187192    }
    188193}
     
    190195void QAudioInputPrivate::resume()
    191196{
    192     if (SymbianAudio::SuspendedState == m_internalState) {
    193         if (!m_pullMode && !bytesReady())
     197    if (QAudio::SuspendedState == m_externalState) {
     198        if (SymbianAudio::SuspendedPausedState == m_internalState)
     199            m_devSound->resume();
     200        else
    194201            m_devSound->start();
    195202        startDataTransfer();
     
    247254{
    248255    int samplesPlayed = 0;
    249     if (m_devSound && SymbianAudio::SuspendedState != m_internalState)
     256    if (m_devSound && ternalState)
    250257        samplesPlayed = getSamplesRecorded();
    251258
     
    336343            pushData();
    337344    } else {
    338         if (SymbianAudio::SuspendedState == m_internalState)
     345        if (ternalState)
    339346            setState(SymbianAudio::ActiveState);
    340347        else
     
    374381        TDesC8 &inputBuffer = buffer->Data();
    375382
    376         const qint64 inputBytes = bytesReady();
     383        Q_ASSERT(inputBuffer.Length() >= m_devSoundBufferPos);
     384        const qint64 inputBytes = inputBuffer.Length() - m_devSoundBufferPos;
    377385        const qint64 outputBytes = len - bytesRead;
    378386        const qint64 copyBytes = outputBytes < inputBytes ?
     
    385393        bytesRead += copyBytes;
    386394
    387         if (!bytesReady())
     395        if ()
    388396            bufferEmptied();
    389397    }
     
    404412        TDesC8 &inputBuffer = buffer->Data();
    405413
    406         const qint64 inputBytes = bytesReady();
     414        Q_ASSERT(inputBuffer.Length() >= m_devSoundBufferPos);
     415        const qint64 inputBytes = inputBuffer.Length() - m_devSoundBufferPos;
    407416        const qint64 bytesPushed = m_sink->write(
    408417            (char*)inputBuffer.Ptr() + m_devSoundBufferPos, inputBytes);
     
    410419        m_devSoundBufferPos += bytesPushed;
    411420
    412         if (!bytesReady())
     421        if ()
    413422            bufferEmptied();
    414423
     
    442451    m_totalBytesReady += buffer->Data().Length();
    443452
    444     if (SymbianAudio::SuspendedState == m_internalState) {
     453    if (SymbianAudio::SuspendedState == m_internalState) {
    445454        m_devSoundBufferQ.append(buffer);
    446455    } else {
  • trunk/src/multimedia/audio/qaudioinput_symbian_p.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudioinput_win32_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    8080}
    8181
    82 void CALLBACK QAudioInputPrivate::waveInProc( HWAVEIN hWaveIn, UINT uMsg,
     82void CALLBACK QAudioInputPrivate::waveInProc( HWAVEIN hWaveIn, UINT uMsg,
    8383        DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 )
    8484{
     
    149149    for(int i = 0; i < count; i++) {
    150150        waveInUnprepareHeader(hWaveIn,blocks, sizeof(WAVEHDR));
    151         blocks+=sizeof(WAVEHDR);
     151        blocks+;
    152152    }
    153153    HeapFree(GetProcessHeap(), 0, blockArray);
     
    215215#endif
    216216    header = 0;
    217     if(buffer_size == 0) {
    218         // Default buffer size, 200ms, default period size is 40ms
    219         buffer_size = settings.frequency()*settings.channels()*(settings.sampleSize()/8)*0.2;
    220         period_size = buffer_size/5;
     217    period_size = 0;
     218
     219    if (!settings.isValid()) {
     220        qWarning("QAudioInput: open error, invalid format.");
     221    } else if (settings.channels() <= 0) {
     222        qWarning("QAudioInput: open error, invalid number of channels (%d).",
     223                 settings.channels());
     224    } else if (settings.sampleSize() <= 0) {
     225        qWarning("QAudioInput: open error, invalid sample size (%d).",
     226                 settings.sampleSize());
     227    } else if (settings.frequency() < 8000 || settings.frequency() > 48000) {
     228        qWarning("QAudioInput: open error, frequency out of range (%d).", settings.frequency());
     229    } else if (buffer_size == 0) {
     230
     231        buffer_size
     232                = (settings.frequency()
     233                * settings.channels()
     234                * settings.sampleSize()
     235#ifndef Q_OS_WINCE  // Default buffer size, 200ms, default period size is 40ms
     236                + 39) / 40;
     237        period_size = buffer_size / 5;
    221238    } else {
    222         period_size = buffer_size/5;
    223     }
     239        period_size = buffer_size / 5;
     240#else               // For wince reduce size to 40ms for buffer size and 20ms period
     241                + 199) / 200;
     242        period_size = buffer_size / 2;
     243    } else {
     244        period_size = buffer_size / 2;
     245#endif
     246    }
     247
     248    if (period_size == 0) {
     249        errorState = QAudio::OpenError;
     250        deviceState = QAudio::StoppedState;
     251        emit stateChanged(deviceState);
     252        return false;
     253    }
     254
    224255    timeStamp.restart();
    225256    elapsedTimeOffset = 0;
     
    242273            == MMSYSERR_NOERROR) {
    243274            QString tmp;
    244             tmp = QString::fromUtf16((const unsigned short*)wic.szPname);
     275            tmp = QString*)wic.szPname);
    245276            if(tmp.compare(QLatin1String(m_device)) == 0) {
    246277                devId = ii;
     
    370401                }
    371402            } else {
     403
    372404                // push mode
    373                 memcpy(p,waveBlocks[header].lpData,waveBlocks[header].dwBytesRecorded);
    374                 l = waveBlocks[header].dwBytesRecorded;
     405                memcpy(p, waveBlocks[header].lpData, l);
     406
     407                len -= l;
     408
    375409#ifdef DEBUG_AUDIO
    376410                qDebug()<<"IN: "<<waveBlocks[header].dwBytesRecorded<<", OUT: "<<l;
     
    427461        mutex.lock();
    428462        if(!pullMode) {
    429             if(l+period_size > len && waveFreeBlockCount == buffer_size/period_size)
     463 waveFreeBlockCount == buffer_size/period_size)
    430464                done = true;
    431465        } else {
     
    538572    if(pullMode) {
    539573        // reads some audio data and writes it to QIODevice
    540         read(0,0);
     574        read(0,);
    541575    } else {
    542576        // emits readyRead() so user will call read() on QIODevice to get some audio data
  • trunk/src/multimedia/audio/qaudioinput_win32_p.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    125125
    126126    QMutex mutex;
    127 
    128     static void CALLBACK waveInProc( HWAVEIN hWaveIn, UINT uMsg,
     127    static void QT_WIN_CALLBACK waveInProc( HWAVEIN hWaveIn, UINT uMsg,
    129128            DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 );
    130129
  • trunk/src/multimedia/audio/qaudiooutput.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    200200/*!
    201201    Uses the \a device as the QIODevice to transfer data.
    202     Passing a QIODevice allows the data to be transfered without any extra code.
     202    Passing a QIODevice allows the data to be transfered without any extra code.
    203203    All that is required is to open the QIODevice.
    204204
  • trunk/src/multimedia/audio/qaudiooutput.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudiooutput_alsa_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    156156int QAudioOutputPrivate::setFormat()
    157157{
    158     snd_pcm_format_t pcmformat = SND_PCM_FORMAT_S16;
     158    snd_pcm_format_t pcmformat = SND_PCM_FORMAT_;
    159159
    160160    if(settings.sampleSize() == 8) {
     
    209209    }
    210210
    211     return snd_pcm_hw_params_set_format( handle, hwparams, pcmformat);
     211    return pcmformat != SND_PCM_FORMAT_UNKNOWN
     212            ? snd_pcm_hw_params_set_format( handle, hwparams, pcmformat)
     213            : -1;
    212214}
    213215
     
    276278
    277279    int dir;
    278     int err=-1;
     280    int err;
    279281    int count=0;
    280282    unsigned int freakuency=settings.frequency();
     283
     284
     285
     286
     287
     288
     289
     290
     291
     292
     293
     294
     295
     296
     297
    281298
    282299    QString dev = QString(QLatin1String(m_device.constData()));
  • trunk/src/multimedia/audio/qaudiooutput_alsa_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    6161#include <QtCore/qstring.h>
    6262#include <QtCore/qstringlist.h>
     63
    6364#include <QtCore/qdatetime.h>
    6465
     
    134135    QByteArray m_device;
    135136    int bytesAvailable;
    136     QTime timeStamp;
    137     QTime clockStamp;
     137    Q timeStamp;
     138    Q clockStamp;
    138139    qint64 elapsedTimeOffset;
    139140    char* audioBuffer;
  • trunk/src/multimedia/audio/qaudiooutput_mac_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    6161#include <QtCore/qdebug.h>
    6262
    63 #include <QtMultimedia/qaudiodeviceinfo.h>
    6463#include <QtMultimedia/qaudiooutput.h>
    6564
    6665#include "qaudio_mac_p.h"
    6766#include "qaudiooutput_mac_p.h"
     67
    6868
    6969
     
    279279        errorCode = QAudio::OpenError;
    280280    else {
     281
    281282        isOpen = false;
    282283        audioDeviceId = AudioDeviceID(did);
     
    300301QAudioOutputPrivate::~QAudioOutputPrivate()
    301302{
     303
    302304    close();
    303305}
     
    359361    streamFormat = toAudioStreamBasicDescription(audioFormat);
    360362
    361     UInt32 size = sizeof(deviceFormat);
    362     if (AudioUnitGetProperty(audioUnit,
    363                                 kAudioUnitProperty_StreamFormat,
    364                                 kAudioUnitScope_Input,
    365                                 0,
    366                                 &deviceFormat,
    367                                 &size) != noErr) {
    368         qWarning() << "QAudioOutput: Unable to retrieve device format";
    369         return false;
    370     }
    371 
     363    UInt32 size = sizeof(streamFormat);
    372364    if (AudioUnitSetProperty(audioUnit,
    373365                                kAudioUnitProperty_StreamFormat,
     
    393385    }
    394386
    395     periodSizeBytes = (numberOfFrames * streamFormat.mSampleRate / deviceFormat.mSampleRate) *
    396                         streamFormat.mBytesPerFrame;
     387    periodSizeBytes = numberOfFrames * streamFormat.mBytesPerFrame;
    397388    if (internalBufferSize < periodSizeBytes * 2)
    398389        internalBufferSize = periodSizeBytes * 2;
     
    436427    QIODevice*  op = device;
    437428
    438     if (!audioFormat.isValid() || !open()) {
     429    if (!audio) || !open()) {
    439430        stateCode = QAudio::StoppedState;
    440431        errorCode = QAudio::OpenError;
  • trunk/src/multimedia/audio/qaudiooutput_mac_p.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    7474
    7575class QIODevice;
     76
    7677
    7778namespace QtMultimediaInternal
     
    102103    QMutex          mutex;
    103104    QTimer*         intervalTimer;
     105
    104106
    105107    QAudio::Error    errorCode;
  • trunk/src/multimedia/audio/qaudiooutput_symbian_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    181181        m_notifyTimer->stop();
    182182        m_underflowTimer->stop();
    183 
    184183        const qint64 samplesWritten = SymbianAudio::Utils::bytesToSamples(
    185184                                          m_format, m_bytesWritten);
    186 
    187185        const qint64 samplesPlayed = getSamplesPlayed();
    188 
     186        m_totalSamplesPlayed += samplesPlayed;
    189187        m_bytesWritten = 0;
    190 
    191         // CMMFDevSound::Pause() is not guaranteed to work correctly in all
    192         // implementations, for play-mode DevSound sessions.  We therefore
    193         // have to implement suspend() by calling CMMFDevSound::Stop().
    194         // Because this causes buffered data to be dropped, we replace the
    195         // lost data with silence following a call to resume(), in order to
    196         // ensure that processedUSecs() returns the correct value.
    197         m_devSound->stop();
    198         m_totalSamplesPlayed += samplesPlayed;
    199 
    200         // Calculate the amount of data dropped
    201         const qint64 paddingSamples = samplesWritten - samplesPlayed;
    202         Q_ASSERT(paddingSamples >= 0);
    203         m_bytesPadding = SymbianAudio::Utils::samplesToBytes(m_format,
    204                                                              paddingSamples);
    205 
    206         setState(SymbianAudio::SuspendedState);
     188        const bool paused = m_devSound->pause();
     189        if (paused) {
     190            setState(SymbianAudio::SuspendedPausedState);
     191        } else {
     192            m_devSoundBuffer = 0;
     193            // Calculate the amount of data dropped
     194            const qint64 paddingSamples = samplesWritten - samplesPlayed;
     195            Q_ASSERT(paddingSamples >= 0);
     196            m_bytesPadding = SymbianAudio::Utils::samplesToBytes(m_format,
     197                                                                 paddingSamples);
     198            setState(SymbianAudio::SuspendedStoppedState);
     199        }
    207200    }
    208201}
     
    210203void QAudioOutputPrivate::resume()
    211204{
    212     if (SymbianAudio::SuspendedState == m_internalState) {
    213         if (!m_pullMode && m_devSoundBuffer && m_devSoundBuffer->Data().Length())
    214             bufferFilled();
    215         startPlayback();
     205    if (QAudio::SuspendedState == m_externalState) {
     206        if (SymbianAudio::SuspendedPausedState == m_internalState)
     207            m_devSound->resume();
     208        else
     209            startPlayback();
    216210    }
    217211}
     
    271265{
    272266    int samplesPlayed = 0;
    273     if (m_devSound && SymbianAudio::SuspendedState != m_internalState)
     267    if (m_devSound && ternalState)
    274268        samplesPlayed = getSamplesPlayed();
    275269
     
    371365        else
    372366            setState(SymbianAudio::IdleState);
     367
     368
     369
    373370        break;
    374371    default:
  • trunk/src/multimedia/audio/qaudiooutput_symbian_p.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/audio/qaudiooutput_win32_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    5353#include "qaudiooutput_win32_p.h"
    5454
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
     101
    55102//#define DEBUG_AUDIO 1
    56103
     
    147194    for(int i = 0; i < count; i++) {
    148195        waveOutUnprepareHeader(hWaveOut,blocks, sizeof(WAVEHDR));
    149         blocks+=sizeof(WAVEHDR);
     196        blocks+;
    150197    }
    151198    HeapFree(GetProcessHeap(), 0, blockArray);
     
    205252    qDebug()<<now.second()<<"s "<<now.msec()<<"ms :open()";
    206253#endif
    207     if (!(settings.frequency() >= 8000 && settings.frequency() <= 48000)) {
     254
     255    period_size = 0;
     256
     257    if (!settings.isValid()) {
     258        qWarning("QAudioOutput: open error, invalid format.");
     259    } else if (settings.channels() <= 0) {
     260        qWarning("QAudioOutput: open error, invalid number of channels (%d).",
     261                 settings.channels());
     262    } else if (settings.sampleSize() <= 0) {
     263        qWarning("QAudioOutput: open error, invalid sample size (%d).",
     264                 settings.sampleSize());
     265    } else if (settings.frequency() < 8000 || settings.frequency() > 48000) {
     266        qWarning("QAudioOutput: open error, frequency out of range (%d).", settings.frequency());
     267    } else if (buffer_size == 0) {
     268        // Default buffer size, 200ms, default period size is 40ms
     269        buffer_size
     270                = (settings.frequency()
     271                * settings.channels()
     272                * settings.sampleSize()
     273                + 39) / 40;
     274        period_size = buffer_size / 5;
     275    } else {
     276        period_size = buffer_size / 5;
     277    }
     278
     279    if (period_size == 0) {
    208280        errorState = QAudio::OpenError;
    209281        deviceState = QAudio::StoppedState;
    210282        emit stateChanged(deviceState);
    211         qWarning("QAudioOutput: open error, frequency out of range.");
    212283        return false;
    213284    }
    214     if(buffer_size == 0) {
    215         // Default buffer size, 200ms, default period size is 40ms
    216         buffer_size = settings.frequency()*settings.channels()*(settings.sampleSize()/8)*0.2;
    217         period_size = buffer_size/5;
    218     } else {
    219         period_size = buffer_size/5;
    220     }
     285
    221286    waveBlocks = allocateBlocks(period_size, buffer_size/period_size);
    222287
     
    251316            == MMSYSERR_NOERROR) {
    252317            QString tmp;
    253             tmp = QString::fromUtf16((const unsigned short*)woc.szPname);
     318            tmp = QString*)woc.szPname);
    254319            if(tmp.compare(QLatin1String(m_device)) == 0) {
    255320                devId = ii;
     
    259324    }
    260325
    261     if(waveOutOpen(&hWaveOut, devId, &wfx,
    262                 (DWORD_PTR)&waveOutProc,
    263                 (DWORD_PTR) this,
    264                 CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
    265         errorState = QAudio::OpenError;
    266         deviceState = QAudio::StoppedState;
    267         emit stateChanged(deviceState);
    268         qWarning("QAudioOutput: open error");
    269         return false;
     326    if ( settings.channels() <= 2) {
     327        if(waveOutOpen(&hWaveOut, devId, &wfx,
     328                    (DWORD_PTR)&waveOutProc,
     329                    (DWORD_PTR) this,
     330                    CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
     331            errorState = QAudio::OpenError;
     332            deviceState = QAudio::StoppedState;
     333            emit stateChanged(deviceState);
     334            qWarning("QAudioOutput: open error");
     335            return false;
     336        }
     337    } else {
     338        WAVEFORMATEXTENSIBLE wfex;
     339        wfex.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
     340        wfex.Format.nChannels = settings.channels();
     341        wfex.Format.wBitsPerSample = settings.sampleSize();
     342        wfex.Format.nSamplesPerSec = settings.frequency();
     343        wfex.Format.nBlockAlign = wfex.Format.nChannels*wfex.Format.wBitsPerSample/8;
     344        wfex.Format.nAvgBytesPerSec=wfex.Format.nSamplesPerSec*wfex.Format.nBlockAlign;
     345        wfex.Samples.wValidBitsPerSample=wfex.Format.wBitsPerSample;
     346        static const GUID _KSDATAFORMAT_SUBTYPE_PCM = {
     347             0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
     348        wfex.SubFormat=_KSDATAFORMAT_SUBTYPE_PCM;
     349        wfex.Format.cbSize=22;
     350
     351        wfex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
     352        if (settings.channels() >= 4)
     353            wfex.dwChannelMask |= SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT;
     354        if (settings.channels() >= 6)
     355            wfex.dwChannelMask |= SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY;
     356        if (settings.channels() == 8)
     357            wfex.dwChannelMask |= SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT;
     358
     359        if(waveOutOpen(&hWaveOut, devId, &wfex.Format,
     360                    (DWORD_PTR)&waveOutProc,
     361                    (DWORD_PTR) this,
     362                    CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
     363            errorState = QAudio::OpenError;
     364            deviceState = QAudio::StoppedState;
     365            emit stateChanged(deviceState);
     366            qWarning("QAudioOutput: open error");
     367            return false;
     368        }
    270369    }
    271370
     
    488587            }
    489588            if ( out < l) {
    490                 // Didnt write all data
     589                // Didnt write all data
    491590                audioSource->seek(audioSource->pos()-(l-out));
    492591            }
  • trunk/src/multimedia/audio/qaudiooutput_win32_p.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    118118    bool pullMode;
    119119    int intervalTime;
    120     static void CALLBACK waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
     120    static void CALLBACK waveOutProc( HWAVEOUT hWaveOut, UINT uMsg,
    121121            DWORD dwInstance, DWORD dwParam1, DWORD dwParam2 );
    122122
  • trunk/src/multimedia/multimedia.pro

    r561 r846  
    1212include(video/video.pri)
    1313
    14 symbian: TARGET.UID3 = 0x2001E627
     14symbian: {
     15    TARGET.UID3 = 0x2001E627
     16}
  • trunk/src/multimedia/video/qabstractvideobuffer.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    7272    \value NoHandle The buffer has no handle, its data can only be accessed by mapping the buffer.
    7373    \value GLTextureHandle The handle of the buffer is an OpenGL texture ID.
     74
     75
     76
    7477    \value UserHandle Start value for user defined handle types.
    7578
     
    8588    \value ReadOnly The mapped memory is populated with data from the video buffer when mapped, but
    8689    the content of the mapped memory may be discarded when unmapped.
    87     \value WriteOnly The mapped memory in unitialized when mapped, and the content will be used to
     90    \value WriteOnly The mapped memory initialized when mapped, and the content will be used to
    8891    populate the video buffer when unmapped.
    8992    \value ReadWrite The mapped memory is populated with data from the video buffer, and the
  • trunk/src/multimedia/video/qabstractvideobuffer.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    6262        NoHandle,
    6363        GLTextureHandle,
     64
     65
     66
    6467        UserHandle = 1000
    6568    };
  • trunk/src/multimedia/video/qabstractvideobuffer_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    6666    {}
    6767
     68
     69
     70
    6871    QAbstractVideoBuffer::HandleType handleType;
    6972};
  • trunk/src/multimedia/video/qabstractvideosurface.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/video/qabstractvideosurface.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/video/qabstractvideosurface_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/video/qimagevideobuffer.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/video/qimagevideobuffer_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/video/qmemoryvideobuffer.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/video/qmemoryvideobuffer_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
  • trunk/src/multimedia/video/qvideoframe.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (