[Merge] lp:~d.filoni/media-hub/improve_content_type_recognition into lp:media-hub

Devid Antonio Filoni devidfil at gmail.com
Tue Nov 8 17:08:34 UTC 2016


Devid Antonio Filoni has proposed merging lp:~d.filoni/media-hub/improve_content_type_recognition into lp:media-hub.

Requested reviews:
  Ubuntu Phablet Team (phablet-team)

For more details, see:
https://code.launchpad.net/~d.filoni/media-hub/improve_content_type_recognition/+merge/310339

file_info_from_uri (gstreamer/playbin.cpp) cannot recognize content type of remote files. When the content type is not recognized "audio/video/" is returned as content type, however, as is_video_file function searches for a content type starting with "video/", a video is never recognized and only the audio is played as described in bug #1446260 (is_video_file always returns false and is_audio_file returns true so MEDIA_FILE_TYPE_AUDIO is set as file_type)
Proposed branch calls g_content_type_guess on filename in order to try to find content type parsing file extension only when a content type was not found by file_info_from_uri. This branch is not a real fix for bug #1446260, the real solution would be to parse content type from remote files, however it helps to recognize many video files (like the one in bug description).
In order to avoid regressions, g_content_type_guess output is considered valid only if a "video/" content type is recognized, otherwise it will fails to "audio/video/".

What I tested on mako:
- local files (video)
- bug #1446260 : mediaplayer-app http://wbads.vo.llnwd.net/o25/u/telepixtv/videos/ellen/20150320/594/0_fu4qgsy7_0_obx408yq_2.mp4 --desktop_file_hint=/usr/share/applications/mediaplayer-app.desktop
- uradio
Everything works fine.
-- 
Your team Ubuntu Phablet Team is requested to review the proposed merge of lp:~d.filoni/media-hub/improve_content_type_recognition into lp:media-hub.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 1258 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-reviews/attachments/20161108/370e3b45/attachment-0001.diff>


More information about the Ubuntu-reviews mailing list