diff --git a/content/base/public/nsContentCID.h b/content/base/public/nsContentCID.h index 7d95898e8a0e..44267def31fb 100644 --- a/content/base/public/nsContentCID.h +++ b/content/base/public/nsContentCID.h @@ -281,6 +281,15 @@ #endif // MOZ_SVG +#ifdef MOZ_MEDIA + +// {d899a152-9412-46b2-b651-2e71c5c2f05f} +#define NS_VIDEODOCUMENT_CID \ +{ 0xd899a152, 0x9412, 0x46b2, \ + { 0xb6, 0x51, 0x2e, 0x71, 0xc5, 0xc2, 0xf0, 0x5f } } + +#endif + #define NS_SYNCLOADDOMSERVICE_CID \ { /* 0e4e7d00-f71a-439f-9178-1a71ff11b55f */ \ 0x0e4e7d00, 0xf71a, 0x439f, \ diff --git a/content/base/public/nsIDocument.h b/content/base/public/nsIDocument.h index f69869576a3a..e6d8efdced6e 100644 --- a/content/base/public/nsIDocument.h +++ b/content/base/public/nsIDocument.h @@ -1262,6 +1262,11 @@ NS_NewSVGDocument(nsIDocument** aInstancePtrResult); nsresult NS_NewImageDocument(nsIDocument** aInstancePtrResult); +#ifdef MOZ_MEDIA +nsresult +NS_NewVideoDocument(nsIDocument** aInstancePtrResult); +#endif + nsresult NS_NewDocumentFragment(nsIDOMDocumentFragment** aInstancePtrResult, nsNodeInfoManager *aNodeInfoManager); diff --git a/content/html/content/public/nsHTMLAudioElement.h b/content/html/content/public/nsHTMLAudioElement.h index 0ed11ef3dc61..3b8f82cef7d6 100644 --- a/content/html/content/public/nsHTMLAudioElement.h +++ b/content/html/content/public/nsHTMLAudioElement.h @@ -72,6 +72,4 @@ public: PRBool aCompileEventHandlers); virtual void UnbindFromTree(PRBool aDeep = PR_TRUE, PRBool aNullParent = PR_TRUE); -protected: - virtual nsresult InitializeDecoder(nsAString& aChosenMediaResource); }; diff --git a/content/html/content/public/nsHTMLMediaElement.h b/content/html/content/public/nsHTMLMediaElement.h index c5b7cbe36a56..48ef948c1fde 100644 --- a/content/html/content/public/nsHTMLMediaElement.h +++ b/content/html/content/public/nsHTMLMediaElement.h @@ -38,6 +38,7 @@ #include "nsIDOMHTMLMediaElement.h" #include "nsGenericHTMLElement.h" #include "nsMediaDecoder.h" +#include "nsIChannel.h" // Define to output information on decoding and painting framerate /* #define DEBUG_FRAME_RATE 1 */ @@ -51,6 +52,16 @@ public: nsHTMLMediaElement(nsINodeInfo *aNodeInfo, PRBool aFromParser = PR_FALSE); virtual ~nsHTMLMediaElement(); + /** + * This is used when the browser is constructing a video element to play + * a channel that we've already started loading. The src attribute and + * children are ignored. + * @param aChannel the channel to use + * @param aListener returns a stream listener that should receive + * notifications for the stream + */ + nsresult LoadWithChannel(nsIChannel *aChannel, nsIStreamListener **aListener); + // nsIDOMHTMLMediaElement NS_DECL_NSIDOMHTMLMEDIAELEMENT @@ -147,9 +158,40 @@ public: void Freeze(); void Thaw(); + // Returns true if we can handle this MIME type in a