Recherche avancée

Médias (91)

Autres articles (49)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (5444)

  • avcodec/avpacket : add av_packet_make_refcounted()

    24 mars 2018, par James Almer
    avcodec/avpacket : add av_packet_make_refcounted()
    

    It works as a drop in replacement for the deprecated av_dup_packet(),
    to ensure a packet is reference counted.

    Reviewed-by : Michael Niedermayer <michael@niedermayer.cc>
    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] doc/APIchanges
    • [DH] libavcodec/avcodec.h
    • [DH] libavcodec/avpacket.c
    • [DH] libavcodec/version.h
  • Revision 29926 : On branche spip_piwik

    17 juillet 2009, par kent1@… — Log

    On branche spip_piwik

  • Does the Remote I/O audio unit set the number of channels in the buffer ?

    25 novembre 2013, par awfulcode

    I'm using kxmovie (it's a ffmpeg-based video player) as a base for an app and I'm trying to figure out how the RemoteI/O unit works on iOS when the only thing connected to a device is headphones and we're playing a track with more than 2 channels (say a surround 6 track channel). It seems like it is going with the output channel setting and the buffer only has 2 channels. Is this because of Core Audio's pull structure ? And if so, what's happening to the other channels in the track ? Are they being downmixed or simply ignored ?

    The code for the render callback connected to the remoteio unit is here :

    - (BOOL) renderFrames: (UInt32) numFrames
                  ioData: (AudioBufferList *) ioData
    {
       NSLog(@"Number of channels in buffer: %lu",ioData->mNumberBuffers);

       for (int iBuffer=0; iBuffer &lt; ioData->mNumberBuffers; ++iBuffer) {
           memset(ioData->mBuffers[iBuffer].mData, 0, ioData->mBuffers[iBuffer].mDataByteSize);
       }


       if (_playing &amp;&amp; _outputBlock ) {

           // Collect data to render from the callbacks
           _outputBlock(_outData, numFrames, _numOutputChannels);

           // Put the rendered data into the output buffer
           if (_numBytesPerSample == 4) // then we&#39;ve already got floats
           {
               float zero = 0.0;

               for (int iBuffer=0; iBuffer &lt; ioData->mNumberBuffers; ++iBuffer) {

                   int thisNumChannels = ioData->mBuffers[iBuffer].mNumberChannels;

                   for (int iChannel = 0; iChannel &lt; thisNumChannels; ++iChannel) {
                       vDSP_vsadd(_outData+iChannel, _numOutputChannels, &amp;zero, (float *)ioData->mBuffers[iBuffer].mData, thisNumChannels, numFrames);
                   }
               }
           }
           else if (_numBytesPerSample == 2) // then we need to convert SInt16 -> Float (and also scale)
           {
               float scale = (float)INT16_MAX;
               vDSP_vsmul(_outData, 1, &amp;scale, _outData, 1, numFrames*_numOutputChannels);

               for (int iBuffer=0; iBuffer &lt; ioData->mNumberBuffers; ++iBuffer) {

                   int thisNumChannels = ioData->mBuffers[iBuffer].mNumberChannels;

                   for (int iChannel = 0; iChannel &lt; thisNumChannels; ++iChannel) {
                       vDSP_vfix16(_outData+iChannel, _numOutputChannels, (SInt16 *)ioData->mBuffers[iBuffer].mData+iChannel, thisNumChannels, numFrames);
                   }
               }

           }        
       }

       return noErr;
    }

    Thanks !

    edit : Here's the code for the ASBD (_ouputFormat). It's getting its values straight from the remoteio. You can also check the whole method file here.

    if (checkError(AudioUnitGetProperty(_audioUnit,
                                       kAudioUnitProperty_StreamFormat,
                                       kAudioUnitScope_Input,
                                       0,
                                       &amp;_outputFormat,
                                       &amp;size),
                  "Couldn&#39;t get the hardware output stream format"))
       return NO;


    _outputFormat.mSampleRate = _samplingRate;
    if (checkError(AudioUnitSetProperty(_audioUnit,
                                       kAudioUnitProperty_StreamFormat,
                                       kAudioUnitScope_Input,
                                       0,
                                       &amp;_outputFormat,
                                       size),
                  "Couldn&#39;t set the hardware output stream format")) {

       // just warning
    }

    _numBytesPerSample = _outputFormat.mBitsPerChannel / 8;
    _numOutputChannels = _outputFormat.mChannelsPerFrame;

    NSLog(@"Current output bytes per sample: %ld", _numBytesPerSample);
    NSLog(@"Current output num channels: %ld", _numOutputChannels);

    // Slap a render callback on the unit
    AURenderCallbackStruct callbackStruct;
    callbackStruct.inputProc = renderCallback;
    callbackStruct.inputProcRefCon = (__bridge void *)(self);

    if (checkError(AudioUnitSetProperty(_audioUnit,
                                       kAudioUnitProperty_SetRenderCallback,
                                       kAudioUnitScope_Input,
                                       0,
                                       &amp;callbackStruct,
                                       sizeof(callbackStruct)),
                  "Couldn&#39;t set the render callback on the audio unit"))
       return NO;