{"id":44,"date":"2007-08-14T17:46:56","date_gmt":"2007-08-14T20:46:56","guid":{"rendered":"http:\/\/labs.morpheuz.eng.br\/blog\/14\/08\/2007\/xv-and-mplayer-on-maemo\/"},"modified":"2007-08-14T17:46:56","modified_gmt":"2007-08-14T20:46:56","slug":"xv-and-mplayer-on-maemo","status":"publish","type":"post","link":"https:\/\/blog.morpheuz.cc\/?p=44","title":{"rendered":"Xv and MPlayer on Maemo"},"content":{"rendered":"<p>Last week I had a problem with MPlayer using the option &#8220;-wid&#8221; while doing some test applications: every time that the video came back from fullscreen (while playing on a given window) it crashed.<\/p>\n<p>After <strike>some<\/strike> a lot of tests with the help of Leonardo Sobral, we discovered that Maemo&#8217;s Xv had a problem with X errors. Following <a href=\"http:\/\/www.gossamer-threads.com\/lists\/engine?do=post_view_printable;post=19711;list=maemo\" target=\"_blank\" rel=\"noopener noreferrer\">some info on the maemo-dev list<\/a> we reached a thread where Daniel Stone (Nokia) and Siarhei Siamashka (MPlayer for Maemo) were having a discussion about bugs on Xv and video output in general.<\/p>\n<p>Daniel Stone gave us a tip of ignoring X errors and just &#8220;keep going&#8221; as they never happened. After changing some emails with Siarhei, we decided that it was probably the best thing to do.<\/p>\n<p>After that I started reading <a href=\"http:\/\/www.sbin.org\/doc\/Xlib\/chapt_02.html\" target=\"_blank\" rel=\"noopener noreferrer\">this document<\/a> about X (it&#8217;s a really good doc for beginners on X) and realized that it was easy to make a patch for MPlayer (actually, Xv driver for MPlayer) to just ignore X errors (we were getting Bad Value error).<\/p>\n<p>Using the function <em>XSetErrorHandler<\/em> I could set a function to be the error handler. This function must have a signature like this:<\/p>\n<p align=\"center\"><em>\u00a0x_window_error_handler(Display *display, XErrorEvent *error_event)<\/em><\/p>\n<p align=\"left\">And you can get the error (integer value) inside <em>error_event-&gt;error_code<\/em> . Just did some log procedures and then returned 0 (zero) as nothing happened and there is it! A fully working fullscreen feature on MPlayer when it&#8217;s using Xv and &#8220;-wid&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week I had a problem with MPlayer using the option &#8220;-wid&#8221; while doing some test applications: every time that the video came back from fullscreen (while playing on a given window) it crashed. After some a lot of tests with the help of Leonardo Sobral, we discovered that Maemo&#8217;s Xv had a problem with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-maemo"],"_links":{"self":[{"href":"https:\/\/blog.morpheuz.cc\/index.php?rest_route=\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.morpheuz.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.morpheuz.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.morpheuz.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.morpheuz.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=44"}],"version-history":[{"count":0,"href":"https:\/\/blog.morpheuz.cc\/index.php?rest_route=\/wp\/v2\/posts\/44\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.morpheuz.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.morpheuz.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.morpheuz.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}