#include <gst/gst.h>
+#define DEFAULT_LOCATION "about:blank"
const gchar *gst_wpe_get_devenv_extension_path (void);
gobject_class->finalize = gst_wpe_src_finalize;
g_object_class_install_property (gobject_class, PROP_LOCATION,
- g_param_spec_string ("location", "location", "The URL to display", "",
+ g_param_spec_string ("location", "location", "The URL to display", DEFAULT_LOCATION,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_DRAW_BACKGROUND,
g_param_spec_boolean ("draw-background", "Draws the background",
#include <config.h>
#endif
+#include "gstwpe.h"
#include "gstwpevideosrc.h"
#include <gst/gl/gl.h>
#include <gst/gl/egl/gstglmemoryegl.h>
gst_wpe_video_src_init (GstWpeVideoSrc * src)
{
src->draw_background = DEFAULT_DRAW_BACKGROUND;
+ src->location = g_strdup (DEFAULT_LOCATION);
gst_base_src_set_live (GST_BASE_SRC_CAST (src), TRUE);
g_object_class_install_property (gobject_class, PROP_LOCATION,
g_param_spec_string ("location", "location",
"The URL to display",
- "", (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+ DEFAULT_LOCATION, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_DRAW_BACKGROUND,
g_param_spec_boolean ("draw-background", "Draws the background",
"Whether to draw the WebView background", DEFAULT_DRAW_BACKGROUND,
+building_wpe = false
wpe_feat = get_option('wpe').require(gstgl_dep.found(),
error_message : 'wpe plugin enabled but GL support was not detected')
wpe_extension_install_dir = get_option('prefix') / get_option('libdir') / meson.project_name() / 'wpe-extension'
+building_wpe = true
gstwpe = library('gstwpe',
['WPEThreadedView.cpp', 'gstwpe.cpp', 'gstwpevideosrc.cpp', 'gstwpesrcbin.cpp'],
dependencies : [egl_dep, wpe_dep, wpe_fdo_dep, gstallocators_dep, gstaudio_dep, gstvideo_dep,
endif
tests = [
- 'opencv/cvtracker'
+ {'path': 'opencv/cvtracker'},
+ {'path': 'wpe/load_bytes_first', 'skip': not building_wpe},
]
env = environment()
'gst-plugins-bad@' + meson.project_build_root())
foreach t: tests
- test_dir_name = t.split('/')
- test_name = 'validate'
- foreach c: test_dir_name
- test_name += '.' + c
- endforeach
- test_env = env
- test_env.set('GST_VALIDATE_LOGSDIR', join_paths(meson.current_build_dir(), test_name))
- test_file = join_paths(meson.current_source_dir(), t + '.validatetest')
- test(test_name, gst_tester, args: [test_file, '--use-fakesinks'],
- env: test_env, timeout : 3 * 60, protocol: 'tap')
+ if not t.get('skip', false)
+ test_dir_name = t.get('path').split('/')
+ test_name = 'validate'
+ foreach c: test_dir_name
+ test_name += '.' + c
+ endforeach
+ test_env = env
+ test_env.set('GST_VALIDATE_LOGSDIR', join_paths(meson.current_build_dir(), test_name))
+ test_file = join_paths(meson.current_source_dir(), t.get('path') + '.validatetest')
+ test(test_name, gst_tester, args: [test_file, '--use-fakesinks'],
+ env: test_env, timeout : 3 * 60, protocol: 'tap')
+ endif
endforeach
--- /dev/null
+meta,
+ args = {
+ "wpesrc name=wpesrc ! queue ! video/x-raw,width=480,height=270 ! fakesink name=sink",
+ }
+
+check-last-sample, checksum=e16c8ac11b4ad92e26abab2743d609f4c3ac2e37, playback-time=0.1
+emit-signal,
+ signal-name="load-bytes",
+ target-element-name="wpesrc",
+ params=< "<h1>test<h1>", >
+
+check-last-sample, checksum=8c0eb7a26cf0cb4cb3095a2a6f2d28c97be15874, playback-time=1.0
+stop;