[mythtv] [PATCH] MythVideo & Mediamonitoring (suite)
Xavier Hervy
maxpower44 at tiscali.fr
Sat Jun 12 06:52:37 EDT 2004
Xavier Hervy wrote:
> Like i said, i would have a function like this :
> QValueList<MythMediaDevice> MythContext::GetMedias(MediaType)
>
> For this, i made in MediaMonitor:
> - this function QValueList<MythMediaDevice>
> MediaMonitor::GetMedias(MediaType) that return all avaiable device which
> have type equal MediaType
>
> - and in MythContext :
> - setMediaMonitoring(MediaMonitoring * media_monitoring) then
> MythContext have a pointer on mediamonitoring (colled in
> mythfrontend/main.cpp
> - QValueList<MythMediaDevice> MythContext::GetMedias(MediaType) that
> called MediaMonitor::GetMedias(MediaType)
>
> - and i include mythmedia.h and mythmediamonitor.
>
> Then in videotree, i would ask mediatype MEDIATYPE_DATA like this :
>
> QValueList<MythMediaDevice> medias gContext->GetMedias(MEDIATYPE_DATA).
>
> When i compile and install mythtv, i have no error.
> but when i compile mythvideo, the compiler say that i don't find
> mythmediamonitoring.h and mythmedia.h in mythcontext.h.
>
> What is wrong ?
> Any help will be appreciate.
> i send the compilater error message (in french sorry)
>
> Xavier
>
>
> ------------------------------------------------------------------------
>
> Dans le fichier inclus à partir de metadata.h:7,
> Ã partir de main.cpp:19:
> /usr/local/include/mythtv/mythcontext.h:18:30: mythmediamonitor.h: Aucun fichier ou répertoire de ce type
> /usr/local/include/mythtv/mythcontext.h:19:23: mythmedia.h: Aucun fichier ou répertoire de ce type
> Dans le fichier inclus à partir de metadata.h:7,
> Ã partir de main.cpp:19:
> /usr/local/include/mythtv/mythcontext.h:166: « MediaMonitor » n'a pas été
> déclaré dans cet horizon
> /usr/local/include/mythtv/mythcontext.h:166: « media_monitor » n'a pas été
> déclaré dans cet horizon
> /usr/local/include/mythtv/mythcontext.h:166: initialisation de données membres
> invalide
> /usr/local/include/mythtv/mythcontext.h:166: (utiliser «=» pour initialiser
> les données de membres)
> /usr/local/include/mythtv/mythcontext.h:166: variable ou champ «
> SetMediaMonitor » déclaré «void »
> /usr/local/include/mythtv/mythcontext.h:167: « MythMediaDevice » n'a pas
> été déclaré dans cet horizon
> /usr/local/include/mythtv/mythcontext.h:167: erreur d'analyse syntaxique
> avantle jeton « > »
> make[1]: *** [main.o] Erreur 1
> make: *** [sub-mythvideo] Erreur 2
>
>
To fix this, i add "INCLUDEPATH += $${PREFIX}/include/mythtv" in
setting.pro of mythvideo plugin. then whe should do this for each plugin.
I also can create a flag INPLUGIN that allow alternatif include in
mythcontext like this :
ifdef MYTH_PLUGIN
#include <mythtv/mythmediamonitor.h>
#include <mythtv/mythmediar.h>
elseif
#include <mythmediamonitor.h>
#include <mythmediar.h>
endif
and define MYTH_PLUGIN somewhere in each plugin
Which solution did you prefer ?
Xavier
More information about the mythtv-dev
mailing list