
Recherche avancée
Autres articles (103)
-
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (8129)
-
Revision 415b84bee0 : vp9_thread_test : add 'Thread' to test names s/VP9DecodeMTTest/VP9DecodeMultiThr
22 juin 2014, par James ZernChanged Paths :
Modify /test/vp9_thread_test.cc
vp9_thread_test : add ’Thread’ to test namess/VP9DecodeMTTest/VP9DecodeMultiThreadedTest/
this enables simpler test filtering
Change-Id : I010a451cf32fa5a95db6734cc22f331f0a0d515a
-
libavcodec/qsvenc : Change the parameter log to be thread safe
8 juillet 2022, par Wenbin Chenlibavcodec/qsvenc : Change the parameter log to be thread safe
Dividing one line log into several av_log() call is not thread safe. Now
merge these strings into one av_log() call.Signed-off-by : Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by : Haihao Xiang <haihao.xiang@intel.com> -
Thread safety of FFmpeg when using av_lockmgr_register
12 août 2013, par StocasticoMy application uses FFmpeg to read video streams. So far, I ensured thread safety by defining my own global lock and looking for all the methods inside FFmpeg libraries which are not thread safe.
This makes the code a bit messy, so while looking for better ideas I found this answer, but apparently I couldn't make use of the suggestions.
I tried testing it in my own environment, but I always get critical heap error. Here's the test codeclass TestReader
{
public:
TestReader( std::string sVid )
{
m_sVid = sVid;
m_cVidPtr.reset( new VideoReader() );
}
~TestReader()
{}
void operator() ()
{
readVideoThread();
}
private:
int readVideoThread()
{
m_cVidPtr->init( m_sVid.c_str() );
MPEGFrame::pointer cFramePtr;
for ( int i=0; i< 500; i++ )
{
cFramePtr = m_cVidPtr->getNextFrame();
}
return 0;
}
boost::shared_ptr<videoreader> m_cVidPtr;
std::string m_sVid;
};
/*****************************************************************************/
int lockMgrCallback(void** cMutex, enum AVLockOp op)
{
if (nullptr == cMutex)
return -1;
switch(op)
{
case AV_LOCK_CREATE:
{
*cMutex = nullptr;
boost::mutex* m = new boost::mutex();
*cMutex = static_cast(m);
break;
}
case AV_LOCK_OBTAIN:
{
boost::mutex* m = static_cast(*cMutex);
m->lock();
break;
}
case AV_LOCK_RELEASE:
{
boost::mutex * m = static_cast(*cMutex);
m->unlock();
break;
}
case AV_LOCK_DESTROY:
{
boost::mutex * m = static_cast(*cMutex);
delete m;
break;
}
default:
break;
}
return 0;
}
int testFFmpegMultiThread( std::string sVideo )
{
if ( ::av_lockmgr_register( &lockMgrCallback ) )
{
std::cout << "Could not initialize lock manager!" << std::endl;
return -1;
}
TestReader c1(sVideo);
TestReader c2(sVideo);
boost::thread t1( c1 );
boost::thread t2( c2 );
t1.join();
t2.join();
return 0;
}
</videoreader>The classes VideoReader and MPEGFrame are just wrappers and have always worked perfectly in single threaded scenarios, or in multi-threaded scenario managed using my own global lock.
Am I missing something obvious ? Can anybody point me to some working code ? Thanks in advance