[vlmc-devel] Workflow::Frame Add pts() and setPts()
Yikai Lu
git at videolan.org
Wed Jun 1 18:14:57 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Wed May 4 20:30:50 2016 +0900| [911e0e22bd14f2b793afb8c0c399c6177fc7c323] | committer: Hugo Beauzée-Luyssen
Workflow::Frame Add pts() and setPts()
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/911e0e22bd14f2b793afb8c0c399c6177fc7c323
---
src/Workflow/Types.cpp | 21 ++++++++++++++++++---
src/Workflow/Types.h | 11 +++++++++++
2 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/src/Workflow/Types.cpp b/src/Workflow/Types.cpp
index 86bbad5..9450639 100644
--- a/src/Workflow/Types.cpp
+++ b/src/Workflow/Types.cpp
@@ -33,7 +33,8 @@ Frame::Frame() :
m_height( 0 ),
m_buffer( 0 ),
m_size( 0 ),
- m_nbPixels( 0 )
+ m_nbPixels( 0 ),
+ m_pts( 0 )
{
}
@@ -41,7 +42,8 @@ Frame::Frame( quint32 width, quint32 height ) :
OutputBuffer( VideoTrack ),
ptsDiff( 0 ),
m_width( width ),
- m_height( height )
+ m_height( height ),
+ m_pts( 0 )
{
m_nbPixels = width * height;
m_size = m_nbPixels * Depth;
@@ -52,7 +54,8 @@ Frame::Frame(quint32 width, quint32 height, size_t forcedSize) :
OutputBuffer( VideoTrack ),
ptsDiff( 0 ),
m_width( width ),
- m_height( height )
+ m_height( height ),
+ m_pts( 0 )
{
m_nbPixels = width * height;
m_size = forcedSize;
@@ -99,6 +102,18 @@ Frame::nbPixels() const
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)
{
return width * height * Depth;
diff --git a/src/Workflow/Types.h b/src/Workflow/Types.h
index 5fa13c3..a844fe8 100644
--- a/src/Workflow/Types.h
+++ b/src/Workflow/Types.h
@@ -85,6 +85,16 @@ namespace Workflow
*/
quint32 nbPixels() const;
/**
+ * \brief Get pts.
+ *
+ */
+ qint64 pts() const;
+ /**
+ * \brief Set pts.
+ *
+ */
+ void setPts( qint64 pts );
+ /**
* \warning Terrible hack !
*
* Remove this ASAP !!
@@ -105,6 +115,7 @@ namespace Workflow
quint32 *m_buffer;
size_t m_size;
quint32 m_nbPixels;
+ qint64 m_pts;
};
class AudioSample : public OutputBuffer
{
More information about the Vlmc-devel
mailing list