LiVES  2.4.6
 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 
19 
20 #define RESIZE_ALL_NEEDS_CONVERT 1
21 #define LETTERBOX_NEEDS_COMPOSITE 1
22 #define LETTERBOX_NEEDS_CONVERT 1
23 
25 typedef struct __resaudw {
26  LiVESWidget *dialog;
27  LiVESWidget *entry_arate;
28  LiVESWidget *entry_achans;
29  LiVESWidget *entry_asamps;
30  LiVESWidget *rb_signed;
31  LiVESWidget *rb_unsigned;
32  LiVESWidget *rb_bigend;
33  LiVESWidget *rb_littleend;
34  LiVESWidget *unlim_radiobutton;
35  LiVESWidget *hour_spinbutton;
36  LiVESWidget *minute_spinbutton;
37  LiVESWidget *second_spinbutton;
38  LiVESWidget *fps_spinbutton;
39  LiVESWidget *aud_checkbutton;
40  LiVESWidget *aud_hbox;
41 } _resaudw;
42 
43 
45 
46 weed_timecode_t q_gint64(weed_timecode_t in, double fps);
47 weed_timecode_t q_gint64_floor(weed_timecode_t in, double fps);
48 weed_timecode_t q_dbl(double in, double fps);
49 
50 
51 weed_plant_t *quantise_events(weed_plant_t *in_list, double new_fps, boolean allow_gap);
52 
54 int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps);
55 
57 
58 // GUI functions
60 void create_new_pb_speed(short type);
61 
66 _resaudw *create_resaudw(short type, render_details *rdet, LiVESWidget *top_vbox);
67 
68 void on_change_speed_activate(LiVESMenuItem *, livespointer);
69 void on_change_speed_ok_clicked(LiVESButton *, livespointer);
70 
71 boolean auto_resample_resize(int width, int height, double fps, int fps_num,
72  int fps_denom, int arate, int asigned, boolean swap_endian);
73 int reorder_frames(int rwidth, int rheight);
74 int deorder_frames(int old_framecount, boolean leave_bak);
75 
76 boolean resample_clipboard(double new_fps);
77 
78 #endif
Definition: events.h:108
LiVESWidget * minute_spinbutton
Definition: resample.h:36
LiVESWidget * fps_spinbutton
Definition: resample.h:38
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
LiVESWidget * entry_arate
Definition: resample.h:27
LIVES_INLINE weed_timecode_t q_gint64_floor(weed_timecode_t in, double fps)
Definition: resample.c:41
LiVESWidget * rb_signed
Definition: resample.h:30
int reorder_frames(int rwidth, int rheight)
Definition: resample.c:1981
LiVESWidget * entry_asamps
Definition: resample.h:29
_resaudw * create_resaudw(short type, render_details *rdet, LiVESWidget *top_vbox)
Definition: resample.c:1121
int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps)
Definition: resample.c:56
LIVES_INLINE weed_timecode_t q_dbl(double in, double fps)
Definition: resample.c:47
LiVESWidget * dialog
Definition: resample.h:26
LiVESWidget * rb_unsigned
Definition: resample.h:31
render_details * rdet
Definition: events.h:142
LiVESWidget * aud_hbox
Definition: resample.h:40
int deorder_frames(int old_frames, boolean leave_bak)
leave_bak is a special mode for the clipboard
Definition: resample.c:2085
LiVESWidget * unlim_radiobutton
Definition: resample.h:34
_resaudw * resaudw
Definition: resample.h:44
resample audio window
Definition: resample.h:25
LiVESWidget * entry_achans
Definition: resample.h:28
void on_change_speed_ok_clicked(LiVESButton *button, livespointer user_data)
Definition: resample.c:1817
boolean resample_clipboard(double new_fps)
call this to resample clipboard video
Definition: resample.c:2129
LiVESWidget * aud_checkbutton
Definition: resample.h:39
LiVESWidget * second_spinbutton
Definition: resample.h:37
WARN_UNUSED weed_plant_t * quantise_events(weed_plant_t *in_list, double qfps, boolean allow_gap)
quantise frame events for a single clip
Definition: resample.c:455
LiVESWidget * rb_bigend
Definition: resample.h:32
void on_change_speed_activate(LiVESMenuItem *menuitem, livespointer user_data)
Definition: resample.c:1807
void create_new_pb_speed(short type)
window change speed from Tools menu
Definition: resample.c:1643
LIVES_INLINE weed_timecode_t q_gint64(weed_timecode_t in, double fps)
Definition: resample.c:33
LiVESWidget * rb_littleend
Definition: resample.h:33
LiVESWidget * hour_spinbutton
Definition: resample.h:35