equal
deleted
inserted
replaced
31 // mpx playeris name is mpx.exe in 5.0. |
31 // mpx playeris name is mpx.exe in 5.0. |
32 // it is musicplayer.exe in 3.2. |
32 // it is musicplayer.exe in 3.2. |
33 _LIT(KMpxPlayerExeName, "mpx.exe"); |
33 _LIT(KMpxPlayerExeName, "mpx.exe"); |
34 |
34 |
35 _LIT(KMpxPlayerSearchPatternBySID, "*102072c3*"); |
35 _LIT(KMpxPlayerSearchPatternBySID, "*102072c3*"); |
|
36 _LIT(KVideoPlayerSearchPatternBySID, "*200159B2*"); |
36 |
37 |
37 static const TInt KPlayCmdToPlayerDelay = 6000000; // value will be tuned later |
38 static const TInt KPlayCmdToPlayerDelay = 6000000; // value will be tuned later |
38 |
39 |
39 // ================= MEMBER FUNCTIONS ======================= |
40 // ================= MEMBER FUNCTIONS ======================= |
40 |
41 |
241 // unfinished business ongoing, eat the event. |
242 // unfinished business ongoing, eat the event. |
242 if (IsActive()) |
243 if (IsActive()) |
243 { |
244 { |
244 return; |
245 return; |
245 } |
246 } |
246 if (!IsMusicPlayerRunning()) |
247 if (!IsMusicPlayerRunning() && !IsVideoPlayerRunning()) |
247 { |
248 { |
248 TRAPD(err, LaunchMusicPlayerL()); |
249 TRAPD(err, LaunchMusicPlayerL()); |
249 // Send the response of play command to remote device |
250 // Send the response of play command to remote device |
250 iCoreTarget->PlayResponse(iStatus, err); |
251 iCoreTarget->PlayResponse(iStatus, err); |
251 SetActive(); |
252 SetActive(); |
257 { |
258 { |
258 TRACE_FUNC |
259 TRACE_FUNC |
259 // Music player is running if we can find a thread whose name contains |
260 // Music player is running if we can find a thread whose name contains |
260 // S60 Music Player's SID. |
261 // S60 Music Player's SID. |
261 TFindThread findt(KMpxPlayerSearchPatternBySID); |
262 TFindThread findt(KMpxPlayerSearchPatternBySID); |
|
263 TFullName result; |
|
264 TBool running(EFalse); |
|
265 if (!findt.Next(result)) |
|
266 { |
|
267 TRACE_INFO((_L("Thread '%S'is found"), &result)); |
|
268 running = ETrue; |
|
269 } |
|
270 return running; |
|
271 } |
|
272 |
|
273 TBool CPlayerStarter::IsVideoPlayerRunning() |
|
274 { |
|
275 TRACE_FUNC |
|
276 // Video player is running if we can find a thread whose name contains |
|
277 // Video Player's SID. |
|
278 TFindThread findt(KVideoPlayerSearchPatternBySID); |
262 TFullName result; |
279 TFullName result; |
263 TBool running(EFalse); |
280 TBool running(EFalse); |
264 if (!findt.Next(result)) |
281 if (!findt.Next(result)) |
265 { |
282 { |
266 TRACE_INFO((_L("Thread '%S'is found"), &result)); |
283 TRACE_INFO((_L("Thread '%S'is found"), &result)); |