From: R. B. <ro...@pa...> - 2003-04-14 15:21:22
|
Michael Roitzsch writes: > On the other hand, the UI_SET_TITLE method is much more flexible, since > it allows arbitrary names for these navigation entities. I think I see your point but I am not sure I totally agree. UI_SET_TITLE is already used to mean "set some sort of title" in the front end. That's already dedicated. So I was proposing to use *another* UI_SET_XXX in *addition* to XINE_STREAM_XXX or XINE_META_INFO_XXX. Comparing adding another event or another meta information, I don't see how one is more flexible than the other. Here's the difference in coding: uevent.type = XINE_EVENT_UI_SET_XXX; uevent.stream = this->stream; uevent.data = &data; uevent.data_length = sizeof(data); memcpy(data.str, str, strlen(info) + 1); data.str_len = strlen(info) + 1; xine_event_send(this->stream, &uevent); vs. stream->meta_info[XINE_META_INFO_XXX] = strdup(info); Setting meta is simpler, but with xine_event_send(), the effect is more immediate. Setting meta info, it's up to the front end to notice a change. For the information we're talking about here, I don't think it's all that crucial to the information updated immediately. The default behavior in the Video CD an CD-DA plugins sets the track name in the display, and in fact what I see right now is that the title gets updated before playing because there are audio or video in buffers that haven't played. But perhaps by "more flexible" you meant that "title display" contains a bunch of uninterpreted text. Yes that's flexible, but not all that helpful and in some skins wasteful of screen real estate. In my CD-DA and Video plugins you in fact can customize that to show the Track (which makes sense in both plugins), Segment (which makes sense only for Video CD's), or CDDB Disc ID (which makes sense only for CD-DA). Or decide not to show them among many other possibilities. If you don't want the word "Track" to appear, you can make it say or "Spur", "Piste", "Pista" or whatever. And as far as I know, these are the only plugins that do let you customize the display. So you are preaching to the choir here (my plugins are already 'more flexible.') But the designer of Celanoma clearly was trying to model the display of real hardware media players and that's not a bad starting point. Many of them have a digital display. Also, it might be helpful in the stream information to have a portion for that digit display. > "Track" and > "Chapter" sounds very CDDA/VCD specific. > From the DVD standpoint, these > should be called "Title" and "Part". Other inputs might have even > different names (DVB might want something like "Channel"). Track might be specific to CD-DA and Video CD (and for DVD's it's not all that unacceptable to call a title a track), but Chapter isn't. The Video CD word is "Entry." And there is no such subdivision for CD-DA. I used the word "Track" and "Chapter" merely because in Celanoma there is a T field and a CH field (which could mean "chapter" or "channel"). So would people prefer #define XINE_STREAM_CH_NUM 27 /* chapter or channel, or ... */ #define XINE_META_INFO_T_NUM 10 /* track or title, or ... */ ? > So we should be very careful not to make the metainfo too specific for > certain input plugins. Actually it already is very specific. There already are fields for "Genre", "Album", "Year", "Has Chapters" (not "Has Channels" or "Has Parts" ;-) But I have a suggestion here. There is no reason that these fields can't be reused in ways appropriate for that format. In fact I already do that in the Video CD plugin. I use the "Genre" field for the video format (VCD 1.0, VCD 2.0, SVCD). What's missing is the ability to customize that title for that format so instead of "Genre" is says "Video Format". And to make it less hoaky on setup one could change xine.h.in from: #define XINE_META_INFO_GENRE 3 to: #define XINE_META_INFO_GENRE 3 /* used by CD-DA */ #define XINE_META_INFO_VIDEO_CD_FORMAT 3 /* used by Video CD's */ |