mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
plugins: allow builds without GLX enabled for GStreamer 1.2.
Don't try to build GLTextureUploadMeta related code if GLX is not enabled during GStreamer >= 1.2 builds.
This commit is contained in:
parent
6b6c10d94d
commit
c2eabc17dd
3 changed files with 5 additions and 9 deletions
|
@ -37,7 +37,7 @@
|
||||||
#include "gstvaapipluginutil.h"
|
#include "gstvaapipluginutil.h"
|
||||||
#include "gstvaapivideocontext.h"
|
#include "gstvaapivideocontext.h"
|
||||||
#include "gstvaapivideobuffer.h"
|
#include "gstvaapivideobuffer.h"
|
||||||
#if GST_CHECK_VERSION(1,1,0)
|
#if GST_CHECK_VERSION(1,1,0) && USE_GLX
|
||||||
#include "gstvaapivideometa_texture.h"
|
#include "gstvaapivideometa_texture.h"
|
||||||
#endif
|
#endif
|
||||||
#if GST_CHECK_VERSION(1,0,0)
|
#if GST_CHECK_VERSION(1,0,0)
|
||||||
|
@ -341,7 +341,7 @@ gst_vaapidecode_push_decoded_frame(GstVideoDecoder *vdec,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,1,0)
|
#if GST_CHECK_VERSION(1,1,0) && USE_GLX
|
||||||
if (decode->has_texture_upload_meta)
|
if (decode->has_texture_upload_meta)
|
||||||
gst_buffer_ensure_texture_upload_meta(out_frame->output_buffer);
|
gst_buffer_ensure_texture_upload_meta(out_frame->output_buffer);
|
||||||
#endif
|
#endif
|
||||||
|
@ -552,7 +552,7 @@ gst_vaapidecode_decide_allocation(GstVideoDecoder *vdec, GstQuery *query)
|
||||||
config = gst_buffer_pool_get_config(pool);
|
config = gst_buffer_pool_get_config(pool);
|
||||||
gst_buffer_pool_config_add_option(config,
|
gst_buffer_pool_config_add_option(config,
|
||||||
GST_BUFFER_POOL_OPTION_VIDEO_META);
|
GST_BUFFER_POOL_OPTION_VIDEO_META);
|
||||||
#if GST_CHECK_VERSION(1,1,0)
|
#if GST_CHECK_VERSION(1,1,0) && USE_GLX
|
||||||
decode->has_texture_upload_meta = gst_query_find_allocation_meta(query,
|
decode->has_texture_upload_meta = gst_query_find_allocation_meta(query,
|
||||||
GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, NULL);
|
GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, NULL);
|
||||||
if (decode->has_texture_upload_meta)
|
if (decode->has_texture_upload_meta)
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "gstvaapivideobufferpool.h"
|
#include "gstvaapivideobufferpool.h"
|
||||||
#include "gstvaapivideobuffer.h"
|
#include "gstvaapivideobuffer.h"
|
||||||
#include "gstvaapivideomemory.h"
|
#include "gstvaapivideomemory.h"
|
||||||
#if GST_CHECK_VERSION(1,1,0)
|
#if GST_CHECK_VERSION(1,1,0) && USE_GLX
|
||||||
#include "gstvaapivideometa_texture.h"
|
#include "gstvaapivideometa_texture.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ gst_vaapi_video_buffer_pool_alloc_buffer(GstBufferPool *pool,
|
||||||
vmeta->unmap = gst_video_meta_unmap_vaapi_memory;
|
vmeta->unmap = gst_video_meta_unmap_vaapi_memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,1,0)
|
#if GST_CHECK_VERSION(1,1,0) && USE_GLX
|
||||||
if (priv->has_texture_upload_meta)
|
if (priv->has_texture_upload_meta)
|
||||||
gst_buffer_add_texture_upload_meta(buffer);
|
gst_buffer_add_texture_upload_meta(buffer);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -76,9 +76,7 @@ gst_vaapi_texture_upload(GstVideoGLTextureUploadMeta *meta, guint texture_id[4])
|
||||||
return gst_vaapi_texture_put_surface(texture, surface,
|
return gst_vaapi_texture_put_surface(texture, surface,
|
||||||
gst_vaapi_video_meta_get_render_flags(vmeta));
|
gst_vaapi_video_meta_get_render_flags(vmeta));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if GST_CHECK_VERSION(1,1,0)
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_buffer_add_texture_upload_meta(GstBuffer *buffer)
|
gst_buffer_add_texture_upload_meta(GstBuffer *buffer)
|
||||||
{
|
{
|
||||||
|
@ -88,12 +86,10 @@ gst_buffer_add_texture_upload_meta(GstBuffer *buffer)
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
#if USE_GLX
|
|
||||||
meta = gst_buffer_add_video_gl_texture_upload_meta(buffer,
|
meta = gst_buffer_add_video_gl_texture_upload_meta(buffer,
|
||||||
GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL,
|
GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL,
|
||||||
1, tex_type, gst_vaapi_texture_upload,
|
1, tex_type, gst_vaapi_texture_upload,
|
||||||
NULL, NULL, gst_vaapi_texure_upload_free);
|
NULL, NULL, gst_vaapi_texure_upload_free);
|
||||||
#endif
|
|
||||||
return meta != NULL;
|
return meta != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue