experiment with propagating codec

RESOLVED DUPLICATE of bug 1267887

Status

()

defect
P2
normal
RESOLVED DUPLICATE of bug 1267887
3 years ago
3 years ago

People

(Reporter: rillian, Assigned: rillian)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We need to make the track codec available to the caller. In lieu of a good way to share rust strings with C++ use an enum.
we need a better fix for this upstream, but this part has been pretty stable in my development tree and does no harm, so I'd like to get it landed.
Assignee: nobody → giles
Comment on attachment 8756698 [details]
MozReview Request: Bug 1275812 - Experiment with exporting track mime-type. r?kinetik

https://reviewboard.mozilla.org/r/55338/#review52092

::: media/libstagefright/binding/mp4parse/capi.rs:177
(Diff revision 1)
>          TrackType::Video => TRACK_TYPE_H264,
>          TrackType::Audio => TRACK_TYPE_AAC,
>          TrackType::Unknown => return MP4PARSE_ERROR_UNSUPPORTED,
>      };
>  
> +    info.codec = match &*context.tracks[track_index].mime_type {

&context.tracks[track_index].mime_type[..] might be slightly more idiomatic?
Attachment #8756698 - Flags: review?(kinetik) → review+
(In reply to Matthew Gregan [:kinetik] from comment #3)

> > +    info.codec = match &*context.tracks[track_index].mime_type {
> 
> &context.tracks[track_index].mime_type[..] might be slightly more idiomatic?

I couldn't get that to work. the &* is needed to trigger the Deref trait's conversion from &String to &str.
From IRC: We had crashes on win32 debug with the initial inbound check-in. Which didn't go away after the backout. Trying again with a CLOBBER.
(In reply to Ralph Giles (:rillian) needinfo me from comment #4)
> (In reply to Matthew Gregan [:kinetik] from comment #3)
> 
> > > +    info.codec = match &*context.tracks[track_index].mime_type {
> > 
> > &context.tracks[track_index].mime_type[..] might be slightly more idiomatic?
> 
> I couldn't get that to work. the &* is needed to trigger the Deref trait's
> conversion from &String to &str.

&* is fine anyway, I couldn't remember and dug around afterwards to check.  I dropped the comment in MozReview but I guess it was already published to Bugzilla.
I cannot reproduce the crashes on a local win7 build.
This is now working as part of the changes on the original bug 1267887.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1267887
You need to log in before you can comment on or make changes to this bug.