File: gap_audio_extract.h

package info (click to toggle)
gimp-gap 2.6.0%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 19,656 kB
  • ctags: 7,358
  • sloc: ansic: 119,801; sh: 3,890; makefile: 932; lisp: 97; pascal: 55
file content (88 lines) | stat: -rw-r--r-- 2,509 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* gap_audio_extract.h
 *
 *  GAP extract audio from videofile procedures
 *
 */
/* 2008.06.24 hof  created (moved audio extract parts of gap_vex_exec.c to this module)
 */

#ifndef GAP_AUDIO_EXTRACT_H
#define GAP_AUDIO_EXTRACT_H

#include "config.h"

/* GIMP includes */
#include "gtk/gtk.h"
#include "libgimp/gimp.h"

/* GAP includes */


#ifdef GAP_ENABLE_VIDEOAPI_SUPPORT
#include "gap_vid_api.h"
#else
#ifndef GAP_STUBTYPE_GVA_HANDLE
typedef gpointer t_GVA_Handle;
#define GAP_STUBTYPE_GVA_HANDLE
#endif
#endif


#include "gap-intl.h"


#ifdef GAP_ENABLE_VIDEOAPI_SUPPORT

/* -------------------------
 * gap_audio_extract_as_wav
 * -------------------------
 * extract specified number of samples at current
 * position of the specified (already opened) videohandle.
 * and optional save extracted audiodata as RIFF WAVE file 
 * (set wav_save to FALSE to skip writing to wav file,
 *  this is typical used to perform dummy read for 
 *  advancing current position in the videohandle)
 */
void 
gap_audio_extract_as_wav(const char *audiofile
   ,  t_GVA_Handle   *gvahand
   ,  gdouble samples_to_read
   ,  gboolean wav_save
   ,  gboolean do_progress
   ,  GtkWidget *progressBar
   ,  t_GVA_progress_callback_fptr fptr_progress_callback
   ,  gpointer user_data
   );

/* ---------------------------------
 * gap_audio_extract_from_videofile
 * ---------------------------------
 * extract the specified audiotrack to WAVE file. (name specified via audiofile)
 * starting at position (specified by l_pos and l_pos_unit)
 * in length of extracted_frames (if number of frames is exactly known)
 * or in length expected_frames (is a guess if l_extracted_frames < 1)
 * use do_progress flag value TRUE for progress feedback on the specified
 * progressBar. 
 * (if progressBar = NULL gimp progress is used
 * this usually refers to the progress bar in the image window)
 * Note:
 *   this feature is not present if compiled without GAP_ENABLE_VIDEOAPI_SUPPORT
 */
void
gap_audio_extract_from_videofile(const char *videoname
   , const char *audiofile
   , gint32 audiotrack
   , const char *preferred_decoder
   , gint        exact_seek
   , t_GVA_PosUnit  pos_unit
   , gdouble        pos
   , gdouble        extracted_frames
   , gdouble        expected_frames
   , gboolean do_progress
   , GtkWidget *progressBar
   , t_GVA_progress_callback_fptr fptr_progress_callback
   , gpointer user_data
   );

#endif          /*   GAP_ENABLE_VIDEOAPI_SUPPORT */
#endif          /* end  GAP_AUDIO_EXTRACT_H */