<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>3316</bug_id>
          
          <creation_ts>2003-11-25 10:59:49 +0300</creation_ts>
          <short_desc>libGLwrapper don&apos;t filter video4linux devices while search appropriate GLX device</short_desc>
          <delta_ts>2005-12-24 01:16:28 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>libGLwrapper</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey V. Novikov">shader</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>pilot</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10728</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey V. Novikov">shader</who>
    <bug_when>2003-11-25 10:59:49 +0300</bug_when>
    <thetext>libGLwrapper-5.0.1-alt7.
libGLwrapper don&apos;t filter video4linux devices while search appropriate GLX 
device. For example, AVerMedia tvtuner &amp; NVidia GeForce 4 (and any other).
In this example libGLwrapper can&apos;t find NV in this string (string 84 from 
GLwrapper-0.1.8-nv_and_fglrx.patch) 

if (ainfo &amp;&amp; strstr (ainfo[0].name, &quot;NV&quot;)) 

because ainfo[0] -&gt; video4linux.:(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13793</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2004-05-14 19:22:04 +0400</bug_when>
    <thetext>посмотрим.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13794</commentid>
    <comment_count>2</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2004-05-14 19:22:39 +0400</bug_when>
    <thetext>покажите мне пожалуйста xvinfo с этой машины
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13914</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey V. Novikov">shader</who>
    <bug_when>2004-05-18 08:47:22 +0400</bug_when>
    <thetext>Вот слегка поскипанный:

X-Video Extension version 2.2
screen #0
  Adaptor #0: &quot;video4linux&quot;
    number of ports: 1
    port base: 139
    operations supported: PutVideo 
    supported visuals:
&lt;skip&gt;
    number of attributes: 11
&lt;skip&gt;
    number of encodings: 9
&lt;skip&gt;
  Adaptor #1: &quot;NV17 Video Overlay&quot;
    number of ports: 1
    port base: 140
    operations supported: PutImage 
    supported visuals:
&lt;skip&gt;
    number of attributes: 9
&lt;skip&gt;
    maximum XvImage size: 2046 x 2046
    Number of image formats: 4
&lt;skip&gt;
  Adaptor #2: &quot;NV05 Video Blitter&quot;
    number of ports: 32
    port base: 141
    operations supported: PutImage 
    supported visuals:
&lt;skip&gt;
    no port attributes defined
    maximum XvImage size: 2046 x 2046
    Number of image formats: 5
&lt;skip&gt;
  Adaptor #3: &quot;NVIDIA Video Interface Port&quot;
    number of ports: 1
    port base: 173
    operations supported: PutVideo 
    supported visuals:
&lt;skip&gt;
    number of attributes: 9
&lt;skip&gt;
    number of encodings: 2
&lt;skip&gt;

Как я говорил, первым идет tvtuner.
Для себя я решил проблему прикладыванием
небольшого патча (прикладывается после GLwrapper-0.1.8-nv_and_fglrx.patch):

diff -uNr Mesa-5.0.1.orig/GLwrapper-0.1.8/GLwrapper.c Mesa-5.0.1/GLwrapper-0.1.
8/GLwrapper.c
--- Mesa-5.0.1.orig/GLwrapper-0.1.8/GLwrapper.c	Sat Nov 29 17:09:46 2003
+++ Mesa-5.0.1/GLwrapper-0.1.8/GLwrapper.c	Sat Nov 29 19:11:50 2003
@@ -202,6 +202,7 @@
       int ignore;
       int version;
       struct display_dispatch *d;
+      unsigned int glx_adp_ind, glx_adp_fnd;
 
 
       /* get overridden libraries filename by environment variable */
@@ -231,18 +232,26 @@
 	  version = VendorRelease(dpy);
 	  if (version &gt;= 4000) 
 	    {
-	      if (ainfo &amp;&amp; strstr (ainfo[0].name, &quot;NV&quot;)) 
-		{
-		  current_lib = xf4_nv_lib;
-		  alt_current_lib = NULL;
+	      glx_adp_ind = 0;
+	      glx_adp_fnd = 0;
+	      while(!glx_adp_fnd &amp;&amp; glx_adp_ind &lt; nadaptors)
+	        {
+	          if (ainfo &amp;&amp; strstr (ainfo[glx_adp_ind].name, &quot;NV&quot;)) 
+		    {
+		      current_lib = xf4_nv_lib;
+		      alt_current_lib = NULL;
+		      glx_adp_fnd = 1;
+		    } 
+	          else if (ainfo &amp;&amp; strstr (ainfo[glx_adp_ind].name, &quot;ATI&quot;) &amp;&amp; 
+		           (ainfo[glx_adp_ind].base_id == 61) &amp;&amp; !strstr 
(ainfo[glx_adp_ind].name, &quot;mach&quot;))
+		    {
+		      current_lib = xf4_fglrx_lib;
+		      alt_current_lib = NULL;
+		      glx_adp_fnd = 1;
+		    }
+		  glx_adp_ind++;    
 		} 
-	      else if (ainfo &amp;&amp; strstr (ainfo[0].name, &quot;ATI&quot;) &amp;&amp; 
-		       (ainfo[0].base_id == 61) &amp;&amp; !strstr (ainfo[0].name, &quot;mach&quot;))
-		{
-		  current_lib = xf4_fglrx_lib;
-		  alt_current_lib = NULL;
-		} 
-	      else 
+	      if(!glx_adp_fnd) 
 		{
 		  current_lib = xf4_glx_lib;
 		  alt_current_lib = alt_xf4_glx_lib;
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14373</commentid>
    <comment_count>4</comment_count>
    <who name="Denis Ovsienko">pilot</who>
    <bug_when>2004-05-28 12:50:51 +0400</bug_when>
    <thetext>Возможно, из-за этого у меня дома рендеринг стал софтовым примерно после
установки тюнера. Проверю.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14403</commentid>
    <comment_count>5</comment_count>
    <who name="Denis Ovsienko">pilot</who>
    <bug_when>2004-05-29 19:13:51 +0400</bug_when>
    <thetext>Выбросил тюнер, не загружаю v4l в иксах. Рендеринг по-прежнему софтовый, так что
v4l в моём случае не при чём.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19897</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey V. Novikov">shader</who>
    <bug_when>2004-11-18 13:59:23 +0300</bug_when>
    <thetext>libGLwrapper-5.0.2-alt2, система Alt Linux 2.4 Master DVD Edition
все то же самое.:(
попрежнему нет 3D при наличии v4l.:(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26120</commentid>
    <comment_count>7</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2005-06-20 19:03:48 +0400</bug_when>
    <thetext>в Sisyphus больше не используется libGLwrapper, эта подсистема переписана.
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>