Recherche avancée

Médias (0)

Mot : - Tags -/masques

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

Autres articles (55)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (9499)

  • How to define a structure with a function pointer by using ctypes ?

    8 décembre 2017, par Wai

    I want to call av_find_input_format function (from dll coded in C) from Python. The function define as follows :

    AVInputFormat *av_find_input_format(const char *short_name);

    In order to call it successfully, I must define a structure AVInputFormat as its return value. The AVInputFormat structure is defined in C as follow :

    typedef struct AVInputFormat {
       const char *name;
       const char *long_name;
       int flags;
       const char *extensions;
       const struct AVCodecTag * const *codec_tag;
       const AVClass *priv_class; ///< AVClass for the private context
       const char *mime_type;
       struct AVInputFormat *next;
       int raw_codec_id;
       int priv_data_size;
       int (*read_probe)(AVProbeData *);
       int (*read_header)(struct AVFormatContext *);
       int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
       int (*read_close)(struct AVFormatContext *);
       int (*read_seek)(struct AVFormatContext *, int stream_index, int64_t timestamp, int flags);
       int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index, int64_t *pos, int64_t pos_limit);
       int (*read_play)(struct AVFormatContext *);
       int (*read_pause)(struct AVFormatContext *);
       int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
       int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
       int (*create_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps);
       int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps);
    } AVInputFormat;

    What should I do ?

    Additional explanation, now my Python as follows :

    import ctypes
    class AVInputFormat(ctypes.Structure):
       pass
    AVInputFormat._fields_ = [("name", ctypes.c_char_p),
                             ("long_name", ctypes.c_char_p),
                             ('flags', ctypes.c_int),
                             ('extensions', ctypes.c_char_p),
                             ('codec_tag', ctypes.POINTER(AVCodecTag)),
                             ('priv_class', ctypes.POINTER(AVClass)),
                             ('next', ctypes.POINTER(AVInputFormat)),
                             ('raw_codec_id', ctypes.c_int),
                             ('priv_data_size', ctypes.c_int),
                             ('read_probe', ctypes.POINTER(read_probe)),
                             ('read_header', ctypes.POINTER(read_header)),
                             ('read_packet', ctypes.POINTER(read_packet)),
                             ('read_close', ctypes.POINTER(read_close)),
                             ('read_seek', ctypes.POINTER(read_seek)),
                             ('read_timestamp', ctypes.POINTER(read_timestamp)),
                             ('read_play', ctypes.POINTER(read_play)),
                             ('read_pause', ctypes.POINTER(read_pause)),
                             ('read_seek2', ctypes.POINTER(read_seek2)),
                             ('get_device_list', ctypes.POINTER(get_device_list)),
                             ('create_device_capabilities', ctypes.POINTER(create_device_capabilities)),
                             ('free_device_capabilities', ctypes.POINTER(free_device_capabilities))]

    avformat_dll = ctypes.cdll.LoadLibrary('avformat-57.dll')
    # *av_find_input_format(const char *short_name);
    print avformat_dll.av_find_input_format
    func = avformat_dll.av_find_input_format
    func.restype = ctypes.POINTER(AVInputFormat)
    fmt = func('aac')
    print fmt.contents.name

    But it runs error with ValueError: NULL pointer access

  • build : Add define for SIMD extensions requiring 16-byte aligned buffers

    21 juillet 2014, par Diego Biurrun
    build : Add define for SIMD extensions requiring 16-byte aligned buffers
    
    • [DH] configure
    • [DH] libavcodec/utils.c
  • avcodec/ac3dec_float : define the downmix related options as exported and read-only

    24 décembre 2024, par James Almer
    avcodec/ac3dec_float : define the downmix related options as exported and read-only
    

    They are not user settable options.

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavcodec/ac3dec_float.c
    • [DH] tests/ref/fate/ts-demux