queue = xine_event_new_queue(stream);
+ check_info();
+
engine.add_stream(*this);
}
xine_dispose(stream);
}
-string XineStream::get_title() const
-{
- const char *title = xine_get_meta_info(stream, XINE_META_INFO_TITLE);
- return (title ? title : string());
-}
-
void XineStream::play()
{
xine_play(stream, 0, 0);
xine_event_free(event);
}
+ check_info();
+}
+
+void XineStream::check_info()
+{
+ const char *xt = xine_get_meta_info(stream, XINE_META_INFO_TITLE);
+ if(xt)
+ {
+ if(title.compare(xt))
+ {
+ title = xt;
+ signal_title_changed.emit(title);
+ }
+ }
+ else if(!title.empty())
+ {
+ title.clear();
+ signal_title_changed.emit(title);
+ }
+
int dur_msec, pos_msec;
xine_get_pos_length(stream, 0, &pos_msec, &dur_msec);
Time::TimeDelta dur = dur_msec*Time::msec;