Commit 797c2f68 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

PTS are signed int64

parent 245ef06c
......@@ -58,7 +58,7 @@ struct VideoFrame : public QSharedData
RawVideoFrame frame;
quint32 nbpixels;
quint32 nboctets;
quint64 ptsDiff;
qint64 ptsDiff;
};
class LightVideoFrame
......
......@@ -115,7 +115,7 @@ int WorkflowRenderer::lock( void *datas, int64_t *dts, int64_t *pts, unsigne
int WorkflowRenderer::lockVideo( WorkflowRenderer* self, int64_t *pts, size_t *bufferSize, void **buffer )
{
quint64 ptsDiff = 0;
qint64 ptsDiff = 0;
if ( self->m_stopping == false && self->m_paused == false )
{
......@@ -135,7 +135,7 @@ int WorkflowRenderer::lockVideo( WorkflowRenderer* self, int64_t *pts, size_
int WorkflowRenderer::lockAudio( WorkflowRenderer* self, int64_t *pts, size_t *bufferSize, void **buffer )
{
quint64 ptsDiff;
qint64 ptsDiff;
if ( self->m_paused == true )
return 1;
if ( self->m_stopping == false )
......
......@@ -92,7 +92,7 @@ void AudioClipWorkflow::lock( AudioClipWorkflow* cw, uint8_t** pcm_buffer
void AudioClipWorkflow::unlock( AudioClipWorkflow* cw, uint8_t* pcm_buffer,
unsigned int channels, unsigned int rate,
unsigned int nb_samples, unsigned int bits_per_sample,
unsigned int size, quint64 pts )
unsigned int size, qint64 pts )
{
// qDebug() << "pts:" << pts << "nb channels" << channels << "rate:" << rate <<
// "size:" << size << "nb_samples:" << nb_samples;
......@@ -100,8 +100,8 @@ void AudioClipWorkflow::unlock( AudioClipWorkflow* cw, uint8_t* pcm_buffe
Q_UNUSED( rate );
Q_UNUSED( bits_per_sample );
Q_UNUSED( size );
static quint64 previous_pts = pts;
static quint64 current_pts = pts;
static qint64 previous_pts = pts;
static qint64 current_pts = pts;
//Q_UNUSED( pts );
previous_pts = current_pts;
current_pts = pts;
......
......@@ -34,7 +34,7 @@ class AudioClipWorkflow : public ClipWorkflow
size_t size;
unsigned int nbSample;
unsigned int nbChannels;
quint64 ptsDiff;
qint64 ptsDiff;
};
AudioClipWorkflow( Clip* clip );
~AudioClipWorkflow();
......@@ -50,7 +50,7 @@ class AudioClipWorkflow : public ClipWorkflow
static void unlock( AudioClipWorkflow* clipWorkflow, uint8_t* pcm_buffer,
unsigned int channels, unsigned int rate,
unsigned int nb_samples, unsigned int bits_per_sample,
unsigned int size, quint64 pts );
unsigned int size, qint64 pts );
};
#endif // AUDIOCLIPWORKFLOW_H
......@@ -102,15 +102,15 @@ void VideoClipWorkflow::lock( VideoClipWorkflow* cw, void** pp_ret, int size
*pp_ret = (*(cw->m_buffer))->frame.octets;
}
void VideoClipWorkflow::unlock( VideoClipWorkflow* cw, void* buffer, int width, int height, int bpp, int size, quint64 pts )
void VideoClipWorkflow::unlock( VideoClipWorkflow* cw, void* buffer, int width, int height, int bpp, int size, qint64 pts )
{
Q_UNUSED( buffer );
Q_UNUSED( width );
Q_UNUSED( height );
Q_UNUSED( bpp );
Q_UNUSED( size );
static quint64 previous_pts = pts;
static quint64 current_pts = pts;
static qint64 previous_pts = pts;
static qint64 current_pts = pts;
cw->m_renderLock->unlock();
cw->m_stateLock->lockForWrite();
......
......@@ -39,7 +39,7 @@ class VideoClipWorkflow : public ClipWorkflow
LightVideoFrame* m_buffer;
virtual void initVlcOutput();
static void lock( VideoClipWorkflow* clipWorkflow, void** pp_ret, int size );
static void unlock( VideoClipWorkflow* clipWorkflow, void* buffer, int width, int height, int bpp, int size, quint64 pts );
static void unlock( VideoClipWorkflow* clipWorkflow, void* buffer, int width, int height, int bpp, int size, qint64 pts );
};
#endif // VIDEOCLIPWORKFLOW_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