class
Crowbar::Rules::MP3Rule
- Crowbar::Rules::MP3Rule
- Crowbar::Rule
- Reference
- Object
Overview
Structure-preserving rule for MPEG Audio Layer III (MP3) files and streams. Preserves ID3v2 metadata headers and MPEG audio frame sync words (0xFF 0xE0+), while mutating ID3 tags, MPEG audio frame headers (bitrates, sample frequencies, channel modes, CRC protection), and audio bitstream payload frames.
Defined in:
crowbar/rules/mp3.crInstance Method Summary
-
#apply(context : Context, buffer : Buffer) : Bool
Applies a structure-preserving transformation to the buffer
- #description : String
-
#find_frame_offsets(buffer : Buffer, start_offset : Int32) : Array(Int32)
Scans buffer for MPEG audio frame header offsets
-
#is_frame_sync?(buffer : Buffer, offset : Int32) : Bool
Checks if the given offset contains an MPEG audio frame sync (11 bits set)
-
#match?(buffer : Buffer) : Bool
Checks whether the buffer matches the format handled by this rule
- #name : String
Instance methods inherited from class Crowbar::Rule
apply(context : Context, buffer : Buffer) : Bool
apply,
description : String
description,
match?(buffer : Buffer) : Bool
match?,
name : String
name,
targets(*targets : Symbol)
targets,
weight : Float64
weight,
weight=(weight : Float64)
weight=
Constructor methods inherited from class Crowbar::Rule
new(weight : Float64 = 1.0)
new
Instance Method Detail
Applies a structure-preserving transformation to the buffer
Scans buffer for MPEG audio frame header offsets
Checks if the given offset contains an MPEG audio frame sync (11 bits set)
Checks whether the buffer matches the format handled by this rule