Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put back video metadata #13094

Merged
merged 1 commit into from Sep 9, 2016
Merged

Put back video metadata #13094

merged 1 commit into from Sep 9, 2016

Conversation

@GuillaumeGomez
Copy link
Contributor

GuillaumeGomez commented Aug 28, 2016

I updated the video-metadata-rs crate: now, no more ffmpeg, just pure rust. The webm format isn't checked yet.


This change is Reviewable

@highfive
Copy link

highfive commented Aug 28, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/lib.rs, components/script/Cargo.toml, components/script/dom/htmlmediaelement.rs
@KiChjang
Copy link
Member

KiChjang commented Aug 28, 2016

Does this require additional libraries to be installed on users' system?

@GuillaumeGomez
Copy link
Contributor Author

GuillaumeGomez commented Aug 28, 2016

No. That's the whole point and the great improvement.

@jdm
Copy link
Member

jdm commented Aug 28, 2016

cc @splav This will impact the plans for using mp4parse.

@jdm
Copy link
Member

jdm commented Aug 28, 2016

r? @Manishearth
By random selection, since I don't intend to review code this week.

@highfive highfive assigned Manishearth and unassigned jdm Aug 28, 2016
@GuillaumeGomez
Copy link
Contributor Author

GuillaumeGomez commented Aug 28, 2016

@jdm: I'll put @Ms2ger on it then.

r? @Ms2ger

@highfive highfive assigned Ms2ger and unassigned Manishearth Aug 28, 2016
@est31
Copy link
Contributor

est31 commented Aug 28, 2016

Related : #13024, #12769.

@splav
Copy link
Contributor

splav commented Aug 28, 2016

First: The current metadata structure seems to be suitable only for video content. Are there any plans to support audio content as well? May we should make it more general to support both?
Second: mp4_parse essentially does not have rust API yet. So the crate uses own patched version that makes some structs public. I saw the PR for mp4_parse, but I don't think it's a good long-term solution and that it will be used.

@GuillaumeGomez
Copy link
Contributor Author

GuillaumeGomez commented Aug 28, 2016

I can make it more general (by providing a higher crate maybe? The name is video-metadata after all). And as for mp4parse, as long as it doesn't need strange dependencies, it's fine for the moment from my point of view.

@splav
Copy link
Contributor

splav commented Aug 28, 2016

@GuillaumeGomez I was talking about Servo's structure. But sure, this can be changed later.

@splav
Copy link
Contributor

splav commented Aug 28, 2016

As for video-metadata - may be it's ok, but ogg can contain audio as well and checking it twice in two crated seems a bit strange.

@GuillaumeGomez
Copy link
Contributor Author

GuillaumeGomez commented Aug 28, 2016

@splav: For the moment, the thing is to target video to get their size. But if there are pure crates to get audio metadata, I can update video-metadata to add them (I still wonder if I should rename it...).

@est31
Copy link
Contributor

est31 commented Aug 28, 2016

My ogg_metadata crate which video-metadata-rs uses supports audio metadata parsing as well as video metadata parsing: it returns the duration and the sample frequency (at least for vorbis, opus has no fixed sampling frequency).

@splav
Copy link
Contributor

splav commented Aug 28, 2016

@est31, @GuillaumeGomez my point that it should be one metadata wrapper crate for servo for both audio and video containers. The other option is to have one crate for audio and one for video leads to parsing ogg container twice: in both video and audio crates. It seems a bit strange for me.

And IMO the crate rename is the thing that should be done the earlier the better, in case the crate will support both audio and video metadata parsing.

@GuillaumeGomez
Copy link
Contributor Author

GuillaumeGomez commented Aug 29, 2016

I created the new crate (which handles both video and audio metadata) and updated this PR.

let dur = meta.audio.duration.unwrap_or(::std::time::Duration::new(0, 0));
*elem.video.borrow_mut() = Some(VideoMedia {
format: format!("{:?}", meta.format),
duration: Duration::seconds(dur.as_secs() as i64) +

This comment has been minimized.

@est31

est31 Aug 29, 2016

Contributor

Maybe use Duration::from_std() here?

This comment has been minimized.

@splav

splav Aug 29, 2016

Contributor

And why not just clone()? Or at least new()

This comment has been minimized.

@est31

est31 Aug 29, 2016

Contributor

@splav dur is of type std::time::Duration, while the VideoMedia struct requires time::Duration from the time crate.

This comment has been minimized.

@splav

splav Aug 29, 2016

Contributor

Oh, yep.

@nox
Copy link
Member

nox commented Aug 29, 2016

Think you could publish audio_video_metadata? Would be great to avoid yet another Git dependency.

@GuillaumeGomez
Copy link
Contributor Author

GuillaumeGomez commented Aug 29, 2016

@nox: No, I have mixed origin for this crate (because mp4rust didn't merge my PR yet) so I can't publish it for the moment.

@bors-servo
Copy link
Contributor

bors-servo commented Aug 29, 2016

Trying commit 04a9f1b with merge d9c324d...

bors-servo added a commit that referenced this pull request Aug 29, 2016
Put back video metadata

I updated the `video-metadata-rs` crate: now, no more ffmpeg, just pure rust. The webm format isn't checked yet.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13094)
<!-- Reviewable:end -->
@GuillaumeGomez
Copy link
Contributor Author

GuillaumeGomez commented Aug 29, 2016

@bors-servo: try retry

@bors-servo
Copy link
Contributor

bors-servo commented Aug 29, 2016

Trying commit 04a9f1b with merge 14c1a39...

bors-servo added a commit that referenced this pull request Aug 29, 2016
Put back video metadata

I updated the `video-metadata-rs` crate: now, no more ffmpeg, just pure rust. The webm format isn't checked yet.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13094)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 29, 2016

💔 Test failed - linux-dev

@nox
Copy link
Member

nox commented Sep 9, 2016

Not only this PR introduces timeouts, but it doesn't seem to make any new test pass.

@GuillaumeGomez
Copy link
Contributor Author

GuillaumeGomez commented Sep 9, 2016

Updated.

@jdm
Copy link
Member

jdm commented Sep 9, 2016

The timeouts are fine, since the reflect the actual state of the world when it comes to audio elements. The current HTMLMediaElement code just lies about understanding audio metadata.

@nox nox removed the S-needs-rebase label Sep 9, 2016
@nox
Copy link
Member

nox commented Sep 9, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

📌 Commit 94379bf has been approved by nox

@highfive highfive assigned nox and unassigned Ms2ger Sep 9, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

Testing commit 94379bf with merge 60d4c03...

bors-servo added a commit that referenced this pull request Sep 9, 2016
Put back video metadata

I updated the `video-metadata-rs` crate: now, no more ffmpeg, just pure rust. The webm format isn't checked yet.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13094)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

💔 Test failed - arm64

@KiChjang
Copy link
Member

KiChjang commented Sep 9, 2016

@bors-servo r+

  • Little PIP-y boy is annoying
@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: #13208
@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

📌 Commit 94379bf has been approved by KiChjang

@highfive highfive assigned KiChjang and unassigned nox Sep 9, 2016
@KiChjang
Copy link
Member

KiChjang commented Sep 9, 2016

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

Testing commit 94379bf with merge 142578f...

bors-servo added a commit that referenced this pull request Sep 9, 2016
Put back video metadata

I updated the `video-metadata-rs` crate: now, no more ffmpeg, just pure rust. The webm format isn't checked yet.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13094)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 9, 2016

☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev

@bors-servo bors-servo merged commit 94379bf into servo:master Sep 9, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:the_comeback branch Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants
You can’t perform that action at this time.