Commit Graph

57 Commits

Author SHA1 Message Date
Chris Pearce
f9e8b1f20a Bug 811381 - Flatten nsMediaDecoder and nsBuiltinDecoder into a single class. r=roc 2012-11-14 11:45:13 -08:00
Ehsan Akhgari
0704216980 Bug 810177 - Part 2: Break MetadataTags out of nsHTMLMediaElements; r=cpearce
This patch simply moves the MetadataTags typedef to nsMediaDecoder.h to
reduce the dependencies on nsHTMLMediaElements.h.  The rest of the
changes are made to make this compile.
2012-11-08 19:40:08 -05:00
Matt Joras
d1fe98e6b3 Bug 798033 - Removes 'using namespace' from /content headers - r=bsmedberg 2012-10-27 13:24:04 -04:00
Phil Ringnalda
b6c07f4fe7 Back out c25bc74b7fd3 (bug 798033) for build bustage 2012-10-26 19:05:18 -07:00
Matt Joras
cc0bb2727c Bug 798033 - Removes 'using namespace' from /content headers - r=bsmedberg 2012-10-14 00:04:51 -05:00
David Anderson
188c88907e Merge from mozilla-central. 2012-08-22 16:09:24 -07:00
Ehsan Akhgari
0fd9123eac Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
David Anderson
9929d37fcc Merge from mozilla-central. 2012-07-31 17:19:41 -07:00
David Anderson
644c651c3e Merge from mozilla-central. 2012-07-30 13:15:39 -07:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Ralph Giles
f63a794f44 Bug 763010 - Expose media element metadata. r=cpearce
Implements a media.mozGetMetadata() method returning a new javascript object whose properties are key value pairs respresenting metadata tags from the media resource. This data is available after readystate enters METADATA_LOADED.

Currently this is only implemented for Ogg Vorbis streams.

Media format metadata is parsed out by the media decoders. In the nsCodecStateMachine::ReadMetadata subclasses we fill in an nsDataHashtable pointer using the format-specifc api.

The hash pointer is passed up to the media element as part of the MetadataLoaded event.

The hash is deleted if the load is aborted. The audio metadata is also reset to zero (as in the constructor), resolving a todo comment.
2012-07-30 20:14:29 -04:00
Sean Stangl
7d9dc67f9e Merge m-c to Ionmonkey.
--HG--
rename : accessible/src/html/nsHyperTextAccessible.cpp => accessible/src/generic/HyperTextAccessible.cpp
rename : accessible/src/html/nsHyperTextAccessible.h => accessible/src/generic/HyperTextAccessible.h
rename : accessible/src/html/nsHTMLImageAccessible.cpp => accessible/src/generic/ImageAccessible.cpp
rename : accessible/src/html/nsHTMLImageAccessible.h => accessible/src/generic/ImageAccessible.h
rename : accessible/src/msaa/nsHyperTextAccessibleWrap.cpp => accessible/src/msaa/HyperTextAccessibleWrap.cpp
rename : accessible/src/msaa/nsHyperTextAccessibleWrap.h => accessible/src/msaa/HyperTextAccessibleWrap.h
2012-06-04 13:30:29 -07:00
Sean Stangl
d9462a4f06 Merge m-c onto Ionmonkey.
--HG--
rename : accessible/src/atk/nsAccessibleWrap.cpp => accessible/src/atk/AccessibleWrap.cpp
rename : accessible/src/atk/nsAccessibleWrap.h => accessible/src/atk/AccessibleWrap.h
rename : accessible/src/atk/nsDocAccessibleWrap.h => accessible/src/atk/DocAccessibleWrap.h
rename : accessible/src/base/nsAccessible.cpp => accessible/src/generic/Accessible.cpp
rename : accessible/src/base/nsAccessible.h => accessible/src/generic/Accessible.h
rename : accessible/src/base/nsDocAccessible.cpp => accessible/src/generic/DocAccessible.cpp
rename : accessible/src/base/nsDocAccessible.h => accessible/src/generic/DocAccessible.h
rename : accessible/src/mac/nsAccessibleWrap.h => accessible/src/mac/AccessibleWrap.h
rename : accessible/src/mac/nsAccessibleWrap.mm => accessible/src/mac/AccessibleWrap.mm
rename : accessible/src/mac/nsDocAccessibleWrap.h => accessible/src/mac/DocAccessibleWrap.h
rename : accessible/src/mac/nsDocAccessibleWrap.mm => accessible/src/mac/DocAccessibleWrap.mm
rename : accessible/src/msaa/nsAccessibleWrap.cpp => accessible/src/msaa/AccessibleWrap.cpp
rename : accessible/src/msaa/nsDocAccessibleWrap.cpp => accessible/src/msaa/DocAccessibleWrap.cpp
rename : accessible/src/msaa/nsTextAccessibleWrap.cpp => accessible/src/msaa/TextLeafAccessibleWrap.cpp
rename : accessible/src/msaa/nsTextAccessibleWrap.h => accessible/src/msaa/TextLeafAccessibleWrap.h
rename : netwerk/protocol/http/SpdySession.cpp => netwerk/protocol/http/SpdySession2.cpp
rename : netwerk/protocol/http/SpdySession.h => netwerk/protocol/http/SpdySession2.h
rename : netwerk/protocol/http/SpdySession.cpp => netwerk/protocol/http/SpdySession3.cpp
rename : netwerk/protocol/http/SpdySession.h => netwerk/protocol/http/SpdySession3.h
rename : netwerk/protocol/http/SpdyStream.cpp => netwerk/protocol/http/SpdyStream2.cpp
rename : netwerk/protocol/http/SpdyStream.cpp => netwerk/protocol/http/SpdyStream3.cpp
2012-05-31 17:17:52 -07:00
Ralph Giles
08ed5054b4 Bug 758833 - Track and trim opus preskip samples - r=doublec
We trim the initial few samples out of the opus decoder,
to give the output time to converge, and to correct for
the encoding delay. Encoders store the delay in the preskip
field of the Ogg encapsulation header.

The previous code to do this was a hack based on the granulepos
values and could fail on some inputs. Instead, keep a count
of how many samples we want to trip, and remove packet data
until that value matches the preskip value from the header.

The value is set to the preskip value from the header when
the decoder is initialized. We also need to do this after
seek. To do this we add a specialized nsOggReader::ResetDecode
method which takes a boolean argument, set to true when
we are seeking to the start of the stream. In that case,
the method resets the skip count.

There is still an issue after general seeks. The spec recommends
trimming a full 80 ms (3840 frames) to allow the decoder to fully
settle from the previous state. It's tricky to do this inside
nsOpusState because it doesn't know where it is in the stream.

Also add some debug output to track the decode behaviour.
2012-05-31 16:03:14 +12:00
David Anderson
684411090a Merge from mozilla-central. 2012-05-21 14:40:04 -07:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Timothy B. Terriberry
fac791cc69 Bug 759399 - Handle preroll correctly during an Opus seek, r=doublec 2012-05-31 11:13:17 -07:00
Timothy B. Terriberry
e4706b6f85 Bug 759490 - Use Opus streams when seeking in Ogg, if present, r=doublec 2012-05-31 11:13:11 -07:00
David Anderson
14bf2a099d Merge from mozilla-central.
--HG--
rename : accessible/src/base/nsRootAccessible.cpp => accessible/src/generic/RootAccessible.cpp
rename : accessible/src/base/nsRootAccessible.h => accessible/src/generic/RootAccessible.h
rename : js/src/jsgcmark.cpp => js/src/gc/Marking.cpp
rename : js/src/jsgcmark.h => js/src/gc/Marking.h
2012-05-04 19:16:35 -07:00
Ralph Giles
3adcc0b005 Bug 674225 - Add Opus support to nsOggReader. r=cpearce
Parse and decode Opus streams embedded in the Ogg
container. Based on the draft specification from
https://wiki.xiph.org/OggOpus
Support is conditional on the runtime preference
setting media.opus.enabled, which is false by
default until we're confident the spec is stable
and useful.

This patch doesn't support the gain header or
multichannel files.

The LEUint*() functions from the skeleton parser
are used to read the multi-byte header fields.
This requires moving them to earlier in the file.

Mappings for the .opus filename extension are also
added to facilitate testing with local files.
2012-05-01 17:29:34 -07:00
David Anderson
d6a63f99ba Merge from mozilla-central.
--HG--
rename : content/media/nsMediaStream.cpp => content/media/MediaResource.cpp
rename : content/media/nsMediaStream.h => content/media/MediaResource.h
2012-02-15 13:45:39 -08:00
Robert O'Callahan
4840bbe976 Bug 726889. Rename nsMediaStream/nsMediaChannelStream/nsMediaFileStream to mozilla::MediaResource/ChannelMediaResource/FileMediaResource. Also rename nsByteRange to mozilla::MediaByteRange and nsChannelStatistics to mozilla::MediaChannelStatistics. Rename GetStream to GetResource and various other mentions of 'stream' to 'resource'. r=cpearce
--HG--
rename : content/media/nsMediaStream.cpp => content/media/MediaResource.cpp
rename : content/media/nsMediaStream.h => content/media/MediaResource.h
2012-02-15 17:35:01 +13:00
Paul Adenot
67bfe4f064 Bug 756372 - Change |seeking| to prevent seeking in WebM livestream. r=kinetik 2012-05-18 13:35:43 -04:00
Matthew Gregan
b91f76289a Bug 690603 - Remove PR_TRUE/PR_FALSE from media code. r=doublec 2011-09-30 12:34:37 +13:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Chris Pearce
f2608ac6df Bug 670726 - Remove ns{Ogg,WebM}Reader::CanDecodeToTarget(), it makes invalid assumptions. r=kinetik 2011-07-14 09:24:35 +12:00
Chris Pearce
fabed158ed Bug 592833 - Remove nsBuiltinDecoderReader monitor. r=roc 2011-07-12 15:39:28 +12:00
Chris Pearce
b364e365c4 Bug 661456 - Scale WebM video frames to display size. r=kinetik 2011-06-24 10:08:54 +12:00
Chris Pearce
0ce10721e9 Bug 655648 - Don't enqueue expired theora frames. r=roc 2011-06-09 08:56:45 +12:00
Chris Pearce
c47b80f93b Bug 566779 - Clean up media start and end time calculation. r=doublec 2011-05-09 09:10:28 +12:00
Chris Pearce
ccae22ade2 Bug 650994 - Decode ogg packets lazily, timestamp them at demux time. r=doublec 2011-05-08 18:24:09 +12:00
Chris Jones
ed22df8f64 Bug 556214, parts 1 and 1.1: Rename Monitor to ReentrantMonitor and fix existing Monitor users. r=roc
--HG--
rename : xpcom/glue/Monitor.h => xpcom/glue/ReentrantMonitor.h
2011-04-29 14:21:57 -05:00
Chris Pearce
bf7fe4cec2 Bug 650157 - Push nsBuiltinDecoderReader::mDataOffset down into nsOggReader. r=doublec 2011-04-15 13:29:54 +12:00
Chris Pearce
a259c20cba Bug 641718 - Convert to using microseconds for internal video timestamps. r=kinetik 2011-04-14 10:12:23 +12:00
Chris Double
bf27fe5198 Bug 639721 - Fix data race on nsBuiltinDecoderReader::mInfo - r=kinetik
--HG--
extra : rebase_source : 5e58af70c75f563ae7dd7d62e3be897a3c244e85
2011-03-24 16:53:03 +13:00
Chris Pearce
16b3b24b89 Bug 639391 - Push Ogg specific seeking stuff down into nsOggReader. r=roc 2011-03-24 11:28:58 +13:00
Chris Pearce
3d57294e8f Bug 638617 - Ensure nsOggReader::FindEndTime() doesn't read outside of cached data bounds, and reports errors properly. r=doublec 2011-03-24 11:28:57 +13:00
Matthew Gregan
a442ddf24b Bug 631953 - Check codec is initialized before using cached serial number. r=cpearce a=roc 2011-02-08 15:45:20 +13:00
Matthew Gregan
0e9083fe01 Bug 605457 - Remove concurrent use of Ogg stream hash table. r=cpearce a=roc 2010-12-17 14:39:01 +13:00
Timothy B. Terriberry
8dd1e23dc0 Bug 511348 - Integrate Tremor for Vorbis decoding for non/slow-FPU platforms. r=chris.double a=blocking-fennec
--HG--
extra : rebase_source : 807703f9008d0e6c3829370a8a84e0914e2ccb29
2010-10-18 19:55:45 -07:00
Matthew Gregan
f3d96bd23a Bug 598217 - Share nsWebMBufferedState between cloned decoders. r=roc a=blocking2.0 2010-09-21 12:49:50 +12:00
Chris Double
17036671f9 Bug 557479 - Auto manage VideoData and SoundData objects. r=cpearce a=blocking2.0 2010-09-14 16:24:47 -07:00
Chris Pearce
b1b1746c37 Bug 589561 - Rename HTMLTimeRanges to TimeRanges, HTMLMediaError to MediaError. r=roc a=roc
--HG--
rename : content/html/content/src/nsHTMLMediaError.cpp => content/html/content/src/nsMediaError.cpp
rename : content/html/content/src/nsHTMLMediaError.h => content/html/content/src/nsMediaError.h
rename : content/html/content/src/nsHTMLTimeRanges.cpp => content/html/content/src/nsTimeRanges.cpp
rename : content/html/content/src/nsHTMLTimeRanges.h => content/html/content/src/nsTimeRanges.h
rename : dom/interfaces/html/nsIDOMHTMLMediaError.idl => dom/interfaces/html/nsIDOMMediaError.idl
rename : dom/interfaces/html/nsIDOMHTMLTimeRanges.idl => dom/interfaces/html/nsIDOMTimeRanges.idl
2010-08-25 20:43:00 +12:00
Chris Pearce
b07055071f Bug 519897 - Supported indexed Ogg files. r=doublec 2010-08-20 10:50:37 +12:00
Chris Pearce
14ae2bcedd Backed out changeset 7eee00899270 2010-08-18 13:48:34 +12:00
Chris Pearce
1e4886416f Bug 519897 - Supported indexed Ogg files. r=doublec a=roc 2010-08-18 10:49:14 +12:00
Chris Pearce
6c349be715 Bug 462957 - Ogg support for HTMLMediaElement.buffered. r=doublec a=blocking2.0 2010-08-05 19:40:35 +12:00
Chris Pearce
fb117ca2e7 Bug 462957 - DOM implementation of HTMLMediaElement.buffered. r=roc a=blocking2.0 2010-08-05 19:40:35 +12:00
Matthew Gregan
673772b5ef Bug 568431 - Remove the requirement for mCallbackPeriod from the generic media backend. r=doublec 2010-05-31 16:02:00 +12:00
Chris Double
65d3fd13c6 Bug 566501 - Remove unnecessary seek from the video decoder base class. r=cpearce 2010-05-21 09:13:01 +12:00