зеркало из https://github.com/mozilla/gecko-dev.git
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
c79eb6f91f
So, we have 4 boolean variables and here is the truth table. Case 1, 2, 3, 4, 7, 8, 10 and 12 are not possible to happen. Then, the remaining cases could be clustered into three categories: (1) Case 5, 9 and 13: no sample is demuxed at all, return 0. (2) Case 6, 11, 14 and 15: either audio or video is able to be demuxed, return the known value. (3) Case 15: both audio and video are demuxed, return the minimum of the values. For simplifying the logic, I will initialize the audioStartTime and videoStartTime to be INFINITY if we don't have the first-demuxed sample, otherwise, initialize them to be the real first-demuxed sample's time. Then, the final calculation will be: (1) Case 5, 9 and 13: the minimum of two INFINITY values is still INFINITY, return 0. (2) Case 6, 11, 14 and 15: return the minimum of one real first-demuxed-time and the INFINITY. (3) Case 15: return the minimum of two real first-demuxed-time values. Case HasAudio HasVideo HasAudioSample HasVideoSample ExpectedResult --------------------------------------------------------------------------------------------------- 1 F F F F not possible 2 F F F T not possible 3 F F T F not possible 4 F F T T not possible --------------------------------------------------------------------------------------------------- 5 F T F F return 0 6 F T F T return video sample 7 F T T F not possible 8 F T T T not possible --------------------------------------------------------------------------------------------------- 9 T F F F return 0 10 T F F T not possible 11 T F T F return audio sample 12 T F T T not possible --------------------------------------------------------------------------------------------------- 13 T T F F return 0 14 T T F T return videoSample 15 T T T F return audioSample 16 T T T T return min(auidoSample, videoSample) MozReview-Commit-ID: ANsYDth7slJ --HG-- extra : transplant_source : %DAj%1A%EC%19%82%7B%B3%05%FE%21%04a%16%9A%9F%18x1%95 |
||
---|---|---|
accessible | ||
addon-sdk | ||
b2g | ||
browser | ||
build | ||
caps | ||
chrome | ||
config | ||
db/sqlite3 | ||
devtools | ||
docshell | ||
dom | ||
editor | ||
embedding | ||
extensions | ||
gfx | ||
gradle/wrapper | ||
hal | ||
image | ||
intl | ||
ipc | ||
js | ||
layout | ||
media | ||
memory | ||
mfbt | ||
mobile | ||
modules | ||
mozglue | ||
netwerk | ||
nsprpub | ||
other-licenses | ||
parser | ||
probes | ||
python | ||
rdf | ||
release/docker | ||
security | ||
services | ||
startupcache | ||
storage | ||
taskcluster | ||
testing | ||
toolkit | ||
tools | ||
uriloader | ||
view | ||
widget | ||
xpcom | ||
xpfe | ||
.clang-format | ||
.clang-format-ignore | ||
.eslintignore | ||
.eslintrc | ||
.flake8 | ||
.gdbinit | ||
.gdbinit_python | ||
.gitignore | ||
.hgignore | ||
.hgtags | ||
.lldbinit | ||
.taskcluster.yml | ||
.ycm_extra_conf.py | ||
AUTHORS | ||
Android.mk | ||
CLOBBER | ||
GNUmakefile | ||
LEGAL | ||
LICENSE | ||
Makefile.in | ||
README.txt | ||
aclocal.m4 | ||
build.gradle | ||
client.mk | ||
client.py | ||
configure.in | ||
configure.py | ||
gradle.properties | ||
gradlew | ||
mach | ||
moz.build | ||
moz.configure | ||
mozilla-config.h.in | ||
old-configure.in | ||
settings.gradle | ||
test.mozbuild |
README.txt
An explanation of the Mozilla Source Code Directory Structure and links to project pages with documentation can be found at: https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure For information on how to build Mozilla from the source code, see: http://developer.mozilla.org/en/docs/Build_Documentation To have your bug fix / feature added to Mozilla, you should create a patch and submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at: http://developer.mozilla.org/en/docs/Creating_a_patch http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree If you have a question about developing Mozilla, and can't find the solution on http://developer.mozilla.org, you can try asking your question in a mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups are accessible on Google Groups, or news.mozilla.org with a NNTP reader.] You can download nightly development builds from the Mozilla FTP server. Keep in mind that nightly builds, which are used by Mozilla developers for testing, may be buggy. Firefox nightlies, for example, can be found at: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - or - http://nightly.mozilla.org/