LiVES  2.4.1-svn
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
resample.h
Go to the documentation of this file.
1 // resample.h
2 // LiVES
3 // (c) G. Finch 2004 - 2012 <salsaman@gmail.com>
4 // released under the GNU GPL 3 or later
5 // see file ../COPYING or www.gnu.org for licensing details
6 
7 
8 // functions/structs for reordering, resampling video and audio
9 
10 #ifndef HAS_LIVES_RESAMPLE_H
11 #define HAS_LIVES_RESAMPLE_H
12 
13 #if HAVE_SYSTEM_WEED
14 #include <weed/weed.h>
15 #else
16 #include "../libweed/weed.h"
17 #endif
18 
20 typedef struct __resaudw {
21  LiVESWidget *dialog;
22  LiVESWidget *entry_arate;
23  LiVESWidget *entry_achans;
24  LiVESWidget *entry_asamps;
25  LiVESWidget *rb_signed;
26  LiVESWidget *rb_unsigned;
27  LiVESWidget *rb_bigend;
28  LiVESWidget *rb_littleend;
29  LiVESWidget *unlim_radiobutton;
30  LiVESWidget *hour_spinbutton;
31  LiVESWidget *minute_spinbutton;
32  LiVESWidget *second_spinbutton;
33  LiVESWidget *fps_spinbutton;
34  LiVESWidget *aud_checkbutton;
35  LiVESWidget *aud_hbox;
36 } _resaudw;
37 
38 
40 
41 weed_timecode_t q_gint64(weed_timecode_t in, double fps);
42 weed_timecode_t q_gint64_floor(weed_timecode_t in, double fps);
43 weed_timecode_t q_dbl(double in, double fps);
44 
45 
46 weed_plant_t *quantise_events(weed_plant_t *in_list, double new_fps, boolean allow_gap);
47 
49 int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps);
50 
52 
53 // GUI functions
55 void create_new_pb_speed(short type);
56 
61 _resaudw *create_resaudw(short type, render_details *rdet, LiVESWidget *top_vbox);
62 
63 void on_change_speed_activate(LiVESMenuItem *, livespointer);
64 void on_change_speed_ok_clicked(LiVESButton *, livespointer);
65 
66 boolean auto_resample_resize(int width, int height, double fps, int fps_num,
67  int fps_denom, int arate, int asigned, boolean swap_endian);
68 int reorder_frames(int rwidth, int rheight);
69 int deorder_frames(int old_framecount, boolean leave_bak);
70 
71 boolean resample_clipboard(double new_fps);
72 
73 #endif
boolean auto_resample_resize(int width, int height, double fps, int fps_num, int fps_denom, int arate, int asigned, boolean swap_endian)
Definition: resample.c:64
Definition: events.h:108
LiVESWidget * minute_spinbutton
Definition: resample.h:31
int reorder_frames(int rwidth, int rheight)
Definition: resample.c:1953
int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps)
Definition: resample.c:56
LiVESWidget * fps_spinbutton
Definition: resample.h:33
boolean resample_clipboard(double new_fps)
call this to resample clipboard video
Definition: resample.c:2088
void create_new_pb_speed(short type)
window change speed from Tools menu
Definition: resample.c:1609
_resaudw * create_resaudw(short type, render_details *rdet, LiVESWidget *top_vbox)
Definition: resample.c:1078
LiVESWidget * entry_arate
Definition: resample.h:22
LiVESWidget * rb_signed
Definition: resample.h:25
weed_plant_t * quantise_events(weed_plant_t *in_list, double new_fps, boolean allow_gap)
quantise frame events for a single clip
Definition: resample.c:412
LiVESWidget * entry_asamps
Definition: resample.h:24
LiVESWidget * dialog
Definition: resample.h:21
LiVESWidget * rb_unsigned
Definition: resample.h:26
render_details * rdet
Definition: events.h:142
weed_timecode_t q_dbl(double in, double fps)
Definition: resample.c:47
LiVESWidget * aud_hbox
Definition: resample.h:35
LiVESWidget * unlim_radiobutton
Definition: resample.h:29
_resaudw * resaudw
Definition: resample.h:39
int deorder_frames(int old_framecount, boolean leave_bak)
leave_bak is a special mode for the clipboard
Definition: resample.c:2044
void on_change_speed_activate(LiVESMenuItem *, livespointer)
Definition: resample.c:1779
resample audio window
Definition: resample.h:20
LiVESWidget * entry_achans
Definition: resample.h:23
weed_timecode_t q_gint64_floor(weed_timecode_t in, double fps)
Definition: resample.c:41
LiVESWidget * aud_checkbutton
Definition: resample.h:34
LiVESWidget * second_spinbutton
Definition: resample.h:32
LiVESWidget * rb_bigend
Definition: resample.h:27
void on_change_speed_ok_clicked(LiVESButton *, livespointer)
Definition: resample.c:1789
LiVESWidget * rb_littleend
Definition: resample.h:28
weed_timecode_t q_gint64(weed_timecode_t in, double fps)
Definition: resample.c:33
LiVESWidget * hour_spinbutton
Definition: resample.h:30