diff -r -u -X diff.exclude myth.14972.1127a/mythplugins/mythmusic/mythmusic/main.cpp myth.14972.1127b/mythplugins/mythmusic/mythmusic/main.cpp
|
|
|
512 | 512 | return 0; |
513 | 513 | } |
514 | 514 | |
| 515 | int mythplugin_pause(void) |
| 516 | { |
| 517 | if (gPlayer) |
| 518 | gPlayer->stop(true); |
| 519 | return 0; |
| 520 | } |
| 521 | |
| 522 | int mythplugin_resume(void) |
| 523 | { |
| 524 | showMiniPlayer(); |
| 525 | return 0; |
| 526 | } |
| 527 | |
| 528 | |
| 529 | |
515 | 530 | int mythplugin_config(void) |
516 | 531 | { |
517 | 532 | MusicData *mdata = new MusicData(); |
diff -r -u -X diff.exclude myth.14972.1127a/mythtv/libs/libmyth/mythplugin.cpp myth.14972.1127b/mythtv/libs/libmyth/mythplugin.cpp
|
|
|
47 | 47 | rfunc(); |
48 | 48 | } |
49 | 49 | |
| 50 | void MythPlugin::pause(void) |
| 51 | { |
| 52 | typedef int (*PluginPauseFunc)(); |
| 53 | PluginPauseFunc rfunc = (PluginPauseFunc)QLibrary::resolve("mythplugin_pause"); |
| 54 | |
| 55 | if (rfunc) |
| 56 | rfunc(); |
| 57 | } |
| 58 | |
| 59 | void MythPlugin::resume(void) |
| 60 | { |
| 61 | typedef int (*PluginResumeFunc)(); |
| 62 | PluginResumeFunc rfunc = (PluginResumeFunc)QLibrary::resolve("mythplugin_resume"); |
| 63 | |
| 64 | if (rfunc) |
| 65 | rfunc(); |
| 66 | } |
| 67 | |
50 | 68 | void MythPlugin::config(void) |
51 | 69 | { |
52 | 70 | typedef int (*PluginConfigFunc)(); |
… |
… |
|
283 | 301 | menuPluginList.clear(); |
284 | 302 | } |
285 | 303 | |
| 304 | void MythPluginManager::PauseAllPlugins(void) |
| 305 | { |
| 306 | QDictIterator<MythPlugin> it(m_dict); |
| 307 | for (; it.current(); ++it) |
| 308 | { |
| 309 | MythPlugin *plugin = it.current(); |
| 310 | plugin->pause(); |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | void MythPluginManager::ResumeAllPlugins(void) |
| 315 | { |
| 316 | QDictIterator<MythPlugin> it(m_dict); |
| 317 | for (; it.current(); ++it) |
| 318 | { |
| 319 | MythPlugin *plugin = it.current(); |
| 320 | plugin->resume(); |
| 321 | } |
| 322 | } |
| 323 | |
diff -r -u -X diff.exclude myth.14972.1127a/mythtv/libs/libmyth/mythplugin.h myth.14972.1127b/mythtv/libs/libmyth/mythplugin.h
|
|
|
28 | 28 | |
29 | 29 | // This method will call the mythplugin_run() function of the library. |
30 | 30 | void run(void); |
| 31 | |
| 32 | // This method will call the mythplugin_pause() function of the library. |
| 33 | void pause(void); |
| 34 | |
| 35 | // This method will call the mythplugin_resume() function of the library. |
| 36 | void resume(void); |
31 | 37 | |
32 | 38 | // This method will call the mythplugin_config() function of the library. |
33 | 39 | void config(void); |
… |
… |
|
76 | 82 | MythPlugin *GetMenuPluginAt(int pos); |
77 | 83 | |
78 | 84 | void DestroyAllPlugins(); |
| 85 | void PauseAllPlugins(); |
| 86 | void ResumeAllPlugins(); |
79 | 87 | |
80 | 88 | private: |
81 | 89 | QDict<MythPlugin> m_dict; |
diff -r -u -X diff.exclude myth.14972.1127a/mythtv/libs/libmyth/mythpluginapi.h myth.14972.1127b/mythtv/libs/libmyth/mythpluginapi.h
|
|
|
7 | 7 | extern "C" { |
8 | 8 | MPUBLIC int mythplugin_init(const char *); |
9 | 9 | MPUBLIC int mythplugin_run(); |
| 10 | MPUBLIC int mythplugin_pause(); |
| 11 | MPUBLIC int mythplugin_resume(); |
10 | 12 | MPUBLIC int mythplugin_config(); |
11 | 13 | MPUBLIC MythPluginType mythplugin_type(); |
12 | 14 | MPUBLIC void mythplugin_destroy(); |
diff -r -u -X diff.exclude myth.14972.1127a/mythtv/libs/libmythtv/tv_play.cpp myth.14972.1127b/mythtv/libs/libmythtv/tv_play.cpp
|
|
|
41 | 41 | #include "datadirect.h" |
42 | 42 | #include "sourceutil.h" |
43 | 43 | #include "util-osx-cocoa.h" |
| 44 | #include "mythplugin.h" |
44 | 45 | |
45 | 46 | #ifndef HAVE_ROUND |
46 | 47 | #define round(x) ((int) ((x) + 0.5)) |
… |
… |
|
1161 | 1162 | } |
1162 | 1163 | |
1163 | 1164 | gContext->DisableScreensaver(); |
| 1165 | gContext->getPluginManager()->PauseAllPlugins(); |
1164 | 1166 | |
1165 | 1167 | bool ok = false; |
1166 | 1168 | if (playbackinfo && StartRecorder(recorder,-1)) |
… |
… |
|
1217 | 1219 | if (prbuffer->IsOpen()) |
1218 | 1220 | { |
1219 | 1221 | gContext->DisableScreensaver(); |
| 1222 | gContext->getPluginManager()->PauseAllPlugins(); |
1220 | 1223 | |
1221 | 1224 | if (desiredNextState == kState_WatchingRecording) |
1222 | 1225 | { |