Skip to content
Snippets Groups Projects
Commit 21616e94 authored by Pierre Lamot's avatar Pierre Lamot Committed by Steve Lhomme
Browse files

qt: provide a stubbed medialib implementation for qt tests

Only the entry points exists, this is not designed to mock medialibrary
behaviors
parent 346c18b7
No related branches found
No related tags found
1 merge request!6550qt: add test for edge case of MLBaseModel
......@@ -33,6 +33,7 @@
#include <vlc_probe.h>
#include <vlc_interface.h>
#include <vlc_player.h>
#include <vlc_media_library.h>
#include "../../../../lib/libvlc_internal.h"
......@@ -111,6 +112,38 @@ static void CloseIntf( vlc_object_t *p_this )
testenv->intf = nullptr;
}
//Medialib module
static void* MLGet( vlc_medialibrary_module_t* module, int query, va_list args )
{
return nullptr;
}
static int MLList( vlc_medialibrary_module_t* module, int query,
const vlc_ml_query_params_t* params, va_list args )
{
return VLC_EGENERIC;
}
static int MLControl( vlc_medialibrary_module_t* module, int query, va_list args )
{
return VLC_EGENERIC;
}
static int MLOpen( vlc_object_t* obj )
{
auto* p_ml = reinterpret_cast<vlc_medialibrary_module_t*>( obj );
p_ml->pf_control = MLControl;
p_ml->pf_get = MLGet;
p_ml->pf_list = MLList;
return VLC_SUCCESS;
}
static void MLClose( vlc_object_t* obj )
{
VLC_UNUSED(obj);
}
//module declaration
vlc_module_begin()
......@@ -123,6 +156,9 @@ add_submodule()
add_submodule()
set_capability("renderer probe", 10000)
set_callback(vlc_rd_probe_open)
add_submodule()
set_capability("medialibrary", 10000)
set_callbacks(MLOpen, MLClose)
vlc_module_end()
extern "C" {
......@@ -148,7 +184,7 @@ VLCTestingEnv::~VLCTestingEnv()
}
static const char * test_defaults_args[] = {
"-v", "--vout=vdummy", "--aout=adummy", "--text-renderer=tdummy",
"-v", "--vout=vdummy", "--aout=adummy", "--text-renderer=tdummy", "--media-library"
};
static const int test_defaults_nargs =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment