File: gap_gve_misc_util.h

package info (click to toggle)
gimp-gap 2.6.0%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 20,716 kB
  • sloc: ansic: 119,817; sh: 3,890; makefile: 931; lisp: 97; pascal: 55
file content (82 lines) | stat: -rw-r--r-- 2,805 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
/* gap_gve_misc_util.h
 *
 *  GAP common encoder tool procedures
 *  with no dependencies to external libraries.
 *
 */
 
/* The GIMP -- an image manipulation program
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

/* revision history:
 * version 1.2.1a;  2004.05.14   hof: created
 */

#ifndef GAP_GVE_MISC_UTIL_H
#define GAP_GVE_MISC_UTIL_H

#include "libgimp/gimp.h"

#include <sys/types.h>
#include <unistd.h>



typedef struct GapGveEncAInfo {
   long         first_frame_nr;
   long         last_frame_nr;
   long         curr_frame_nr;
   long         frame_cnt;
   char         basename[1024];    /* may include path */
   char         extension[50];
   gdouble      framerate;
} GapGveEncAInfo;


typedef struct GapGveMasterEncoderStatus {                     /* nick:  */
 /* Status for monitoring video encoding progress */
  gint32 master_encoder_id;  /* typically the PID */
  gint32 total_frames;
  gint32 frames_processed;
  gint32 frames_encoded;
  gint32 frames_copied_lossless;
  gint32 current_pass;          /* 0 for single pass encoders, 1 or 2 for two-pass encoder */
  gint32 pidOfRunningEncoder;   /* 0 if not yet known */
} GapGveMasterEncoderStatus;


/* --------------------------*/
/* PROCEDURE DECLARATIONS    */
/* --------------------------*/


void        gap_gve_misc_get_ainfo(gint32 image_ID, GapGveEncAInfo *ainfo);

void        gap_gve_misc_initGapGveMasterEncoderStatus(GapGveMasterEncoderStatus *encStatus
                                 , gint32 master_encoder_id, gint32 total_frames);
void        gap_gve_misc_do_master_encoder_progress(GapGveMasterEncoderStatus *encStatus);
gboolean    gap_gve_misc_is_master_encoder_cancel_request(GapGveMasterEncoderStatus *encStatus);

void        gap_gve_misc_get_master_encoder_progress(GapGveMasterEncoderStatus *encStatus);
void        gap_gve_misc_set_master_encoder_cancel_request(GapGveMasterEncoderStatus *encStatus, gboolean cancelRequest);
void        gap_gve_misc_cleanup_GapGveMasterEncoder(gint32 master_encoder_id);

extern int gap_debug;


#endif        /* GAP_GVE_MISC_UTIL_H */