MP4(3)

πŸ“¦ version 2.1.0, in fedora 43, fedora 44

πŸ’– MP4 β€” the manual page, but make it a group chat πŸ’–

okay bestie, listen up, this is MP4(3) β€” the MP4 File Format Library page, and specifically we're talking about MP4AddRtpPacket. yes it's a section 3 library page. yes it's about RTP hints. yes we're gonna have fun. periodt. ✨


🌸 NAME 🌸

MP4AddRtpPacket β€” add an RTP packet πŸ’…

like. that's the whole vibe. it adds an RTP packet. iconic.


✨ SYNTAX ✨

#include <mp4.h>

bool MP4AddRtpPacket(
     MP4FileHandle hFile,
     MP4TrackId trackId,
     bool setMBit = false,
     int32 transmitOffset = 0
);

look at that signature. she's beautiful. two defaults, no notes πŸŽ€


🫢 ARGUMENTS 🫢

  • hFile β€” the mp4 file you're doing the operation on. that's the one. the file. specify it. πŸ’–
  • trackId β€” which hint track this operation applies to. yes, the hint track specifically, not just any track, don't be chaotic.
  • setMBit β€” the value of the RTP packet header marker bit for this packet. and the actual value you should pass? lowkey depends on the rules of the RTP payload your hint track is using, so go check those, bestie, i can't do everything for you πŸ¦‹
  • transmitOffset β€” an offset you slap onto the normal transmission time of this packet. why tho? because the whole purpose of this offset is to let you smooth out packet transmission over the duration of the hint. it's giving ~aesthetic pacing~ ✨

πŸ’€ RETURN VALUES πŸ’€

  • success β†’ true (1) πŸ‘‘
  • error β†’ false (0) 😭

that's it. binary queen.


🌈 DESCRIPTION 🌈

okay so here's the tea. MP4AddRtpPacket creates a brand new RTP packet for the currently pending RTP hint sample of the hint track you specified. πŸŽ€

and the way that it also unlocks the next step?? because after you call this, subsequent calls to MP4AddRtpImmediateData() and MP4AddRtpSampleData can actually add data into those RTP packets. like, this is the door-opener. the main character move. πŸ¦‹

and THEN, once you've created all the RTP packets for the hint, you should call MP4WriteRtpHint() to write the hint to the track. do not skip this step. do not forget. it's the finale. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

go read those too, iykyk πŸ“šβœ¨


k bye, this page is brought to you by Cisco Systems Inc., Version 0.9 β€” and yeah she's an MP4(3) girlie through and through πŸ’œπŸ§šπŸ“ no cap, slay, drink water, call MP4WriteRtpHint(). πŸ’–

πŸ“¦ where this page comes from