Skip to content

Commit ccdce60

Browse files
committed
[SoftCSA] Defer skin notification until SoftDecoder has a running decoder
When switching between SoftCSA channels, the skin was notified via evUpdatedInfo immediately after SoftDecoder takeover. At that point the SoftDecoder's hardware decoder does not exist yet (it is created only after the first CW arrives), so getVideoHeight() returns -1. The skin falls back to eAVControl which reads /proc/stb/vmpeg/0/yres from the just-released HW decoder, returning 0. This causes the HD icon to grey out. On platforms where VIDEO_EVENT_SIZE_CHANGED is suppressed for identical resolutions (e.g. VU Solo4K), the icon never recovers. Add a m_decoder_ready signal to eDVBSoftDecoder, fired after the decoder reaches PLAY state. eDVBServicePlay defers the evUpdatedInfo notification until this signal arrives, ensuring the skin queries valid video info.
1 parent ae1921a commit ccdce60

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

lib/service/servicedvb.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4448,12 +4448,13 @@ void eDVBServicePlay::onSessionActivated(bool active)
44484448

44494449
eDebug("[eDVBServicePlay] SoftDecoder takeover complete");
44504450

4451-
// Notify listeners (skin converters) that service info has changed (IsSoftCSA icon display)
4452-
m_event((iPlayableService*)this, evUpdatedInfo);
4451+
// Connect decoder-ready signal: SoftDecoder fires this after decoder PLAY,
4452+
// when video info is actually queryable. We defer evUpdatedInfo until then
4453+
// to avoid the skin querying -1 values before the decoder exists.
4454+
m_soft_decoder->m_decoder_ready.connect(
4455+
sigc::mem_fun(*this, &eDVBServicePlay::onSoftDecoderReady));
44534456

4454-
// Reset video info flag - a second evUpdatedInfo will be sent when first video event arrives
4455-
// This is needed because some skins query video resolution only on evUpdatedInfo
4456-
// and the decoder hasn't analyzed any frames yet at this point
4457+
// Reset video info flag - will be set on first video size event from decoder
44574458
m_soft_decoder_video_info_valid = false;
44584459
}
44594460
else if (!active && m_soft_decoder)
@@ -4468,6 +4469,12 @@ void eDVBServicePlay::onSessionActivated(bool active)
44684469
}
44694470
}
44704471

4472+
void eDVBServicePlay::onSoftDecoderReady()
4473+
{
4474+
eDebug("[eDVBServicePlay] SoftDecoder decoder ready - notifying skin");
4475+
m_event((iPlayableService*)this, evUpdatedInfo);
4476+
}
4477+
44714478
void eDVBServicePlay::onSoftDecoderAudioPidSelected(int pid)
44724479
{
44734480
// SoftDecoder selected an audio track - update our tracking variable

lib/service/servicedvb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ class eDVBServicePlay : public eDVBServiceBase,
355355
// Software descrambling
356356
virtual void setupSpeculativeDescrambling();
357357
void onSessionActivated(bool active);
358+
void onSoftDecoderReady();
358359
void onSoftDecoderAudioPidSelected(int pid);
359360
void cleanupSoftwareDescrambling();
360361

lib/service/servicedvbsoftdecoder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ void eDVBSoftDecoder::updateDecoder(int vpid, int vpidtype, int pcrpid)
688688
{
689689
m_decoder->play();
690690
eDebug("[eDVBSoftDecoder] Decoder PLAY with vpid=%04x vpidtype=%d", vpid, vpidtype);
691+
m_decoder_ready();
691692
}
692693
else
693694
{

lib/service/servicedvbsoftdecoder.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ class eDVBSoftDecoder : public iObject, public sigc::trackable
8989
// Audio track selection signal (notifies parent when SoftDecoder selects audio)
9090
sigc::signal<void(int)> m_audio_pid_selected;
9191

92+
// Decoder ready signal (fired after decoder PLAY, video info now queryable)
93+
sigc::signal<void()> m_decoder_ready;
94+
9295
private:
9396
eDVBServicePMTHandler& m_source_handler;
9497
eDVBServicePMTHandler m_pvr_handler; // Separate PVR handler for decode demux

0 commit comments

Comments
 (0)