The default bug view has changed. See this FAQ.

Fix gstreamer backend on big endian architectures

RESOLVED FIXED in mozilla17

Status

()

Core
Audio/Video
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gaston, Assigned: gaston)

Tracking

Trunk
mozilla17
PowerPC
OpenBSD
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
As of now gstreamer backend hardcodes endianness here :
http://mxr.mozilla.org/mozilla-central/source/content/media/gstreamer/nsGStreamerReader.cpp#133

On OpenBSD/macppc (big endian) trying to load an mp4 vid it only shows the 'loading' throbber infinitely.

Patch in a few to 'fix' it (orthogonal to MOZ_SAMPLE_TYPE_FLOAT32 so a bit of ifdef dance..dunno if the int/48k/16/4321 case makes sense), might not be the best fix but with it i can view some samples on my ppc mac mini.
(Assignee)

Comment 1

5 years ago
Created attachment 646110 [details] [diff] [review]
set endianness=4321 on BE archs
Assignee: nobody → landry
Attachment #646110 - Flags: review?(chris.double)
(Assignee)

Updated

5 years ago
Hardware: x86 → PowerPC

Updated

5 years ago
Attachment #646110 - Flags: review?(chris.double) → review+
(Assignee)

Comment 2

5 years ago
Alessandro, since this is your code, any comment before i push this commit ?

Comment 3

5 years ago
Looks good, although it can probably be simplified a bit by using G_BYTE_ORDER somehow.
(Assignee)

Comment 4

5 years ago
(In reply to Alessandro Decina from comment #3)
> Looks good, although it can probably be simplified a bit by using
> G_BYTE_ORDER somehow.

Right, but since it's a glib macro/#define i'm not sure we're allowed to use it, mxr (http://mxr.mozilla.org/mozilla-central/search?string=G_BYTE_ORDER) only shows an occurence in config/elf-dynstr-gc.c
(Assignee)

Comment 5

5 years ago
However, since gstreamer depends on glib we can safely use glib macros there.. i just need to figure out how to get the G_BYTE_ORDER #define properly replaced in the string passed to gst_parse_bin_from_description()
(Assignee)

Comment 6

5 years ago
Turns out it's not so simple without resorting to sprintf() games.. chris, any opinion/idea ? is it worth the effort ?

Comment 7

5 years ago
(In reply to Landry Breuil (:gaston) from comment #6)
> Turns out it's not so simple without resorting to sprintf() games.. chris,
> any opinion/idea ? is it worth the effort ?

What you have is fine. We can revisit it with a later patch if you, or someone else, comes up with a better approach.
(Assignee)

Comment 8

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/54a8f77d3d26
https://hg.mozilla.org/mozilla-central/rev/54a8f77d3d26
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.