[haiku-development] Re: Subtitles support

  • From: Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 26 Jun 2016 14:05:09 +0200

Hi,


In the end, BMediaFile will expose one or more BMediaTracks additionally
to the other ones, for example audio, video, English subs, Italian subs.
When reading a track the client will know that once sizeof(media_subtitle)
bytes are read a complete media_subtitle struct can be reconstructed by
casting that memory.


Just two little follow-up considerations. Since BMediaTrack is working on
frames, I think each subtitle structure should be considered as being a
frame. Additionally I considered simplifying the structure so that the
format negotiation can allow to choose in which format the subtitle will be
provided, but this is going to make things complex.

The media_header struct is specifying itself a presentation time, an
alternative to what I wrote in the previous email could be to add an
end_time field and let the client use that.

Other related posts: