summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosep Torra <n770galaxy@gmail.com>2014-03-18 15:15:29 +0100
committerJosep Torra <n770galaxy@gmail.com>2014-03-18 15:15:29 +0100
commit6592c38c57fbbd723f3b2dc5127ec07ae906e6c2 (patch)
tree7d7617009e53b9e3003a4de5c9b16d4fd186ae6e
parent7929362bdcc7218a46c9cd7bed3b3f690dbe99a2 (diff)
omxvideodec: fix build in non rpi target0.10
-rw-r--r--omx/gstomxvideodec.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index d3090de..9161a05 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -332,7 +332,9 @@ static void
gst_omx_video_dec_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec)
{
+#ifdef USE_EGL_RPI
GstOMXVideoDec *self = GST_OMX_VIDEO_DEC (object);
+#endif
switch (prop_id) {
#ifdef USE_EGL_RPI
@@ -353,7 +355,9 @@ static void
gst_omx_video_dec_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec)
{
+#ifdef USE_EGL_RPI
GstOMXVideoDec *self = GST_OMX_VIDEO_DEC (object);
+#endif
switch (prop_id) {
#ifdef USE_EGL_RPI
@@ -658,9 +662,9 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self)
gboolean was_enabled = TRUE;
GstVideoCodecState *state =
gst_video_decoder_get_output_state (GST_VIDEO_DECODER (self));
+#ifdef USE_EGL_RPI
GstVideoInfo *vinfo = &state->info;
-#ifdef USE_EGL_RPI
if (self->egl_transport_active) {
GList *images = NULL;
@@ -1111,6 +1115,7 @@ done:
return err;
}
+#ifdef USE_EGL_RPI
static void
gst_omx_video_dec_release_egl_buffer (GstOMXBuffer * buf)
{
@@ -1118,6 +1123,7 @@ gst_omx_video_dec_release_egl_buffer (GstOMXBuffer * buf)
gst_omx_port_release_buffer (buf->port, buf);
}
+#endif
static void
gst_omx_video_dec_loop (GstOMXVideoDec * self)
@@ -1273,7 +1279,7 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
*/
GST_ERROR_OBJECT (self, "No corresponding frame found");
-
+#ifdef USE_EGL_RPI
if (self->out_port_pool) {
outbuf = gst_egl_image_memory_pool_acquire_buffer (self->out_port_pool,
buf->eglimage, buf,
@@ -1283,7 +1289,9 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
goto invalid_buffer;
}
buf = NULL;
- } else {
+ } else
+#endif
+ {
outbuf = gst_video_decoder_alloc_output_buffer (GST_VIDEO_DECODER (self));
if (!gst_omx_video_dec_fill_buffer (self, buf, outbuf)) {
gst_buffer_unref (outbuf);
@@ -1294,6 +1302,7 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
flow_ret = gst_pad_push (GST_VIDEO_DECODER_SRC_PAD (self), outbuf);
} else if (buf->omx_buf->nFilledLen > 0 || buf->eglimage > -1) {
+#ifdef USE_EGL_RPI
if (self->out_port_pool) {
frame->output_buffer =
gst_egl_image_memory_pool_acquire_buffer (self->out_port_pool,
@@ -1310,7 +1319,9 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
gst_video_decoder_finish_frame (GST_VIDEO_DECODER (self), frame);
frame = NULL;
buf = NULL;
- } else {
+ } else
+#endif
+ {
if ((flow_ret =
gst_video_decoder_alloc_output_frame (GST_VIDEO_DECODER
(self), frame)) == GST_FLOW_OK) {