21 #include "structure.h"
23 #include <QtCore/QDebug>
28 SamplePtr Sample::create(
const BufferPtr & buffer,
const CapsPtr & caps,
29 const Segment & segment,
const Structure & info)
31 GstStructure *cinfo = NULL;
33 cinfo = gst_structure_copy(info);
35 return SamplePtr::wrap(gst_sample_new(buffer, caps, segment, cinfo),
false);
38 BufferPtr Sample::buffer()
const
43 CapsPtr Sample::caps()
const
45 return CapsPtr::wrap(gst_sample_get_caps(object<GstSample>()));
48 Structure Sample::info()
const
50 return Structure(gst_sample_get_info(object<GstSample>()));
53 Segment Sample::segment()
const
55 return Segment(gst_sample_get_segment(object<GstSample>()));
static RefPointer< T > wrap(typename T::CType *nativePtr, bool increaseRef=true)