[haiku-bugs] Re: [Haiku] #6564: [MediaPlayer] show duration in playlist window (easy)

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Tue, 05 Jan 2016 07:43:51 -0000

#6564: [MediaPlayer] show duration in playlist window (easy)
----------------------------------------+----------------------------
   Reporter:  diver                     |      Owner:  stippi
       Type:  enhancement               |     Status:  new
   Priority:  normal                    |  Milestone:  R1
  Component:  Applications/MediaPlayer  |    Version:  R1/Development
 Resolution:                            |   Keywords:
 Blocked By:                            |   Blocking:
Has a Patch:  1                         |   Platform:  All
----------------------------------------+----------------------------

Comment (by pulkomandy):

 {{{PlaylistWindow::_GetInitialDuration()}}}
 This will generate a BMessage for each item. You could instead put all
 items in a single message? (you can add the same entry several times to a
 message, then use a for loop at the receiving side to get them all)

 {{{PlaylistWindow::_UpdateDuration(bigtime_t duration)}}}

 Instead of using the << operator for concatenating, please use
 {{{BString.SetToFormat}}}. This will give more control to people
 localizing it (maybe they will need the duration before the label in some
 languages).

 General comments: there is no clear identification of the "total duration"
 vs. individual file. I would try to name the methods accordingly to avoid
 confusion.

 About the attribute: you couldn't find anything because I gave you the
 wrong name. It is named Media:Length. You can see it in the video and
 audio supertypes
 (https://github.com/haiku/haiku/blob/master/src/data/mime_db/video.super)
 and the ML thread where it was defined: //www.freelists.org/post
 /haiku-development/Defining-more-standard-attributes,25

--
Ticket URL: <https://dev.haiku-os.org/ticket/6564#comment:11>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: