summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>2010-05-12 08:02:45 +0000
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2010-09-20 12:55:45 +0200
commit2d90a2dd3a4713c5e49bdafbcc11c64333e00b14 (patch)
tree1ed4feb8c2d4ba439daeb7c8921c5bc16ce704fb
parent159f42ca7fb458acda0b61008672ae4cfcb69e77 (diff)
downloadgst-vaapi-2d90a2dd3a4713c5e49bdafbcc11c64333e00b14.tar.gz
Fix integration within the playbin2 pipeline.
-rw-r--r--NEWS5
-rw-r--r--README1
-rw-r--r--gst/vaapidecode/gstvaapidecode.c24
3 files changed, 10 insertions, 20 deletions
diff --git a/NEWS b/NEWS
index 0219c2fb..07c70420 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
-gst-vaapi NEWS -- summary of changes. 2010-05-05
+gst-vaapi NEWS -- summary of changes. 2010-05-DD
Copyright (C) 2010 Splitted-Desktop Systems
+Version 0.2.1 - DD.May.2010
+* Fix integration within the playbin2 pipeline
+
Version 0.2.0 - 05.May.2010
* Relicense gst-libs/ code to LGPL v2.1+
* Add FFmpeg/VAAPI decoder for the new `vaapidecode' element
diff --git a/README b/README
index e192cc77..7f182907 100644
--- a/README
+++ b/README
@@ -74,6 +74,5 @@ elements automatically.
Caveats
-------
- * No automatic integration within the default playbin2 pipeline
* No ad-hoc parser, vaapidecoder currently relies on FFmpeg
* MPEG-4 Part-2 (DivX) has decoding bugs
diff --git a/gst/vaapidecode/gstvaapidecode.c b/gst/vaapidecode/gstvaapidecode.c
index 4fcbbe05..84ab40c4 100644
--- a/gst/vaapidecode/gstvaapidecode.c
+++ b/gst/vaapidecode/gstvaapidecode.c
@@ -31,6 +31,7 @@
#include <gst/vaapi/gstvaapivideosink.h>
#include <gst/vaapi/gstvaapivideobuffer.h>
#include <gst/vaapi/gstvaapidecoder_ffmpeg.h>
+#include <gst/vaapi/gstvaapiutils_gst.h>
#define GST_PLUGIN_NAME "vaapidecode"
#define GST_PLUGIN_DESC "A VA-API based video decoder"
@@ -157,26 +158,13 @@ error_commit_buffer:
}
}
-static gboolean
+static inline gboolean
gst_vaapidecode_ensure_display(GstVaapiDecode *decode)
{
- GstVaapiVideoSink *sink;
- GstVaapiDisplay *display;
-
- if (decode->display)
- return TRUE;
-
- /* Look for a downstream vaapisink */
- sink = gst_vaapi_video_sink_lookup(GST_ELEMENT(decode));
- if (!sink)
- return FALSE;
-
- display = gst_vaapi_video_sink_get_display(sink);
- if (!display)
- return FALSE;
-
- decode->display = g_object_ref(display);
- return TRUE;
+ if (!decode->display)
+ decode->display =
+ gst_vaapi_display_lookup_downstream(GST_ELEMENT(decode));
+ return decode->display != NULL;
}
static gboolean