
Recherche avancée
Autres articles (99)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang 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.
Sur d’autres sites (11162)
-
Questions about empty cmake FIND macros
12 mai 2014, par Ken LiI have a macro that looks like this
MACRO(FFMPEG_FIND varname shortname headername)
MESSAGE(STATUS "FFMPEG_${varname}_LIBRARIES: ${FFMPEG_${varname}_LIBRARIES}")
MESSAGE(STATUS "FFMPEG_${varname}_INCLUDE_DIRS: ${FFMPEG_${varname}_INCLUDE_DIRS}")
ENDMACRO(FFMPEG_FIND)which is called like this :
FFMPEG_FIND(LIBAVFORMAT avformat avformat.h)
FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h)
FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h)
FFMPEG_FIND(LIBAVUTIL avutil avutil.h)
FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here.Which will give us the output of
-- FFMPEG_LIBAVFORMAT_LIBRARIES: F:/Dev/Lib/ffmpeg-20140507-git-4cdea92-win32-de
v/lib/avformat.lib
-- FFMPEG_LIBAVFORMAT_INCLUDE_DIRS: F:/Dev/Lib/ffmpeg-2.2.1
-- FFMPEG_LIBAVDEVICE_LIBRARIES: F:/Dev/Lib/ffmpeg-20140507-git-4cdea92-win32-de
v/lib/avdevice.lib
-- FFMPEG_LIBAVDEVICE_INCLUDE_DIRS: F:/Dev/Lib/ffmpeg-2.2.1
-- FFMPEG_LIBAVCODEC_LIBRARIES: F:/Dev/Lib/ffmpeg-20140507-git-4cdea92-win32-dev
/lib/avcodec.lib
-- FFMPEG_LIBAVCODEC_INCLUDE_DIRS: F:/Dev/Lib/ffmpeg-2.2.1
-- FFMPEG_LIBAVUTIL_LIBRARIES: F:/Dev/Lib/ffmpeg-20140507-git-4cdea92-win32-dev/
lib/avutil.lib
-- FFMPEG_LIBAVUTIL_INCLUDE_DIRS: F:/Dev/Lib/ffmpeg-2.2.1
-- FFMPEG_LIBSWSCALE_LIBRARIES: F:/Dev/Lib/ffmpeg-20140507-git-4cdea92-win32-dev
/lib/swscale.lib
-- FFMPEG_LIBSWSCALE_INCLUDE_DIRS: F:/Dev/Lib/ffmpeg-2.2.1
-- Configuring done
-- Generating doneMy first question is how is cmake even finding the libraries on my hard drive while the FIND macro is essentially empty. The more important question being, why is
INCLUDE_DIRS
set toF:/Dev/Lib/ffmpeg-2.2.1
which is a path that doesn’t even exist (there is no ffmpeg-2.2.1 folder in F :/Dev/Lib), as it should be pointing toF:/Dev/Lib/ffmpeg-20140507-git-4cdea92-win32-dev/include
-
ffmpeg used vda from os x
13 mai 2014, par user2618420I try to enable hardware decoding project earlier decoded using ffmpeg
ffmpeg has support in hard-copy decoding
Here documentation kotoroya I did https://github.com/dilaroga/ffmpeg-vda/wiki/FFmpeg-vda-usage
my codeenum AVPixelFormat myGetFormatCallback(struct AVCodecContext *ctx, const enum AVPixelFormat * fmt)
{
struct vda_context *vda_ctx;
vda_ctx = (struct vda_context *)malloc(sizeof(vda_context));
vda_ctx->decoder = NULL;
vda_ctx->width = ctx->width;
vda_ctx->height = ctx->height;
vda_ctx->format = 'avc1';
vda_ctx->use_ref_buffer = 1;
switch (ctx->pix_fmt) {
case PIX_FMT_UYVY422:{
vda_ctx->cv_pix_fmt_type = '2vuy';
break;
}
case PIX_FMT_YUYV422:{
vda_ctx->cv_pix_fmt_type = 'yuvs';
break;
}
case PIX_FMT_NV12:{
vda_ctx->cv_pix_fmt_type = '420v';
break;
}
case PIX_FMT_YUV420P:{
vda_ctx->cv_pix_fmt_type = 'y420';
break;
}
default:{
av_log(ctx, AV_LOG_ERROR, "Unsupported pixel format: %d\n", ctx->pix_fmt);
Logger::debug(LOG_LEVEL_ERROR, "Unsupported pixel format: %d", ctx->pix_fmt);
throw AbstractException("Unsupported pixel format");
}
}
int status = ff_vda_create_decoder(vda_ctx, (unsigned char*)ctx->extradata,ctx->extradata_size);
if (status){
Logger::debug(LOG_LEVEL_ERROR, "Error create VDA decoder");
throw AbstractException("Error create VDA decoder");
}else{
ctx->hwaccel_context = vda_ctx;
}
return ctx->pix_fmt;
}
static void release_vda_context(void *opaque, uint8_t *data)
{
vda_buffer_context *vda_context = (vda_buffer_context *)opaque;
av_free(vda_context);
}
int myGetBufferCallback(struct AVCodecContext *s, AVFrame *av_frame, int flags)
{
vda_buffer_context *vda_context = (vda_buffer_context *)av_mallocz(sizeof(*vda_context));
AVBufferRef *buffer = av_buffer_create(NULL, 0, release_vda_context, vda_context, 0);
if( !vda_context || !buffer )
{
av_free(vda_context);
return -1;
}
av_frame->buf[0] = buffer;
av_frame->data[0] = (uint8_t*)1;
return 0;
}
static void release_buffer(struct AVCodecContext *opaque, AVFrame *pic)
{
vda_buffer_context *context = (vda_buffer_context*)opaque;
CVPixelBufferUnlockBaseAddress(context->cv_buffer, 0);
CVPixelBufferRelease(context->cv_buffer);
av_free(context);
}
main(){
//init ff context
if (avcodec_open2(mCodecContext, mCodec, NULL) < 0) throw AbstractException("Unable to open codec");
mCodecContext->get_format = myGetFormatCallback;
mCodecContext->get_buffer2 = myGetBufferCallback;
mCodecContext->release_buffer = release_buffer;
}but I did not myGetFormatCallback the method is called, and called myGetBufferCallback falls
why not called myGetFormatCallback ? what’s wrong ? may not work well at all -
Matomo vs WP-Statistics – which web analytics plugin suits you best ?
2 avril 2020, par Joselyn Khor — Analytics Tips, Plugins