head 1.3;
access;
symbols
pkgsrc-2014Q1:1.1.0.2
pkgsrc-2014Q1-base:1.1;
locks; strict;
comment @// @;
1.3
date 2014.06.11.00.40.59; author ryoon; state dead;
branches;
next 1.2;
commitid QTw894DEf2Let2Ex;
1.2
date 2014.04.30.15.07.18; author ryoon; state Exp;
branches;
next 1.1;
commitid BxErbE5mH8g3CIyx;
1.1
date 2014.03.20.21.02.00; author ryoon; state Exp;
branches;
next ;
commitid 7yTA4yPlY6RyTttx;
desc
@@
1.3
log
@Update to 30.0
* debug build is broken
Changelog:
New
Sidebars button in browser chrome enables faster access to social, bookmark, & history sidebars
New
Mac OS X command-E sets find term to selected text
New
Support for GStreamer 1.0
Changed
Disallow calling WebIDL constructors as functions on the web
Developer
With the exception of those bundled inside an extension or ones that are whitelisted, plugins will no longer be activated by default (see blog post)
Developer
Fixes to box-shadow and other visual overflow (see bug 480888)
Developer
Mute and volume available per window when using WebAudio
Developer
background-blend-mode enabled by default
Developer
Use of line-height allowed for
Developer
ES6 array and generator comprehensions implemented (read docs for more details)
Developer
Error stack now contains column number
Developer
Support for alpha option in canvas context options (feature description)
Fixed
Ignore autocomplete="off" when offering to save passwords via the password manager (see 956906)
Fixed
TypedArrays don't support new named properties (see 695438)
Fixed
Various security fixes
Fixed in Firefox 30
MFSA 2014-54 Buffer overflow in Gamepad API
MFSA 2014-53 Buffer overflow in Web Audio Speex resampler
MFSA 2014-52 Use-after-free with SMIL Animation Controller
MFSA 2014-51 Use-after-free in Event Listener Manager
MFSA 2014-50 Clickjacking through cursor invisability after Flash interaction
MFSA 2014-49 Use-after-free and out of bounds issues found using Address Sanitizer
MFSA 2014-48 Miscellaneous memory safety hazards (rv:30.0 / rv:24.6)
@
text
@$NetBSD: patch-content_media_gstreamer_GStreamerReader-0.10.cpp,v 1.2 2014/04/30 15:07:18 ryoon Exp $
--- content/media/gstreamer/GStreamerReader-0.10.cpp.orig 2014-04-28 00:05:17.000000000 +0000
+++ content/media/gstreamer/GStreamerReader-0.10.cpp
@@@@ -0,0 +1,200 @@@@
+#include "nsError.h"
+#include "MediaDecoderStateMachine.h"
+#include "AbstractMediaDecoder.h"
+#include "MediaResource.h"
+#include "GStreamerReader.h"
+#include "GStreamerMozVideoBuffer.h"
+#include "GStreamerFormatHelper.h"
+#include "VideoUtils.h"
+#include "mozilla/dom/TimeRanges.h"
+#include "mozilla/Preferences.h"
+
+using namespace mozilla;
+using mozilla::layers::PlanarYCbCrImage;
+using mozilla::layers::ImageContainer;
+
+GstFlowReturn GStreamerReader::AllocateVideoBufferCb(GstPad* aPad,
+ guint64 aOffset,
+ guint aSize,
+ GstCaps* aCaps,
+ GstBuffer** aBuf)
+{
+ GStreamerReader* reader = reinterpret_cast(gst_pad_get_element_private(aPad));
+ return reader->AllocateVideoBuffer(aPad, aOffset, aSize, aCaps, aBuf);
+}
+
+GstFlowReturn GStreamerReader::AllocateVideoBuffer(GstPad* aPad,
+ guint64 aOffset,
+ guint aSize,
+ GstCaps* aCaps,
+ GstBuffer** aBuf)
+{
+ nsRefPtr image;
+ return AllocateVideoBufferFull(aPad, aOffset, aSize, aCaps, aBuf, image);
+}
+
+GstFlowReturn GStreamerReader::AllocateVideoBufferFull(GstPad* aPad,
+ guint64 aOffset,
+ guint aSize,
+ GstCaps* aCaps,
+ GstBuffer** aBuf,
+ nsRefPtr& aImage)
+{
+ /* allocate an image using the container */
+ ImageContainer* container = mDecoder->GetImageContainer();
+ if (container == nullptr) {
+ return GST_FLOW_ERROR;
+ }
+ PlanarYCbCrImage* img = reinterpret_cast(container->CreateImage(ImageFormat::PLANAR_YCBCR).get());
+ nsRefPtr image = dont_AddRef(img);
+
+ /* prepare a GstBuffer pointing to the underlying PlanarYCbCrImage buffer */
+ GstBuffer* buf = GST_BUFFER(gst_moz_video_buffer_new());
+ GST_BUFFER_SIZE(buf) = aSize;
+ /* allocate the actual YUV buffer */
+ GST_BUFFER_DATA(buf) = image->AllocateAndGetNewBuffer(aSize);
+
+ aImage = image;
+
+ /* create a GstMozVideoBufferData to hold the image */
+ GstMozVideoBufferData* bufferdata = new GstMozVideoBufferData(image);
+
+ /* Attach bufferdata to our GstMozVideoBuffer, it will take care to free it */
+ gst_moz_video_buffer_set_data(GST_MOZ_VIDEO_BUFFER(buf), bufferdata);
+
+ *aBuf = buf;
+ return GST_FLOW_OK;
+}
+
+gboolean GStreamerReader::EventProbe(GstPad* aPad, GstEvent* aEvent)
+{
+ GstElement* parent = GST_ELEMENT(gst_pad_get_parent(aPad));
+ switch(GST_EVENT_TYPE(aEvent)) {
+ case GST_EVENT_NEWSEGMENT:
+ {
+ gboolean update;
+ gdouble rate;
+ GstFormat format;
+ gint64 start, stop, position;
+ GstSegment* segment;
+
+ /* Store the segments so we can convert timestamps to stream time, which
+ * is what the upper layers sync on.
+ */
+ ReentrantMonitorAutoEnter mon(mGstThreadsMonitor);
+ gst_event_parse_new_segment(aEvent, &update, &rate, &format,
+ &start, &stop, &position);
+ if (parent == GST_ELEMENT(mVideoAppSink))
+ segment = &mVideoSegment;
+ else
+ segment = &mAudioSegment;
+ gst_segment_set_newsegment(segment, update, rate, format,
+ start, stop, position);
+ break;
+ }
+ case GST_EVENT_FLUSH_STOP:
+ /* Reset on seeks */
+ ResetDecode();
+ break;
+ default:
+ break;
+ }
+ gst_object_unref(parent);
+
+ return TRUE;
+}
+
+gboolean GStreamerReader::EventProbeCb(GstPad* aPad,
+ GstEvent* aEvent,
+ gpointer aUserData)
+{
+ GStreamerReader* reader = reinterpret_cast(aUserData);
+ return reader->EventProbe(aPad, aEvent);
+}
+
+nsRefPtr GStreamerReader::GetImageFromBuffer(GstBuffer* aBuffer)
+{
+ if (!GST_IS_MOZ_VIDEO_BUFFER (aBuffer))
+ return nullptr;
+
+ nsRefPtr image;
+ GstMozVideoBufferData* bufferdata = reinterpret_cast(gst_moz_video_buffer_get_data(GST_MOZ_VIDEO_BUFFER(aBuffer)));
+ image = bufferdata->mImage;
+
+ PlanarYCbCrImage::Data data;
+ data.mPicX = data.mPicY = 0;
+ data.mPicSize = gfx::IntSize(mPicture.width, mPicture.height);
+ data.mStereoMode = StereoMode::MONO;
+
+ data.mYChannel = GST_BUFFER_DATA(aBuffer);
+ data.mYStride = gst_video_format_get_row_stride(mFormat, 0, mPicture.width);
+ data.mYSize = gfx::IntSize(data.mYStride,
+ gst_video_format_get_component_height(mFormat, 0, mPicture.height));
+ data.mYSkip = 0;
+ data.mCbCrStride = gst_video_format_get_row_stride(mFormat, 1, mPicture.width);
+ data.mCbCrSize = gfx::IntSize(data.mCbCrStride,
+ gst_video_format_get_component_height(mFormat, 1, mPicture.height));
+ data.mCbChannel = data.mYChannel + gst_video_format_get_component_offset(mFormat, 1,
+ mPicture.width, mPicture.height);
+ data.mCrChannel = data.mYChannel + gst_video_format_get_component_offset(mFormat, 2,
+ mPicture.width, mPicture.height);
+ data.mCbSkip = 0;
+ data.mCrSkip = 0;
+
+ image->SetDataNoCopy(data);
+
+ return image;
+}
+
+void GStreamerReader::CopyIntoImageBuffer(GstBuffer* aBuffer,
+ GstBuffer** aOutBuffer,
+ nsRefPtr &aImage)
+{
+ AllocateVideoBufferFull(nullptr, GST_BUFFER_OFFSET(aBuffer),
+ GST_BUFFER_SIZE(aBuffer), nullptr, aOutBuffer, aImage);
+
+ gst_buffer_copy_metadata(*aOutBuffer, aBuffer, (GstBufferCopyFlags)GST_BUFFER_COPY_ALL);
+ memcpy(GST_BUFFER_DATA(*aOutBuffer), GST_BUFFER_DATA(aBuffer), GST_BUFFER_SIZE(*aOutBuffer));
+
+ aImage = GetImageFromBuffer(*aOutBuffer);
+}
+
+GstCaps* GStreamerReader::BuildAudioSinkCaps()
+{
+ GstCaps* caps;
+#ifdef IS_LITTLE_ENDIAN
+ int endianness = 1234;
+#else
+ int endianness = 4321;
+#endif
+ gint width;
+#ifdef MOZ_SAMPLE_TYPE_FLOAT32
+ caps = gst_caps_from_string("audio/x-raw-float, channels={1,2}");
+ width = 32;
+#else /* !MOZ_SAMPLE_TYPE_FLOAT32 */
+ caps = gst_caps_from_string("audio/x-raw-int, channels={1,2}");
+ width = 16;
+#endif
+ gst_caps_set_simple(caps,
+ "width", G_TYPE_INT, width,
+ "endianness", G_TYPE_INT, endianness,
+ NULL);
+
+ return caps;
+}
+
+void GStreamerReader::InstallPadCallbacks()
+{
+ GstPad* sinkpad = gst_element_get_static_pad(GST_ELEMENT(mVideoAppSink), "sink");
+ gst_pad_add_event_probe(sinkpad,
+ G_CALLBACK(&GStreamerReader::EventProbeCb), this);
+
+ gst_pad_set_bufferalloc_function(sinkpad, GStreamerReader::AllocateVideoBufferCb);
+ gst_pad_set_element_private(sinkpad, this);
+ gst_object_unref(sinkpad);
+
+ sinkpad = gst_element_get_static_pad(GST_ELEMENT(mAudioAppSink), "sink");
+ gst_pad_add_event_probe(sinkpad,
+ G_CALLBACK(&GStreamerReader::EventProbeCb), this);
+ gst_object_unref(sinkpad);
+}
@
1.2
log
@Update to 29.0
* Restore html5 audio playback under NetBSD
Changelog:
New
Significant new customization mode makes it easy to personalize your Web experience to access the features you use the most (learn more)
New
A new, easy to access menu sits in the right hand corner of Firefox and includes popular browser controls
New
Sleek new tabs provide an overall smoother look and fade into the background when not active
New
An interactive onboarding tour to guide users through the new Firefox changes
New
The ability to set up Firefox Sync by creating a Firefox account (learn more)
New
Gamepad API finalized and enabled (learn more)
New
HTTPS used for Yahoo Searches performed in en-US locale
New
Malay [ma] locale added
Changed
Clicking on a W3C Web Notification will switch to the originating tab
Developer
'box-sizing' (dropping the -moz- prefix) implemented (learn more)
Developer
Console object available in Web Workers (learn more)
Developer
Promises enabled by default (learn more)
Developer
SharedWorker enabled by default
Developer
implemented and enabled
Developer
implemented and enabled
Developer
Enabled ECMAScript Internationalization API
Developer
Add-on bar has been removed, content moved to navigation bar
Developer
Implemented URLSearchParams from the URL specification (see MDN for details )
Fixed
Various security fixes
Fixed in Firefox 29
MFSA 2014-47 Debugger can bypass XrayWrappers with JavaScript
MFSA 2014-46 Use-after-free in nsHostResolve
MFSA 2014-45 Incorrect IDNA domain name matching for wildcard certificates
MFSA 2014-44 Use-after-free in imgLoader while resizing images
MFSA 2014-43 Cross-site scripting (XSS) using history navigations
MFSA 2014-42 Privilege escalation through Web Notification API
MFSA 2014-41 Out-of-bounds write in Cairo
MFSA 2014-40 Firefox for Android addressbar suppression
MFSA 2014-39 Use-after-free in the Text Track Manager for HTML video
MFSA 2014-38 Buffer overflow when using non-XBL object as XBL
MFSA 2014-37 Out of bounds read while decoding JPG images
MFSA 2014-36 Web Audio memory corruption issues
MFSA 2014-35 Privilege escalation through Mozilla Maintenance Service Installer
MFSA 2014-34 Miscellaneous memory safety hazards (rv:29.0 / rv:24.5)
@
text
@d1 1
a1 1
$NetBSD: patch-content_media_gstreamer_GStreamerReader-0.10.cpp,v 1.1 2014/03/20 21:02:00 ryoon Exp $
@
1.1
log
@Update to 28.0
Changelog:
NEW
VP9 video decoding implemented
NEW
Mac OS X: Notification Center support for web notifications
NEW
Horizontal HTML5 audio/video volume control
NEW
Support for Opus in WebM
CHANGED
Now that spdy/3 is implemented support for spdy/2 has been removed and servers without spdy/3 will negotiate to http/1 without any penalty
DEVELOPER
Support for MathML 2.0 'mathvariant' attribute
DEVELOPER
Background thread hang reporting
DEVELOPER
Support for multi-line flexbox in layout
FIXED
Various security fixes
Fixed in Firefox 28
MFSA 2014-32 Out-of-bounds write through TypedArrayObject after neutering
MFSA 2014-31 Out-of-bounds read/write through neutering ArrayBuffer objects
MFSA 2014-30 Use-after-free in TypeObject
MFSA 2014-29 Privilege escalation using WebIDL-implemented APIs
MFSA 2014-28 SVG filters information disclosure through feDisplacementMap
MFSA 2014-27 Memory corruption in Cairo during PDF font rendering
MFSA 2014-26 Information disclosure through polygon rendering in MathML
MFSA 2014-25 Firefox OS DeviceStorageFile object vulnerable to relative path escape
MFSA 2014-24 Android Crash Reporter open to manipulation
MFSA 2014-23 Content Security Policy for data: documents not preserved by session restore
MFSA 2014-22 WebGL content injection from one domain to rendering in another
MFSA 2014-21 Local file access via Open Link in new tab
MFSA 2014-20 onbeforeunload and Javascript navigation DOS
MFSA 2014-19 Spoofing attack on WebRTC permission prompt
MFSA 2014-18 crypto.generateCRMFRequest does not validate type of key
MFSA 2014-17 Out of bounds read during WAV file decoding
MFSA 2014-16 Files extracted during updates are not always read only
MFSA 2014-15 Miscellaneous memory safety hazards (rv:28.0 / rv:24.4)
@
text
@d1 1
a1 1
$NetBSD$
d3 1
a3 1
--- content/media/gstreamer/GStreamerReader-0.10.cpp.orig 2014-03-20 11:09:40.000000000 +0000
d5 1
a5 1
@@@@ -0,0 +1,203 @@@@
d50 2
a51 4
+ if (!container) {
+ // We don't have an ImageContainer. We probably belong to an