[Merge] lp:~phablet-team/media-hub/metadata-lp1368290 into lp:media-hub
Alfonso Sanchez-Beato
alfonso.sanchez-beato at canonical.com
Mon Aug 22 06:30:31 UTC 2016
See answers to comments.
Diff comments:
> === modified file 'src/core/media/gstreamer/engine.cpp'
> --- src/core/media/gstreamer/engine.cpp 2016-07-11 01:21:38 +0000
> +++ src/core/media/gstreamer/engine.cpp 2016-08-19 15:58:22 +0000
> @@ -208,7 +208,9 @@
>
> void on_tag_available(const gstreamer::Bus::Message::Detail::Tag& tag)
> {
> - media::Track::MetaData md;
> + // Note that we update the metadata instead of changing it. This is needed
> + // as not all tags are refreshed each time we get a tag message.
> + media::Track::MetaData md = std::get<1>(track_meta_data.get());
It is changed, by on_tag_available(). We get a copy of the metadata, update it, and replace the old one.
> gstreamer::MetaDataExtractor::on_tag_available(tag, md);
> track_meta_data.set(std::make_tuple(playbin.uri(), md));
> }
> @@ -429,6 +431,9 @@
> bool gstreamer::Engine::open_resource_for_uri(const media::Track::UriType& uri,
> bool do_pipeline_reset)
> {
> + media::Track::MetaData md;
> +
> + d->track_meta_data.set(std::make_tuple(uri, md));
We are setting a new URI so we remove old metadata. Note that we are updating the metadata now instead of just replacing it when a new tag message comes, so a clean-up when a new uri is set is needed now.
> d->playbin.set_uri(uri, core::ubuntu::media::Player::HeadersType{}, do_pipeline_reset);
> return true;
> }
--
https://code.launchpad.net/~phablet-team/media-hub/metadata-lp1368290/+merge/303435
Your team Ubuntu Phablet Team is subscribed to branch lp:media-hub.
More information about the Ubuntu-reviews
mailing list