Mercurial > mplayer.hg
annotate help/help_diff.sh @ 23978:ef6e50c3c172
Revert setting audio output channel count for FFmpeg
The FFmpeg API needs to be fixed before this can be done sanely.
ffdca wants the desired output channel count to be set in
avctx->channels. Unfortunately it also completely fails if the requested
number of channels is not available rather than returning a different
amount (if 6 channels are requested we'd probably rather use stereo than
fail completely).
ffvorbis ignores caller-set values in avctx->channels. It writes the
channel count there once during init. This means the caller can only
set the count before init because later there would be no indication
whether the channel count in avctx reflects real output.
ffwma requires the caller to supply the encoded channel count
in avctx->channels during init or it fails. So it is not possible to
set a different number of desired output channels there before init
either.
author | uau |
---|---|
date | Thu, 02 Aug 2007 21:54:14 +0000 |
parents | 60c71a89cd76 |
children | 3ff3bd9bf0f9 |
rev | line source |
---|---|
8538
6973e76d95b2
In this situation it was easier to fix yours. I applied these 3 points
arpi
parents:
7484
diff
changeset
|
1 #!/bin/sh |
6285
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
2 |
10648
96170748b6a9
Reversed + changed grep -q to grep > /dev/null 2>&1. -q is a GNU extension
diego
parents:
10636
diff
changeset
|
3 # This script walks through the master (stdin) help/message file, and |
96170748b6a9
Reversed + changed grep -q to grep > /dev/null 2>&1. -q is a GNU extension
diego
parents:
10636
diff
changeset
|
4 # prints (stdout) only those messages which are missing from the help |
96170748b6a9
Reversed + changed grep -q to grep > /dev/null 2>&1. -q is a GNU extension
diego
parents:
10636
diff
changeset
|
5 # file given as parameter ($1). |
6285
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
6 # |
10648
96170748b6a9
Reversed + changed grep -q to grep > /dev/null 2>&1. -q is a GNU extension
diego
parents:
10636
diff
changeset
|
7 # Example: help_diff.sh help_mp-hu.h < help_mp-en.h > missing.h |
6285
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
8 |
19455
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
9 curr="" |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
10 |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
11 while read -r line; do |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
12 if echo "$line" | grep '^#define' > /dev/null 2>&1; then |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
13 curr=`printf "%s\n" "$line" | cut -d ' ' -f 2` |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
14 if grep "^#define $curr[ ]" $1 > /dev/null 2>&1; then |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
15 curr="" |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
16 fi |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
17 else |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
18 if [ -z "$line" ]; then |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
19 curr="" |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
20 fi |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
21 fi |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
22 |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
23 if [ -n "$curr" ]; then |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
24 printf "%s\n" "$line" |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
25 fi |
60c71a89cd76
Ouch, I mistakenly overwrote the contents from this file with a non-working
diego
parents:
19449
diff
changeset
|
26 done |