Hi,
is there a special reason that SetPlayMode() is always called with "pmAudioVideo" even on radio channels instead of pmAudioOnly or pmAudioOnlyBlack? It would make things much easier if it would do so (for displaying a background image). Can you give me a hint where I could change this?
cheers, Tim
Thiemo wrote:
Hi,
is there a special reason that SetPlayMode() is always called with "pmAudioVideo" even on radio channels instead of pmAudioOnly or pmAudioOnlyBlack? It would make things much easier if it would do so (for displaying a background image). Can you give me a hint where I could change this?
"pmAudioVideo" is the default play mode for VDR, and by itself VDR doesn't use anything else. This was introduced in case a plugin wants to implement a player that needs a different play mode.
When replaying a recording, VDR sets up a cDvbPlayerControl in cReplayControl::cReplayControl(), which in turn creates a cDvbPlayer. If you want to use a different play mode for radio recordings, you'll need to first know in cReplayControl::cReplayControl() that this actually is an audio-only recording, and then hand down the desired play mode to the cPlayer.
Klaus
Hi,
Klaus Schmidinger wrote:
When replaying a recording, VDR sets up a cDvbPlayerControl in cReplayControl::cReplayControl(), which in turn creates a cDvbPlayer. If you want to use a different play mode for radio recordings, you'll need to first know in cReplayControl::cReplayControl() that this actually is an audio-only recording, and then hand down the desired play mode to the cPlayer.
For the radio plugin I've contributed the following code which detects whether a VDR recording (given by FileName) is a radio recording.
bool isRadio = false;
cFileName fn(FileName, false, true); cUnbufferedFile *f = fn.Open(); if (f) { uchar b[4] = { 0x00, 0x00, 0x00, 0x00 }; ReadFrame(f, b, sizeof (b), sizeof (b)); fn.Close(); isRadio = (b[0] == 0x00) && (b[1] == 0x00) && (b[2] == 0x01) && (0xc0 <= b[3] && b[3] <= 0xdf); }
As video recordings always start with a video PES packet, testing for an audio PES packet should be sufficient.
Bye.
Am Freitag, 26. Januar 2007 15:32 schrieb Klaus Schmidinger:
Thiemo wrote:
Hi,
is there a special reason that SetPlayMode() is always called with "pmAudioVideo" even on radio channels instead of pmAudioOnly or pmAudioOnlyBlack? It would make things much easier if it would do so (for displaying a background image). Can you give me a hint where I could change this?
"pmAudioVideo" is the default play mode for VDR, and by itself VDR doesn't use anything else. This was introduced in case a plugin wants to implement a player that needs a different play mode.
When replaying a recording, VDR sets up a cDvbPlayerControl in
maybe you got me wrong - i don't want this for replaying a recording but for live-broadcasts. (although replaying is an issue i did not think about yet).
currently its realy a pain finding out if a stream is audio-only or not in the mpeg-player (where it does not belong imho).
t.
On Wednesday 31 January 2007 14:13, Thiemo wrote:
Am Freitag, 26. Januar 2007 15:32 schrieb Klaus Schmidinger:
Thiemo wrote:
Hi,
is there a special reason that SetPlayMode() is always called with "pmAudioVideo" even on radio channels instead of pmAudioOnly or pmAudioOnlyBlack? It would make things much easier if it would do so (for displaying a background image). Can you give me a hint where I could change this?
"pmAudioVideo" is the default play mode for VDR, and by itself VDR doesn't use anything else. This was introduced in case a plugin wants to implement a player that needs a different play mode.
When replaying a recording, VDR sets up a cDvbPlayerControl in
maybe you got me wrong - i don't want this for replaying a recording but for live-broadcasts. (although replaying is an issue i did not think about yet).
currently its realy a pain finding out if a stream is audio-only or not in the mpeg-player (where it does not belong imho).
What would be nice is something like bool cRecording::IsRadio(). I was going to have a go at incorporating the code posted on this thread the other day by Reinhard Nissl but haven't got round to it yet.
This could then also be used when determining recording lengths, skipping, etc. rather than treating all timings as video.
Having said that, I tried to record a couple of sample bits of a radio channel the other day and they were pretty broken.
:(
Do radio recordings still work for other people or have I managed to break something?! I used to make quite a few but haven't done so in a while. This is vdr-1.5.0 and softdevice cvs.
Cheers,
Laz
Am Mittwoch, 31. Januar 2007 17:05 schrieb Laz:
currently its realy a pain finding out if a stream is audio-only or not in the mpeg-player (where it does not belong imho).
What would be nice is something like bool cRecording::IsRadio().
Why reinventing the wheel if pmAudioOnly is already there?
Even more, one could already either set pmAudioOnly or pmAudioOnlyBlack depending if the mpeg-player should or should not show a background picture (i.e. for the mp3 pi which shows its own backgrounds) this won't be possible with the bool solution...
t.