Skip to content

Commit

Permalink
Merge branch 'release/2024.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sile committed Dec 5, 2024
2 parents 9ad6574 + 0dd6729 commit 40bd004
Show file tree
Hide file tree
Showing 10 changed files with 527 additions and 46 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@

## develop

## 2024.4.0

- [ADD] AAC 用のボックスを追加する
- @sile
- [UPDATE] `ChunkAccessor``SampleAccessor` の一部のメソッドのライフタイム制約が必要以上に厳しかったのを緩くする
- @sile

## 2024.3.0

- [CHANGE] `Encode::encode()``writer: &mut W` ではなく `writer: W` を引数に取るように変更する
Expand Down
72 changes: 36 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shiguredo_mp4"
version = "2024.3.0"
version = "2024.4.0"
edition = "2021"
authors = ["Shiguredo Inc."]
license = "Apache-2.0"
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ WebAssembly を使ったサンプルを GitHub Pages に用意しています。
- [MP4 Dump](https://shiguredo.github.io/mp4-rust/examples/dump/)
- [MP4 Transcode](https://shiguredo.github.io/mp4-rust/examples/transcode/)

## 規格書

- ISO/IEC 14496-1
- ISO/IEC 14496-12
- ISO/IEC 14496-14
- ISO/IEC 14496-15
- https://www.webmproject.org/vp9/mp4/
- https://aomediacodec.github.io/av1-isobmff/
- https://gitlab.xiph.org/xiph/opus/-/blob/main/doc/opus_in_isobmff.html

## ライセンス

Apache License 2.0
Expand Down
8 changes: 4 additions & 4 deletions src/aux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ pub struct SampleAccessor<'a, T> {
index: NonZeroU32,
}

impl<T: AsRef<StblBox>> SampleAccessor<'_, T> {
impl<'a, T: AsRef<StblBox>> SampleAccessor<'a, T> {
/// このサンプルのインデックスを取得する
pub fn index(&self) -> NonZeroU32 {
self.index
Expand Down Expand Up @@ -371,7 +371,7 @@ impl<T: AsRef<StblBox>> SampleAccessor<'_, T> {
}

/// サンプルが属するチャンクの情報を返す
pub fn chunk(&self) -> ChunkAccessor<T> {
pub fn chunk(&self) -> ChunkAccessor<'a, T> {
let i = self
.sample_table
.sample_index_offsets
Expand All @@ -391,7 +391,7 @@ pub struct ChunkAccessor<'a, T> {
index: NonZeroU32,
}

impl<T: AsRef<StblBox>> ChunkAccessor<'_, T> {
impl<'a, T: AsRef<StblBox>> ChunkAccessor<'a, T> {
/// このチャンクのインデックスを取得する
pub fn index(&self) -> NonZeroU32 {
self.index
Expand All @@ -407,7 +407,7 @@ impl<T: AsRef<StblBox>> ChunkAccessor<'_, T> {
}

/// チャンクが参照するサンプルエントリー返す
pub fn sample_entry(&self) -> &SampleEntry {
pub fn sample_entry(&self) -> &'a SampleEntry {
&self.sample_table.stbl_box().stsd_box.entries
[self.stsc_entry().sample_description_index.get() as usize - 1]
}
Expand Down
Loading

0 comments on commit 40bd004

Please sign in to comment.