~walkerlee/totem/pre-interview

« back to all changes in this revision

Viewing changes to src/plugins/zeitgeist-dp/totem-zeitgeist-dp-plugin.vala

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-26 00:07:51 UTC
  • mfrom: (1.6.1) (24.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130526000751-kv8ap3x1di4qq8j2
Tags: 3.8.2-0ubuntu1
* Sync with Debian. Remaining changes: 
* debian/control.in:
  - Drop build-depends on libepc-ui-dev and libgrilo-0.2-dev (in universe)
  - Drop libxtst-dev build-depends so that the (redundant) fake key presses
    for inhibiting the screensaver are disabled (LP: #1007438)
  - Build-depend on libzeitgeist-dev
  - Suggest rather than recommend gstreamer components in universe
  - Add totem-plugins-extra
  - Add XB-Npp-Description and XB-Npp-Filename header to the 
    totem-mozilla package to improve ubufox/ubuntu plugin db integration 
  - Refer to Firefox in totem-mozilla description instead of Iceweasel
  - Don't have totem-mozilla recommend any particular browser
  - Drop obsolete python library dependencies since iplayer is no longer
    included
* debian/totem-common.install, debian/source_totem.py:
  - Install Ubuntu apport debugging hook
* debian/totem-plugins-extra.install:
  - Universe plugins split out of totem-plugins (currently only gromit)
* debian/totem-plugins.install:    
  - Skip the plugins split to -extra and add the zeitgeist plugin
* debian/rules:
  - Build with --fail-missing, to ensure we install everything. 
    + Ignore libtotem.{,l}a since we delibrately don't install these.
  - Re-enable hardening, make sure both PIE and BINDNOW are used
    by setting hardening=+all. (LP: #1039604)
* debian/patches/91_quicklist_entries.patch:
  - Add static quicklist
* debian/patches/92_gst-plugins-good.patch:
  - Build without unnecessary gstreamer1.0-bad dependency
* debian/patches/93_grilo_optional.patch:
  - Allow building without grilo while grilo MIR is still pending
* debian/patches/correct_desktop_mimetypes.patch:
  - Don't list the mimetypes after the unity lists
* debian/patches/revert_shell_menu.patch: 
  - revert the use of a shell menu until indicator-appmenu can handle
    the mixed shell/traditional menus itself
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
    current_media = MediaInfo ();
34
34
 
35
 
    signals += Signal.connect_swapped (totem, "file-opened",
36
 
                                       (Callback) file_opened, this);
 
35
    signals += Signal.connect_swapped (totem, "file-has-played",
 
36
                                       (Callback) file_has_played, this);
37
37
    signals += Signal.connect_swapped (totem, "file-closed",
38
38
                                       (Callback)file_closed, this);
39
39
    signals += Signal.connect_swapped (totem, "metadata-updated",
84
84
    timeout_id = Timeout.add (interval, timeout_cb);
85
85
  }
86
86
 
87
 
  private void file_opened (string mrl, Totem.Object totem) {
88
 
    if (current_media.mrl != null) {
89
 
      /* we don't always get file-closed, so lets simulate it */
 
87
  private void file_has_played (string mrl, Totem.Object totem) {
 
88
    if (current_media.mrl != null)
90
89
      file_closed (totem);
91
 
    }
92
90
 
93
91
    current_media = MediaInfo ();
94
92
    current_media.mrl = mrl;
155
153
    var f = File.new_for_uri (mrl);
156
154
 
157
155
    try {
158
 
      var fi = yield f.query_info_async (FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
 
156
      var fi = yield f.query_info_async (FileAttribute.STANDARD_CONTENT_TYPE,
159
157
                                         0, Priority.DEFAULT_IDLE, null);
160
158
 
161
159
      if (current_media.mrl != mrl || !totem.is_playing ()) return;
174
172
 
175
173
    if (current_media.title != null && totem.is_playing ()) {
176
174
      Value val;
177
 
      var video = Totem.get_video_widget (totem) as Bacon.VideoWidget;
 
175
      var video = totem.get_video_widget () as Bacon.VideoWidget;
178
176
      video.get_metadata (Bacon.MetadataType.HAS_VIDEO, out val);
179
177
      current_media.interpretation = val.get_boolean () ?
180
178
        Zeitgeist.NFO_VIDEO : Zeitgeist.NFO_AUDIO;