Recherche avancée

Médias (0)

Mot : - Tags -/publication

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (58)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

Sur d’autres sites (9160)

  • CGO : How to access a C pointer array from Golang

    24 avril 2018, par nevernew

    I’m writing an app for the windows platform using FFmpeg and it’s golang wrapper goav, but I’m having trouble understanding how to use the C pointers to gain access to an array.

    I’m trying to get the streams stored in the AVFormatContext class to use in go, and eventually add frames to a texture in OpenGl to make a video player with cool transitions.

    I think understanding how to cast and access the C data will make coding this a lot easier.

    I’ve stripped out all the relevant parts of the C code, the wrapper and my code, shown below :

    C code - libavformat/avformat.h

    typedef struct AVFormatContext {
       unsigned int nb_streams;
       AVStream **streams;
    }

    Golang goav wrapper

    package avutil

    //#cgo pkg-config: libavformat
    //#include <libavformat></libavformat>avformat.h>
    import "C"
    import (
       "unsafe"
    )

    type Context C.struct_AVFormatContext;

    func (ctxt *Context) StreamsGet(i uintptr) *Stream {
       streams := (**Stream)(unsafe.Pointer(ctxt.streams));
       // I think this is where it's going wrong, I'm brand new to this stuff
       return (*Stream)(unsafe.Pointer(uintptr(unsafe.Pointer(streams)) + i*unsafe.Sizeof(*streams)));
    }

    My Golang code

    package main

    import "github.com/giorgisio/goav/avformat"

    func main() {
       ctx := &amp;avformat.Context{} // the actual function to initiate this does an mallocz for the streams

       stream := ctx.StreamsGet(0)

       //do stuff with stream...
    }

    In C it looks like I just have to do just streams[i], but that wont work in go, so I added a function to the wrapper using the technique from my question here.
    However I’m not getting the data ; It looks like I’m getting a pointer to somewhere random in memory. So, how can I access these elements form golang ? Any resources would be helpful too ; I’m going to be investing a fair bit of time into this.

  • How to access a C pointer array from Golang

    24 avril 2018, par nevernew

    I’m writing an app for the windows platform using FFmpeg and it’s golang wrapper goav, but I’m having trouble understanding how to use the C pointers to gain access to an array.

    I’m trying to get the streams stored in the AVFormatContext class to use in go, and eventually add frames to a texture in OpenGl to make a video player with cool transitions.

    I think understanding how to cast and access the C data will make coding this a lot easier.

    I’ve stripped out all the relevant parts of the C code, the wrapper and my code, shown below :

    C code - libavformat/avformat.h

    typedef struct AVFormatContext {
       unsigned int nb_streams;
       AVStream **streams;
    }

    Golang goav wrapper

    package avutil

    //#cgo pkg-config: libavformat
    //#include <libavformat></libavformat>avformat.h>
    import "C"
    import (
       "unsafe"
    )

    type Context C.struct_AVFormatContext;

    func (ctxt *Context) StreamsGet(i uintptr) *Stream {
       streams := (**Stream)(unsafe.Pointer(ctxt.streams));
       // I think this is where it's going wrong, I'm brand new to this stuff
       return (*Stream)(unsafe.Pointer(uintptr(unsafe.Pointer(streams)) + i*unsafe.Sizeof(*streams)));
    }

    My Golang code

    package main

    import "github.com/giorgisio/goav/avformat"

    func main() {
       ctx := &amp;avformat.Context{} // the actual function to initiate this does an mallocz for the streams

       stream := ctx.StreamsGet(0)

       //do stuff with stream...
    }

    In C it looks like I just have to do just streams[i], but that wont work in go, so I added a function to the wrapper using the technique from my question here.
    However I’m not getting the data ; It looks like I’m getting a pointer to somewhere random in memory. So, how can I access these elements form golang ? Any resources would be helpful too ; I’m going to be investing a fair bit of time into this.

  • dnxhdenc : fix access outside of image

    13 octobre 2015, par Christophe Gisquet
    dnxhdenc : fix access outside of image
    

    This is the same test as for the 8bit case.

    • [DH] libavcodec/dnxhdenc.c