Closed Bug 1275812 Opened 8 years ago Closed 8 years ago

experiment with propagating codec

Categories

(Core :: Audio/Video: Playback, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1267887

People

(Reporter: rillian, Assigned: rillian)

References

Details

Attachments

(1 file)

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: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: