QtGStreamer 1.2.0
Loading...
Searching...
No Matches
bufferlist.cpp
1/*
2 Copyright (C) 2011 Collabora Ltd. <info@collabora.co.uk>
3 @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
4
5 This library is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published
7 by the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18#include "bufferlist.h"
19#include <gst/gst.h>
20
21namespace QGst {
22
23BufferListPtr BufferList::create()
24{
25 return BufferListPtr::wrap(gst_buffer_list_new(), false);
26}
27
28uint BufferList::length() const
29{
30 return gst_buffer_list_length(object<GstBufferList>());
31}
32
33BufferPtr BufferList::bufferAt(uint index) const
34{
35 return BufferPtr::wrap(gst_buffer_list_get(object<GstBufferList>(), index));
36}
37
38} //namespace QGst
39
static RefPointer< T > wrap(typename T::CType *nativePtr, bool increaseRef=true)
Definition refpointer.h:328
Wrappers for GStreamer classes.