mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1112424 Part 1 - Add moz specific methods to retrieve debug data to media object IDL - r=bz
Bug 1112424 adds an about:media page that gives debug information about HTMLMediaElements and in particular MediaSource objects that are live inside tabs. This patch adds methods to the MediaSource and HTMLMediaElement object to return the debug data as a string that gets displayed directly in the about:media page, inside a <pre> element.
This commit is contained in:
parent
6886b98ce2
commit
ee5e1bf2da
@ -515,6 +515,16 @@ HTMLMediaElement::IsVideo()
|
||||
return false;
|
||||
}
|
||||
|
||||
already_AddRefed<MediaSource>
|
||||
HTMLMediaElement::GetMozMediaSourceObject() const
|
||||
{
|
||||
nsRefPtr<MediaSource> source;
|
||||
if (IsMediaSourceURI(mLoadingSrc)) {
|
||||
NS_GetSourceForMediaSourceURI(mLoadingSrc, getter_AddRefs(source));
|
||||
}
|
||||
return source.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<DOMMediaStream>
|
||||
HTMLMediaElement::GetMozSrcObject() const
|
||||
{
|
||||
|
@ -533,6 +533,7 @@ public:
|
||||
mIsCasting = aShow;
|
||||
}
|
||||
|
||||
already_AddRefed<MediaSource> GetMozMediaSourceObject() const;
|
||||
already_AddRefed<DOMMediaStream> GetMozSrcObject() const;
|
||||
|
||||
void SetMozSrcObject(DOMMediaStream& aValue);
|
||||
|
@ -540,6 +540,12 @@ MediaSource::Dump(const char* aPath)
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
MediaSource::GetMozDebugReaderData(nsAString& aString)
|
||||
{
|
||||
mDecoder->GetMozDebugReaderData(aString);
|
||||
}
|
||||
|
||||
nsPIDOMWindow*
|
||||
MediaSource::GetParentObject() const
|
||||
{
|
||||
|
@ -114,6 +114,10 @@ public:
|
||||
void Dump(const char* aPath);
|
||||
#endif
|
||||
|
||||
// Returns a string describing the state of the MediaSource internal
|
||||
// buffered data. Used for debugging purposes.
|
||||
void GetMozDebugReaderData(nsAString& aString);
|
||||
|
||||
private:
|
||||
// MediaSourceDecoder uses DurationChange to set the duration
|
||||
// without hitting the checks in SetDuration.
|
||||
|
@ -102,6 +102,8 @@ interface HTMLMediaElement : HTMLElement {
|
||||
|
||||
// Mozilla extensions:
|
||||
partial interface HTMLMediaElement {
|
||||
[ChromeOnly]
|
||||
readonly attribute MediaSource? mozMediaSourceObject;
|
||||
attribute MediaStream? mozSrcObject;
|
||||
attribute boolean mozPreservesPitch;
|
||||
readonly attribute boolean mozAutoplayEnabled;
|
||||
|
@ -35,4 +35,6 @@ interface MediaSource : EventTarget {
|
||||
[Throws]
|
||||
void endOfStream(optional MediaSourceEndOfStreamError error);
|
||||
static boolean isTypeSupported(DOMString type);
|
||||
[ChromeOnly]
|
||||
readonly attribute DOMString mozDebugReaderData;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user