~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/tools/temporal/temp_show_frame.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2   temp_show_frame.c
  3 
  4   Functions to display temporal frames
  5 
  6   author: a.lacey
  7   date  : 14-4-93; version 1.0
  8           4.12.95; version 2.0
  9 */
 10 
 11 
 12 #include <stdio.h>
 13 #include <tina/sys.h>
 14 #include <tina/sysfuncs.h>
 15 #include <tina/math.h>
 16 #include <tina/mathfuncs.h>
 17 #include <tina/vision.h>
 18 #include <tina/visionfuncs.h>
 19 #include <tina/tv.h>
 20 #include <tina/image.h>
 21 #include <tina/tempdefs.h>
 22 #include <tina/temporal.h>
 23 #include <tina/temppro.h>
 24 
 25 
 26 
 27 int       show_last(Sequence *data)
 28 {
 29   List  *lptr = get_current_el();
 30   Tv      *tv_ptr = temp_tv_get();
 31 
 32   if (tv_ptr == NULL)
 33     return(0);
 34 
 35   if ((lptr == NULL) || (lptr->last == NULL) || (lptr->last->to == NULL))
 36     return(0);
 37 
 38   lptr = lptr->last;
 39   set_current_el(lptr);
 40   temp_image_set(lptr->to);
 41 
 42   tv_free_background(tv_ptr);
 43   tv_repaint(tv_ptr);
 44   temp_show_bits(data);
 45 
 46   return(1);
 47 }
 48 
 49 
 50 int       show_next(Sequence *data)
 51 {
 52   List  *lptr = get_current_el();
 53   Tv      *tv_ptr = temp_tv_get();
 54 
 55   if (tv_ptr == NULL)
 56     return(0);
 57 
 58   if ((lptr == NULL) || (lptr->next == NULL) || (lptr->next->to == NULL))
 59     return(0);
 60 
 61   lptr = lptr->next;
 62   set_current_el(lptr);
 63   temp_image_set(lptr->to);
 64 
 65   tv_free_background(tv_ptr);
 66   tv_repaint(tv_ptr);
 67   temp_show_bits(data);
 68 
 69   return(1);    
 70 }
 71 
 72 
 73 
 74 int       show_first(Sequence *data)
 75 {
 76   List  *lptr = get_start_el();
 77   Tv            *tv_ptr = temp_tv_get();
 78 
 79   if (tv_ptr == NULL)
 80     return(0);
 81 
 82   if ((lptr == NULL) || (lptr->to == NULL))
 83     return(0);
 84 
 85   set_current_el(lptr);
 86   temp_image_set(lptr->to);
 87 
 88   tv_free_background(tv_ptr);
 89   tv_repaint(tv_ptr);
 90   temp_show_bits(data);
 91 
 92   return(1);
 93 }
 94 
 95 
 96 
 97 int       show_end(Sequence *data)
 98 {
 99   List *lptr = get_end_el();
100   Tv     *tv_ptr = temp_tv_get();
101 
102 
103   if (tv_ptr == NULL)
104     return(0);
105   
106   if ((lptr == NULL) || (lptr->to == NULL))
107     return(0);
108 
109   set_current_el(lptr);
110   temp_image_set(lptr->to);
111 
112   tv_free_background(tv_ptr);
113   tv_repaint(tv_ptr);
114   temp_show_bits(data);
115 
116   return(1);
117 }
118 
119 
120 int       goto_frame(Sequence *data)
121 {
122   List   *lptr = get_current_el();
123   List   *find_frame();
124   Tv       *tv_ptr = temp_tv_get();
125 
126   if (tv_ptr == NULL)
127     return(0);
128 
129   if (data->goto_frame-data->seq_start < 0)
130     {
131       error("can't use negative frames ", warning);
132       return(0);
133     }
134 
135   if ((lptr = find_frame(data)) != get_current_el())
136     {
137       temp_image_set(lptr->to);
138       set_current_el(lptr);
139       tv_free_background(tv_ptr);
140       tv_repaint(tv_ptr);
141       temp_show_bits(data);
142 
143     }
144   return(1);
145 }
146 
147 
148 int    first_frame(void)
149 {
150 /*
151   Just like show_first except it doesn't display and it is thus quicker
152 */
153 
154   List *lptr = get_start_el();
155   Tv     *tv_ptr = temp_tv_get();
156 
157   if (tv_ptr == NULL)
158     return(-1);
159 
160   if ((lptr == NULL) || (lptr->to == NULL))
161     return(-1);
162 
163   set_current_el(lptr);
164   temp_image_set(lptr->to);
165 
166   return (0);
167 }
168 
169 
170 
171 int     next_frame(void)
172 {
173 /*
174   Just like show_next except it doesn't display and it is thus quicker
175 */
176   List  *lptr = get_current_el();
177   Tv      *tv_ptr = temp_tv_get();
178 
179   if (tv_ptr == NULL)
180     return (-1);
181 
182   if ((lptr == NULL) || (lptr->next == NULL) || (lptr->next->to == NULL))
183     return (-1);
184 
185   lptr = lptr->next;
186   set_current_el(lptr);
187   temp_image_set(lptr->to);
188   return(0);
189 }
190 
191 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.