Hi Dominic,
Thanks for your reply and I split your reply into separate items then continue
to discuss them.
1. About syncing between DeviceStorage.properties, nsMediaSniffer and
nsExternalHelperAppService.
Marco: Good suggestion and we already tried to discuss it on Bug 859711.
Welcome to join there.
2. error handling ui is a good choice.
Marco: This is a good following item too. May I know the bug number about
this?
3. About filtering whether audio file can be playable or not?
Marco: I tried to trace the filtering flow of Music app and it will be
step a. To find signatures which is mapped to some media file spec by music
app itself.
step b. If a is failed then using audio.canPlayType() to judge.
step c. If b is still failed then try set up audio tag and wait "canplay"
event. (this will really create a decoder)
What I want to clarify here is focused on step a & b not step c. One role
in audio.canPlayType() is nsMediaSniffer and
it did the same thing with what Music app did on step a. Also
audio.canPlayType() doesn't really create a decoder and try to decode it.
So if there is no performance issue between step a & b
3-Q:May I know is there any other reason we need to duplicate step b as
step a and do it again by Music app?
Thanks,
Sincerely yours.
----- Original Message -----
From: "Dominic Kuo" <[email protected]>
To: "Marco Chen" <[email protected]>
Cc: "Paul Adenot" <[email protected]>, "dev-b2g" <[email protected]>
Sent: Friday, May 3, 2013 8:28:46 PM
Subject: Re: [b2g] [Media] The media filter between Gaia - music app and Gecko
- nsMediaSniffer & nsExternalHelperAppService
Hi Marco,
I think before synchronizing the supported formats in Gaia and Gecko, maybe
Gecko can
first sync with DeviceStorage.properties, nsMediaSniffer and
nsExternalHelperAppService.
Music app uses MediaDB which integrates the DeviceStorage API and the IndexedDB
API,
and DeviceStorage will return files to be parsed with metadata parser in Music
app.
Because DeviceStorage returns formats base on DeviceStorage.properties, if we
already
know some formats are not supported in Gecko, we shouldn't pass them to the
metadata
parser, also MediaDB will not record them and not to mention they will not be
listed
in Music app. And for the known supported formats, nsExternalHelperAppService
should
not block them, right?
If we filter out the unsupported formats with the first step, it's still
possible that
some supported formats/containers with unsupported encodings will be recorded
in MediaDB,
and when Music app tries to play them, we might still encounter the error of
"Warning: HTTP "Content-Type" of "audio/xxx" is not supported."
But does using only the logic of audio.canPlayType() to judge files can
playable or not
solve this problem? I guess probably, but the metadata parsing time will take
even longer
because we have to try to decode every files before we parse the metadata, I am
not sure
how long it takes to decode one audio file, but certainly it saves time if we
parse files
without decoding them first.
I am thinking that maybe error handling ui is a good choice if we cannot
guarantee the
so-called "audio" files listed in Music app can be playable or not.
Cheers,
Dominic
----- Original Message -----
From: "Marco Chen" <[email protected]>
To: "dev-b2g" <[email protected]>
Cc: "Paul Adenot" <[email protected]>
Sent: Friday, May 3, 2013 6:46:00 PM
Subject: [b2g] [Media] The media filter between Gaia - music app and Gecko -
nsMediaSniffer & nsExternalHelperAppService
Hi all,
Even this topic seems to be related to media (dev-media) but according it also
related to Gaia and b2g I post it to dev-b2g first.
Issue:
Currently, we met a bug about some files which can be listed by Music app but
can't play by Gecko.
The main reason is that there are two media sniffer mechanism performed by
Gaia and Gecko separately.
Detail:
Gaia: Music app used media sniffer mechanism from metadata.js which will try
to parse metadata by itself in first.
If first step is failed then fall into Gecko's mechanism
(audio.canPlayType())
Gecko:nsMediaSniffer implemented metadata parsing for some media type too.
If nsMediaSniffer is failed then check into
nsExternalHelperAppService's mimetype entries.
So if Gaia's metadata.js is implemented with different way then Gecko's then
issue mentioned by this mail will be occurred.
Discussion Item:
Do we really need Gaia to do filter by itself or just to use Gecko's
mechanism (audio.canPlayType()) is enough?
Then this way can avoid the in-consistent filter capability between Gaia &
Gecko.
Thanks,
Sincerely yours
-------------------------------------
Marco Chen
System Engineer in Firefox OS
Mozilla Taiwan
Tel: +886-2-87861100 # 352
mail: [email protected]
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g