Граф коммитов

1319 Коммитов

Автор SHA1 Сообщение Дата
Robert O'Callahan acc22ea0d6 Bug 805254. Part 8: Consolidate audio sample processing code using templates over the format types. r=kinetik
Replace nsAudioStream::Format with an AUDIO_OUTPUT_FORMAT enum value so we
can use it as a template parameter.

Introduce AudioSampleTraits<AudioSampleFormat> to give us access to the C++ type
corresponding to an enum value.

Move SampleToFloat/FloatToSample to AudioSampleFormat.h.

Introduce ConvertAudioSamples and ConvertAudioSamplesWithScale functions
and use them from various places.

Moves AudioDataValue to AudioSampleFormat.h. The name isn't great, but it'll do.
2012-10-25 23:09:40 +13:00
Robert O'Callahan eb84abab22 Bug 805254. Part 7: Move SampleFormat to mozilla::AudioSampleFormat in its own file. r=kinetik 2012-10-25 23:09:40 +13:00
Robert O'Callahan 88d4ac9086 Bug 805254. Part 6: Replace some #ifdefs with if statements. r=kinetik
This is largely obsoleted by part 8. Sorry.
2012-10-25 23:09:39 +13:00
Robert O'Callahan 0e15bb86af Bug 805254. Part 5: Remove format parameter from PAudio constructor. r=kinetik 2012-10-25 23:09:39 +13:00
Robert O'Callahan 9bfc64887e Bug 805254. Part 4: Remove FORMAT_U8 from nsAudioStream::SampleFormat. r=kinetik
We also give nsWaveReader its own separate format enum.
2012-10-25 23:09:39 +13:00
Robert O'Callahan 9d9a27b26e Bug 805254. Part 3: Remove SampleType. r=kinetik 2012-10-25 23:09:39 +13:00
Robert O'Callahan f237e5bab1 Bug 805254. Part 2: Rename nsAudioStream::GetFormat() to Format(), make it static, and use it instead of the MOZ_AUDIO_DATA_FORMAT macro. r=kinetik
Part 8 mostly replaces this patch, but it's quite difficult to reorder the patches to avoid this one.
2012-10-25 23:09:38 +13:00
Robert O'Callahan 044bd05d74 Bug 805254. Part 1: Remove mFormat from nsAudioStream. r=kinetik 2012-10-25 23:09:38 +13:00
Ryan VanderMeulen 171fb05cba Merge m-c to inbound. 2012-10-25 21:57:47 -04:00
Robert O'Callahan 52d8418d94 Bug 790854. Keep MediaStream alive until MediaStream::Destroy ends. r=jesup 2012-10-26 14:39:05 +13:00
Randell Jesup 8db42bb62c Bug 805596: Incorrect audio rates used for fake audio streams r=anant 2012-10-25 20:14:47 -04:00
Robert O'Callahan a147d182d2 Backout 15c4d6334107 (bug 790854) for test failures 2012-10-26 12:08:38 +13:00
Robert O'Callahan 15a58d99a4 Bug 790854. Set mMainThreadDestroyed before the stream is destroyed. r=jesup
--HG--
extra : rebase_source : 6b1d2a64b9af082b02a207759f051cb6d7975e35
2012-10-26 11:07:59 +13:00
Randell Jesup 4fda85ac3e Bug 803976: Implementation of LocalMediaStreams for .stop() r=roc,anant 2012-10-24 19:21:32 -04:00
Randell Jesup f9529e846d Bug 803799: Start gUM streams in Success callback; add MediaManager mutex r=anant,roc 2012-10-24 19:21:15 -04:00
Ehsan Akhgari 12ad3e18ba Backed out changeset ea436c6f7d2d (bug 803799), landed on a CLOSED TREE 2012-10-24 20:30:08 -04:00
Ehsan Akhgari fec8894f04 Backed out changeset 165208ecd591 (bug 803976) 2012-10-24 20:29:32 -04:00
Randell Jesup d6cc9a88c2 Bug 803976: Implementation of LocalMediaStreams for .stop() r=roc,anant 2012-10-24 19:21:32 -04:00
Randell Jesup 8f9c42aa87 Bug 803799: Start gUM streams in Success callback; add MediaManager mutex r=anant,roc 2012-10-24 19:21:15 -04:00
Nick Hurley 3b308213ec Bug 536324 part 3 - Change consumers of nsIChannel. r=sworkman 2012-10-22 10:51:07 -07:00
Randell Jesup 4beb4af10d Bug 803535: Add mutex for MediaEngineDefault access, fix cut-and-paste error r=anant 2012-10-19 18:06:18 -04:00
Kan-Ru Chen (陳侃如) e86eff5cd3 Bug 791711 - Invalidate again if the SharedImageID was removed. r=nical 2012-10-20 08:18:31 +08:00
Chris Pearce 4509d20bac Bug 803427 - Correct duration of gizmo.mp4 in media mochitests. r=doublec 2012-10-19 20:09:09 +13:00
Randell Jesup bef0a4c1e2 Bug 803093: Lock access to MediaEngineWebRTC singleton r=anant 2012-10-18 14:03:00 -04:00
Randell Jesup bb05ef58b2 Bug 802661: Clean up getUserMedia MediaStream handling r=roc,anant 2012-10-17 17:40:14 -04:00
Randell Jesup abfb94ebc4 Bug 801843: Change how video frames are inserted into getUserMedia streams to remove blocking r=roc,anant 2012-10-17 05:46:40 -04:00
Anant Narayanan edf634a604 Bug 802411: Refactor MediaEngine to use GIPS singletons; r=jesup 2012-10-16 17:53:55 -07:00
Matthew Gregan d712138607 Bug 789075 - Handle odd sized WebM video frames correctly. r=derf 2012-10-16 16:03:43 +13:00
Randell Jesup 05bc38656e Bug 773649: Support getting audio and video in the same getUserMedia call r=roc,anant 2012-10-15 16:41:46 -04:00
Matthew Gregan 5a39f8b402 Bug 801512 - Remove remaining printfs from content/media. r=roc 2012-10-15 16:49:07 +13:00
Randell Jesup ac78323e6d Bug 801293 - Remove printf() from MediaStreamGraphImpl. r=roc 2012-10-13 10:46:18 -04:00
Peter Van der Beken 68f37a763d Fix for bug 799465 (Add complete support for non-nsISupports objects in new DOM bindings) - remove nsISupports from AudioContext. r=ehsan.
--HG--
extra : rebase_source : f37b849c020bd9e4bc72e16df71a0241fafb0829
2012-10-09 20:50:26 +02:00
Trevor Saunders 000b6e89a1 bug 798595 - remove useless prmem.h includes r=ehsan 2012-10-04 02:14:06 -04:00
Ehsan Akhgari 058aa73640 Bug 579517 follow-up: Remove NSPR types that crept in 2012-10-07 18:26:08 -04:00
Anant Narayanan e61ba69837 Bug 694807: Implement PeerConnection C++ module; r=jst,jesup,ekr 2012-10-07 01:34:30 -04:00
Anant Narayanan 892bf6da06 Bug 792188: Make ChunkIterator public r=jesup 2012-10-07 01:34:30 -04:00
Anant Narayanan 8b97806c7b Bug 792188: Add hints to MediaStreams to help with generating signaling r=jesup 2012-10-07 01:34:30 -04:00
Chris Pearce d7f1641d0d Bug 785662 - Add NS_OpenAnonymousTemporaryFile(), and use it in nsMediaCache::Init(). r=roc
--HG--
rename : xpcom/io/nsMediaCacheRemover.cpp => xpcom/io/nsAnonymousTemporaryFile.cpp
2012-09-25 12:50:30 +12:00
Randell Jesup 61f2eb940e Bug 797671: cleanup from importing webrtc.org update r=ted,glandium (Part is bug 778801 r=derf) 2012-10-04 12:09:35 -04:00
Matthew Gregan 5e260b3d7c Bug 795892 - Add crashtest. 2012-10-04 15:48:51 +13:00
Ehsan Akhgari b887b4cb60 Bug 797150 - Rename AudioBufferSourceNode's noteOn and noteOff to start/stop; r=bzbarsky 2012-10-02 18:15:33 -04:00
Ehsan Akhgari a7ce3ce7ca Bug 792649 - Make the simplest of Web Audio tests work without audio playback for now; r=bzbarsky 2012-09-24 23:31:58 -04:00
Matthew Gregan 63cb5d6733 Bug 795892 - Fix CORS listener refcnt in ChannelMediaResource::OpenChannel. r=roc 2012-10-02 18:03:24 +13:00
Anant Narayanan 1045427d7c Bug 794668 - Add fake media stream functionality to getUserMedia; r=jesup 2012-09-28 15:26:00 -07:00
Steve Workman f6b5e9e727 Bug 734546: Add DASH Decoders and Readers r=cpearce r=ted 2012-09-29 16:29:04 -07:00
Steve Workman 7dd2fdab68 Bug 734546: Add full byte range request ability to ChannelMediaResource r=cpearce 2012-09-29 16:29:04 -07:00
Nicolas Silva 40afcb70c2 Bug 794747 - add a pref for the default size of the VideoQueue. r=kinetik 2012-09-28 13:34:03 -04:00
Isaac Aggrey 481e7dfb0b Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05:00
foudfou 35bc9a72e8 Bug 785542 - Convert usages of PR_MIN and PR_MAX to NS_MIN and NS_MAX; r=ehsan
Occurences of PR_MAX in layout/style/nsCSSProps.cpp and xpcom/glue/nsTArray.h
can not be converted without C++11 support (constexpr).

--HG--
extra : rebase_source : 3b4f7e26690fad487dd11594449948411d4e79bc
2012-09-27 23:44:47 +02:00
Matt Woodrow 5730a3f4b2 Bug 539356 - Part 9f - Compute the invalid area of the layer tree and pass this to the widget. r=roc 2012-08-29 17:47:18 +12:00
Matt Woodrow cee1aa3599 Bug 539356 - Part 9c - Remove old invalidation code. r=bz 2012-08-29 17:39:31 +12:00
Ed Morley aba3a8f5ef Revert mozilla-inbound to e4dd1fa6d222 for crashes and test failures on a CLOSED TREE 2012-09-27 16:34:46 +01:00
Matt Woodrow 4d096475d2 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-08-29 17:38:58 +12:00
Chris Double 411020abf7 Bug 791912 - Fix crash when using libstagefright during video playback shutdown on B2G - r=cpearce 2012-09-27 16:33:43 +12:00
Edwin Flores 25e059e58e Bug 759506 - Add support for zero-copy OMX hardware decoding to B2G r=doublec 2012-09-27 16:33:43 +12:00
Ehsan Akhgari 8889020fa0 Bug 793294 follow-up: Hold on to JS objects early in AudioBuffer::InitializeBuffers 2012-09-26 11:52:01 -04:00
Ehsan Akhgari 23e1abde57 Bug 793294 - Implement AudioBuffer; r=bzbarsky,smaug
This is the full implementation of the AudioBuffer object.  There are
two ways to create these objects from an audio context and this patch
implements only one of them.

The construction of the AudioBuffer object is a two step process: the
object should be created with operator new first, and then
InitializeBuffers should be called on it.  InitializeBuffers is
fallible, because it uses the JS API to create the underlying typed
arrays, but that's fine, since the length of the buffers comes from web
content, and we don't want to use infallible allocations for those
anyways.

We hold on to the JS objects from the C++ implementation, and trace
through all of those objects, so that a GC does not kill those object
without us knowing.

The buffer should be possible to manipulate from both C++ and JS, and
the C++ object probably needs to support a set of methods for the C++
callers at some point.
2012-09-25 17:58:50 -04:00
Ed Morley 1d13562fd1 Backout 9d9d8bf66243 (bug 785662) for mochitest-other leaks on Windows 2012-09-25 13:46:25 +01:00
Chris Pearce 323629e5cb Bug 785662 - Add NS_OpenAnonymousTemporaryFile(), and use it in nsMediaCache::Init(). r=roc
--HG--
rename : xpcom/io/nsMediaCacheRemover.cpp => xpcom/io/nsAnonymousTemporaryFile.cpp
2012-09-25 12:50:30 +12:00
Bobby Holley a25701a3f7 Bug 792036 - Automated fixups. r=mccr8
find /files/mozilla/build/d/_tests/testing/mochitest/tests/ | egrep "\.(xhtml|html|xml|js)$" | grep -v SimpleTest | grep -vi mochikit | grep -v simpleThread | grep -v test_ipc_messagemanager_blob.html | grep -v "indexedDB/test" | xargs grep -l Components |  xargs grep -L enablePrivilege | perl -pe 's#.*mochitest/tests/##' | xargs perl -p -i.bakkk -e 's/Components\.interfaces(\s|;|\.|\[)/SpecialPowers\.Ci$1/g, s/SpecialPowers\.wrap\(Components\)\.(.)(lasses|tils|nterfaces|esults)/SpecialPowers.C$1/g, s/(?<![\.a-zA-Z])Components/SpecialPowers\.Components/g, s/window\.Components/window\.SpecialPowers\.Components/g'
2012-09-24 14:46:29 +02:00
Robert O'Callahan f876b8f52e Bug 792665. Stop allowing HTMLMediaElement.src = mediaStream, and support HTMLMediaElement.mozSrcObject = mediaStream instead. r=cpearce,jesup
--HG--
extra : rebase_source : 1986b88dc293939055b12ec7065c37dae394af8c
2012-09-24 15:47:30 +12:00
Robert O'Callahan 8abd6652e0 Bug 778682. Part 1: Add NotifyHasCurrentData callback on StreamListener. r=jesup
--HG--
extra : rebase_source : a56fe8ba36639da7638eb590bd9a7a7e65efae95
2012-09-20 12:47:51 +12:00
Ralph Giles 7bc4b22889 Bug 793315 - Test single tag metadata. r=cpearce
Verify that we return metadata tags from streams with only a
single comment by adding a single comment to a file which
previously had none.

This bug went undetected because all our examples had either
multiple tags, or none.
2012-09-21 13:13:41 -07:00
Paul Adenot 711a10146d Bug 792274 - Don't setup mediastreams in RecreateDecodedStream() if we did not have a mediastream before. r=roc 2012-09-18 22:23:35 -07:00
Paul Adenot e4e32f4ae6 Bug 791344 - Properly log skipped frames in the NSPR log. r=kinetik 2012-09-18 11:27:32 -07:00
Paul Adenot 211aeea45a Bug 791344 - Use the right method to build a timestamp from microseconds and properly convert between units. r=kinetik 2012-09-18 11:23:59 -07:00
Ehsan Akhgari c461ff018e Bug 792646 - Implement the skeleton of Web Audio source and destination nodes; r=bzbarsky
This is the bare minimum that one needs in order to get those interfaces
implemented.  The work to make the simplest of Web Audio test cases
actually pass will be done in bug 792649.
2012-09-21 11:33:03 -04:00
Ehsan Akhgari e98eaf856f Backout changeset 7d0776416955 (bug 792646) because of leaks 2012-09-20 19:47:07 -04:00
Ehsan Akhgari 58f854c7d4 Bug 792646 - Implement the skeleton of Web Audio source and destination nodes; r=bzbarsky
This is the bare minimum that one needs in order to get those interfaces
implemented.  The work to make the simplest of Web Audio test cases
actually pass will be done in bug 792649.
2012-09-20 18:05:38 -04:00
Chris Peterson 9075a6d943 Bug 785340 - Part 1: Fix crash where uninitialized nsMediaPluginReader::mHasAudio looked true. r=doublec
--HG--
extra : rebase_source : 0a26ec8c3c511f8f57bb4c86969449bc4e8bbc2f
2012-09-18 17:34:36 -07:00
Ehsan Akhgari 43a4fb885a Bug 788275 - Part 0: Make nsCORSListenerProxy's constructor not cause the object to be destroyed before it is constructed; r=bzbarsky
That is always a nice property to have!
2012-09-18 22:16:23 -04:00
Ralph Giles 592158938a Bug 778050 - Support Opus tag metadata. r=derf
Remember parsed comments from the OpusTags header in
an array member variable. Add a method to generate
the nsHTMLMediaElement::MetadataTags hash table from
those entries, performing the same validatation we
do for Vorbis.

This feature is tested by adding the existing opus
test file to gMetadataTests.

IsValidVorbisTagName is moved to a static method
on nsOggCodecState so it can be shared among the
subclasses and easily called externally.

MetadataTags generation for Vorbis streams is moved
to the same method name on nsVorbisState to allow
sharing of the parsing and validation code as much
as possible, since both formats use the same scheme.

It's arguable whether contrustuction better belongs to
nsOggReader or to the nsCodecState subclasses, since in
theory the various multiplexed streams interact in
determining the canonical tag list, but it is the
per-codec streams which contain the metadata in Ogg.
2012-09-17 18:42:36 -04:00
Steve Workman 8b56efa40a Bug 734546: Changes to nsBuiltinDecoder etc. in prep for nsDASHDecoder etc. r=cpearce 2012-09-17 16:45:38 -04:00
Steve Workman 7a999209d1 Bug 782457: Add max offset and cues preloading support to nestegg; r=kinetik 2012-09-17 16:45:38 -04:00
Aryeh Gregor 69f725c73a Bug 791213 - Don't return nsresult from a function that returns bool; r=doublec 2012-09-16 12:19:01 +03:00
Ralph Giles efcdf81589 Bug 790381 - Remove custom extern "C" on opus_multistream.h. r=derf
Bug 748144 switched our opus decoding to use the
opus_multistream api so we could handle surround
audio files. The version of opus in our tree at
the time didn't include extern "C" {} protection
in the corresponding header, so we had to provide
our own.

With the update to the opus 1.0.0 source release
in bug 790381, this oversight is corrected and
we can remove our work-around.
2012-09-12 16:59:05 -04:00
Ralph Giles 9526e122c1 Bug 789617 - Test vorbis comment validation. r=cpearce
Add a new test file with some invalid comments and verify
they are filtered out of the mozGetMetadata() output.
The new file includes the following valid edge cases:

 - empty tag name
 - empty tag value
 - punctuation in the tag name

and the following invalid cases:

 - non-ascii tag name
 - invalid characters in tag name
 - non-utf-8 tag value
 - no tag=value separator

Also updates the mochitest messages to be less confusing.
2012-09-10 15:39:23 -07:00
Ralph Giles df3c7deb4f Bug 789617 - Improve vorbis comment validation. r=cpearce
Verify that tag names are ASCII within the valid character
ranges and that values are UTF-8, skipping comments where
these checks fail.

As written, the check in IsValidVorbisTagName() for the
separator character isn't necessary, because we've already
split on the first occurance. However, it's better to run
the extra check in case the function is reused elsewhere.
2012-09-10 13:49:00 -07:00
Ehsan Akhgari 589178c8cd Merge IonMonkey into mozilla-inbound 2012-09-11 16:38:44 -04:00
David Anderson 76ab271ead Merge IonMonkey to mozilla-central. a=arewefastyet
--HG--
rename : content/base/src/nsWebSocket.cpp => content/base/src/WebSocket.cpp
rename : content/base/src/nsWebSocket.h => content/base/src/WebSocket.h
2012-09-11 10:25:14 -07:00
Rafael Ávila de Espíndola 6467bb860f Bug 790283 - add newline to the end of two files. r=ehsan. 2012-09-11 13:59:10 -04:00
David Anderson 09854d2b71 Merge from mozilla-central. 2012-09-10 12:16:38 -07:00
David Anderson f4bf6ff039 Merge from mozilla-central. 2012-09-06 18:28:59 -07:00
Ryan VanderMeulen c03d084401 Merge m-c to inbound. 2012-09-05 23:03:09 -04:00
Makoto Kato 1356f06137 Bug 784912 - nsIStreamListener.onDataAvailable should handle 64-bit offset. r=honza 2012-09-06 11:41:02 +09:00
David Anderson f6eca6c7f0 Merge from mozilla-central.
--HG--
rename : js/jsd/jsd_scpt.c => js/jsd/jsd_scpt.cpp
rename : js/jsd/jsd_stak.c => js/jsd/jsd_stak.cpp
rename : js/jsd/jsd_val.c => js/jsd/jsd_val.cpp
2012-09-05 16:18:11 -07:00
Paul Adenot 8370333187 Bug 567077 - Tests for sniffing the types of media files that are served with no Content-Type. r=cpearce 2012-09-04 16:24:34 -07:00
Paul Adenot eca50b7f5f Bug 567077 - Avoid sniffing when recreating a channel. r=cpearce 2012-09-04 17:49:46 -07:00
Paul Adenot 5d61981f79 Bug 567077 - Sniff types of media files that are served with no Content-Type. r=cpearce 2012-09-04 16:22:34 -07:00
David Anderson 25cb077cb2 Merge from mozilla-central.
--HG--
rename : js/src/sharkctl.cpp => js/src/devtools/sharkctl.cpp
rename : js/src/sharkctl.h => js/src/devtools/sharkctl.h
rename : js/src/MemoryMetrics.cpp => js/src/jsmemorymetrics.cpp
2012-08-29 17:57:37 -07:00
David Anderson a77264d9fb Merge from mozilla-central.
--HG--
rename : content/base/public/nsIFrameMessageManager.idl => content/base/public/nsIMessageManager.idl
2012-08-29 17:51:24 -07:00
Ryan VanderMeulen 12c1c8ace2 Backout bug 567077 for bustage. 2012-09-05 18:36:38 -04:00
Paul Adenot 02155af3db Bug 567077 - Tests for sniffing the types of media files that are served with no Content-Type. r=cpearce 2012-09-04 16:24:34 -07:00
Paul Adenot fb2a42f014 Bug 567077 - Avoid sniffing when recreating a channel. r=cpearce 2012-09-04 16:24:12 -07:00
Paul Adenot 0836baba74 Bug 567077 - Sniff types of media files that are served with no Content-Type. r=cpearce 2012-09-04 16:22:34 -07:00
Paul Adenot 6ad35d0369 Bug 730765 - Media cache shouldn't be used when loading from blob: urls. r=biesi 2012-09-04 14:53:52 -07:00
Siddharth Agarwal 52e2d1e6cf Merge mozilla-central to mozilla-inbound. 2012-08-29 20:41:03 +05:30
Ed Morley ebda6d0912 Merge last PGO-green changeset of mozilla-inbound to mozilla-central 2012-08-29 14:35:19 +01:00
Chris Pearce 4fc9788c64 Bug 785909 - Don't init FileMediaResource::mSize on the main thread. r=roc 2012-08-29 15:55:57 +12:00
Matthew Gregan 04cafd2f3e Bug 785967 - Reject Wave files with invalid data block size in the format chunk. r=doublec 2012-08-28 18:21:58 +12:00