Commit f0c9f1e7 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Use PRId64 when dealing with qint64

parent 67c4f1ac
......@@ -25,6 +25,10 @@
#include "VLCMedia.h"
#include "VLCInstance.h"
//Allow PRId64 to be defined:
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
using namespace LibVLCpp;
Media::Media( const QString& filename ) :
......@@ -46,28 +50,28 @@ void Media::addOption( const char* opt )
void Media::setVideoLockCallback( void* callback )
{
char param[64];
sprintf( param, ":sout-smem-video-prerender-callback=%lld", (qint64)(intptr_t)callback );
sprintf( param, ":sout-smem-video-prerender-callback=%"PRId64, (qint64)(intptr_t)callback );
addOption(param);
}
void Media::setVideoUnlockCallback( void* callback )
{
char param[64];
sprintf( param, ":sout-smem-video-postrender-callback=%lld", (qint64)(intptr_t)callback );
sprintf( param, ":sout-smem-video-postrender-callback=%"PRId64, (qint64)(intptr_t)callback );
addOption( param );
}
void Media::setAudioLockCallback( void* callback )
{
char param[64];
sprintf( param, ":sout-smem-audio-prerender-callback=%lld", (qint64)(intptr_t)callback );
sprintf( param, ":sout-smem-audio-prerender-callback=%"PRId64, (qint64)(intptr_t)callback );
addOption(param);
}
void Media::setAudioUnlockCallback( void* callback )
{
char param[64];
sprintf( param, ":sout-smem-audio-postrender-callback=%lld", (qint64)(intptr_t)callback );
sprintf( param, ":sout-smem-audio-postrender-callback=%"PRId64, (qint64)(intptr_t)callback );
addOption( param );
}
......@@ -75,7 +79,7 @@ void Media::setVideoDataCtx( void* dataCtx )
{
char param[64];
sprintf( param, ":sout-smem-video-data=%lld", (qint64)(intptr_t)dataCtx );
sprintf( param, ":sout-smem-video-data=%"PRId64, (qint64)(intptr_t)dataCtx );
addOption( param );
}
......@@ -83,7 +87,7 @@ void Media::setAudioDataCtx( void* dataCtx )
{
char param[64];
sprintf( param, ":sout-smem-audio-data=%lld", (qint64)(intptr_t)dataCtx );
sprintf( param, ":sout-smem-audio-data=%"PRId64, (qint64)(intptr_t)dataCtx );
addOption( param );
}
......
......@@ -23,6 +23,7 @@
#include <QtDebug>
#include <QThread>
#include <QWaitCondition>
//Allow PRId64 to be defined:
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment