File: vc.h

package info (click to toggle)
gr-framework 0.73.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,600 kB
  • sloc: ansic: 87,413; cpp: 45,348; objc: 3,057; javascript: 2,647; makefile: 1,129; python: 1,000; sh: 991; yacc: 855; pascal: 554; fortran: 228
file content (52 lines) | stat: -rw-r--r-- 1,007 bytes parent folder | download
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
#ifndef _VC_H_
#define _VC_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif

#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/mathematics.h>
#include <libavutil/imgutils.h>
#include <libswscale/swscale.h>

#define VC_FLAGS_MOV_HIDPI (1 << 0)

struct frame_t_
{
  unsigned char *data;
  int width, height;
};

struct movie_t_
{
  AVFormatContext *fmt_ctx;
  AVOutputFormat *out_fmt;
  AVCodecContext *cdc_ctx;
  AVStream *video_st;
  AVFrame *frame;
  float t;
  struct SwsContext *sws_ctx;

  unsigned char *gif_scaled_image;
  unsigned char *gif_scaled_image_copy;
  unsigned char *gif_palette;
};

typedef struct movie_t_ *movie_t;
typedef struct frame_t_ *frame_t;

movie_t vc_movie_create(const char *path, int framerate, int bitrate, int width, int height, int flags);
void vc_movie_append_frame(movie_t movie, frame_t frame);
void vc_movie_finish(movie_t movie);

#ifdef __cplusplus
}
#endif

#endif