[vlmc-devel] Workflow::Frame Add Frame( size_t size )
Yikai Lu
git at videolan.org
Wed Jun 1 18:14:58 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Wed May 4 20:33:28 2016 +0900| [d4c9ec03f799f377a751dd759dabfa03a0950aa6] | committer: Hugo Beauzée-Luyssen
Workflow::Frame Add Frame( size_t size )
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/d4c9ec03f799f377a751dd759dabfa03a0950aa6
---
src/Workflow/Types.cpp | 12 ++++++++++++
src/Workflow/Types.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/src/Workflow/Types.cpp b/src/Workflow/Types.cpp
index 9450639..74b5ff6 100644
--- a/src/Workflow/Types.cpp
+++ b/src/Workflow/Types.cpp
@@ -50,6 +50,18 @@ Frame::Frame( quint32 width, quint32 height ) :
m_buffer = new quint32[m_nbPixels];
}
+Frame::Frame( size_t forcedSize ) :
+ OutputBuffer( VideoTrack ),
+ ptsDiff( 0 ),
+ m_width( 0 ),
+ m_height( 0 ),
+ m_size( forcedSize ),
+ m_nbPixels( 0 ),
+ m_pts( 0 )
+{
+ m_buffer = new quint32[ ( forcedSize % 4 ) ? forcedSize / 4 + 1 : forcedSize / 4 ];
+}
+
Frame::Frame(quint32 width, quint32 height, size_t forcedSize) :
OutputBuffer( VideoTrack ),
ptsDiff( 0 ),
diff --git a/src/Workflow/Types.h b/src/Workflow/Types.h
index a844fe8..3baeab3 100644
--- a/src/Workflow/Types.h
+++ b/src/Workflow/Types.h
@@ -52,6 +52,7 @@ namespace Workflow
public:
explicit Frame();
Frame( quint32 width, quint32 height );
+ Frame( size_t forcedSize );
Frame( quint32 width, quint32 height, size_t forcedSize );
~Frame();
quint32 width() const;
More information about the Vlmc-devel
mailing list