summaryrefslogtreecommitdiff
path: root/rotord/gstvideoloader.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-04-26 18:40:39 +0100
committerTim Redfern <tim@herge.(none)>2013-04-26 18:40:39 +0100
commitf09e12889c4ebfa3db21fa30955698171a22757b (patch)
treeb6cdfea066c94300325c9163fbe813acef467c31 /rotord/gstvideoloader.cpp
parente9320eb83115f66e99bd98e76c8c9ff78ca043d4 (diff)
tinkering gstreamer loader
Diffstat (limited to 'rotord/gstvideoloader.cpp')
-rw-r--r--rotord/gstvideoloader.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/rotord/gstvideoloader.cpp b/rotord/gstvideoloader.cpp
index 2835b02..c7a9305 100644
--- a/rotord/gstvideoloader.cpp
+++ b/rotord/gstvideoloader.cpp
@@ -1,12 +1,6 @@
#include "gstvideoloader.h"
-#include <gst/gst.h>
-#include <gst/app/gstappsink.h>
-#include <gst/video/video.h>
-#include <glib-object.h>
-#include <glib.h>
-#include <algorithm>
using namespace std;
@@ -949,7 +943,7 @@ bool ofGstVideoPlayer::allocate(int bpp){
nFrames = 0;
if(GstPad* pad = gst_element_get_static_pad(videoUtils.getSink(), "sink")){
-/*#if GST_VERSION_MAJOR==0
+#if GST_VERSION_MAJOR==0
int width,height;
if(gst_video_get_size(GST_PAD(pad), &width, &height)){
if(!videoUtils.allocate(width,height,bpp)) return false;
@@ -971,7 +965,6 @@ bool ofGstVideoPlayer::allocate(int bpp){
}
bIsAllocated = true;
#else
-*/
if(GstCaps *caps = gst_pad_get_current_caps (GST_PAD (pad))){
GstVideoInfo info;
gst_video_info_init (&info);
@@ -991,7 +984,7 @@ bool ofGstVideoPlayer::allocate(int bpp){
cerr<<"GStreamer: cannot get pipeline caps"<<endl;
bIsAllocated = false;
}
-//#endif
+#endif
gst_object_unref(GST_OBJECT(pad));
}else{
cerr<<"GStreamer: cannot get sink pad"<<endl;