mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
tests: check for shared VA displays (display cache).
This commit is contained in:
parent
674ea91faa
commit
58e5534c56
1 changed files with 12 additions and 1 deletions
|
@ -29,6 +29,9 @@
|
||||||
#include "test-h264.h"
|
#include "test-h264.h"
|
||||||
#include "test-vc1.h"
|
#include "test-vc1.h"
|
||||||
|
|
||||||
|
/* Set to 1 to check display cache works (shared VA display) */
|
||||||
|
#define CHECK_DISPLAY_CACHE 1
|
||||||
|
|
||||||
typedef void (*GetVideoInfoFunc)(VideoDecodeInfo *info);
|
typedef void (*GetVideoInfoFunc)(VideoDecodeInfo *info);
|
||||||
|
|
||||||
typedef struct _CodecDefs CodecDefs;
|
typedef struct _CodecDefs CodecDefs;
|
||||||
|
@ -76,7 +79,7 @@ int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
GOptionContext *options;
|
GOptionContext *options;
|
||||||
GstVaapiDisplay *display;
|
GstVaapiDisplay *display, *display2;
|
||||||
GstVaapiWindow *window;
|
GstVaapiWindow *window;
|
||||||
GstVaapiDecoder *decoder;
|
GstVaapiDecoder *decoder;
|
||||||
GstCaps *decoder_caps;
|
GstCaps *decoder_caps;
|
||||||
|
@ -109,6 +112,13 @@ main(int argc, char *argv[])
|
||||||
if (!display)
|
if (!display)
|
||||||
g_error("could not create VA display");
|
g_error("could not create VA display");
|
||||||
|
|
||||||
|
if (CHECK_DISPLAY_CACHE)
|
||||||
|
display2 = gst_vaapi_display_x11_new(NULL);
|
||||||
|
else
|
||||||
|
display2 = g_object_ref(display);
|
||||||
|
if (!display2)
|
||||||
|
g_error("could not create second VA display");
|
||||||
|
|
||||||
window = gst_vaapi_window_x11_new(display, win_width, win_height);
|
window = gst_vaapi_window_x11_new(display, win_width, win_height);
|
||||||
if (!window)
|
if (!window)
|
||||||
g_error("could not create window");
|
g_error("could not create window");
|
||||||
|
@ -163,6 +173,7 @@ main(int argc, char *argv[])
|
||||||
g_object_unref(decoder);
|
g_object_unref(decoder);
|
||||||
g_object_unref(window);
|
g_object_unref(window);
|
||||||
g_object_unref(display);
|
g_object_unref(display);
|
||||||
|
g_object_unref(display2);
|
||||||
g_free(g_codec_str);
|
g_free(g_codec_str);
|
||||||
gst_deinit();
|
gst_deinit();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue