[MPlayer-dev-eng] [PATCH] Return actual current stream id in slave mode

Adrian Stutz adrian at sttz.ch
Sun Dec 27 15:22:37 CET 2009


On Sun, Dec 27, 2009 at 1:49 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> Well, which you did with the other patch, but even with that when audio
> is disabled you would say "ANS_ERROR=UNAVAILABLE" when actually it is
> disabled which is just wrong (also, audio being disabled is not really
> an error in getting the current audio track, is it?).

The behavior is the same as with the old code: If I played a movie
without audio track or used -nosound then "get_property switch_audio"
would return "Failed to get value of property 'switch_audio'". I guess
sh_audio, which was used before, is NULL in those cases. Letting
switch_audio return -2 is new behavior.

I don't care if it returns -2 instead of an error. I kept it in line
with the old behavior because it doesn't bother me if it returns an
error in that case.

Also, how would you check if audio is disabled instead of actually
unavailable? The audio id is -2 in both of those cases.

On Sun, Dec 27, 2009 at 2:58 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> Implemented with some fixes (e.g. distinguishing between a "unknown
> property" error and a truly unknown error).
> Also small cleanups like added const and static where appropriate etc.
> Tell me if you spot any problems with this.

On Sun, Dec 27, 2009 at 3:14 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> I am not really sure how to handle this best, so for now I just changed
> the parts I consider non-controversial.
> It does mean that frontends would have to recognize and handle the == -1
> and == -2 return values specially so far though.

Thanks! Works for me.

What I care for is the current stream id. For my current use case
(labeling the currently playing streams) this is enough and the edge
cases are not that important.

Greetings
Adrian



More information about the MPlayer-dev-eng mailing list