Commit 911e0e22 authored by luyikei's avatar luyikei Committed by Hugo Beauzée-Luyssen

Workflow::Frame Add pts() and setPts()

Signed-off-by: 's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 24f87514
...@@ -33,7 +33,8 @@ Frame::Frame() : ...@@ -33,7 +33,8 @@ Frame::Frame() :
m_height( 0 ), m_height( 0 ),
m_buffer( 0 ), m_buffer( 0 ),
m_size( 0 ), m_size( 0 ),
m_nbPixels( 0 ) m_nbPixels( 0 ),
m_pts( 0 )
{ {
} }
...@@ -41,7 +42,8 @@ Frame::Frame( quint32 width, quint32 height ) : ...@@ -41,7 +42,8 @@ Frame::Frame( quint32 width, quint32 height ) :
OutputBuffer( VideoTrack ), OutputBuffer( VideoTrack ),
ptsDiff( 0 ), ptsDiff( 0 ),
m_width( width ), m_width( width ),
m_height( height ) m_height( height ),
m_pts( 0 )
{ {
m_nbPixels = width * height; m_nbPixels = width * height;
m_size = m_nbPixels * Depth; m_size = m_nbPixels * Depth;
...@@ -52,7 +54,8 @@ Frame::Frame(quint32 width, quint32 height, size_t forcedSize) : ...@@ -52,7 +54,8 @@ Frame::Frame(quint32 width, quint32 height, size_t forcedSize) :
OutputBuffer( VideoTrack ), OutputBuffer( VideoTrack ),
ptsDiff( 0 ), ptsDiff( 0 ),
m_width( width ), m_width( width ),
m_height( height ) m_height( height ),
m_pts( 0 )
{ {
m_nbPixels = width * height; m_nbPixels = width * height;
m_size = forcedSize; m_size = forcedSize;
...@@ -99,6 +102,18 @@ Frame::nbPixels() const ...@@ -99,6 +102,18 @@ Frame::nbPixels() const
return m_nbPixels; return m_nbPixels;
} }
qint64
Frame::pts() const
{
return m_pts;
}
void
Frame::setPts( qint64 pts )
{
m_pts = pts;
}
size_t Frame::Size(quint32 width, quint32 height) size_t Frame::Size(quint32 width, quint32 height)
{ {
return width * height * Depth; return width * height * Depth;
......
...@@ -84,6 +84,16 @@ namespace Workflow ...@@ -84,6 +84,16 @@ namespace Workflow
* This is equal to width * height * This is equal to width * height
*/ */
quint32 nbPixels() const; quint32 nbPixels() const;
/**
* \brief Get pts.
*
*/
qint64 pts() const;
/**
* \brief Set pts.
*
*/
void setPts( qint64 pts );
/** /**
* \warning Terrible hack ! * \warning Terrible hack !
* *
...@@ -105,6 +115,7 @@ namespace Workflow ...@@ -105,6 +115,7 @@ namespace Workflow
quint32 *m_buffer; quint32 *m_buffer;
size_t m_size; size_t m_size;
quint32 m_nbPixels; quint32 m_nbPixels;
qint64 m_pts;
}; };
class AudioSample : public OutputBuffer class AudioSample : public OutputBuffer
{ {
......
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