This file looks large and may slow your browser down if we attempt
to syntax highlight it, so we are showing it without any
pretty colors.
Highlight
it anyway.
| 1 |
/* |
| 2 |
* Copyright (C) 2009-2010 Felipe Contreras |
| 3 |
* |
| 4 |
* Author: Felipe Contreras <felipe.contreras@gmail.com> |
| 5 |
* |
| 6 |
* This file may be used under the terms of the GNU Lesser General Public |
| 7 |
* License version 2.1, a copy of which is found in LICENSE included in the |
| 8 |
* packaging of this file. |
| 9 |
*/ |
| 10 |
|
| 11 |
#ifndef GST_DSP_VENC_H |
| 12 |
#define GST_DSP_VENC_H |
| 13 |
|
| 14 |
#include <gst/gst.h> |
| 15 |
|
| 16 |
G_BEGIN_DECLS |
| 17 |
|
| 18 |
#define GST_DSP_VENC(obj) (GstDspVEnc *)(obj) |
| 19 |
#define GST_DSP_VENC_TYPE (gst_dsp_venc_get_type()) |
| 20 |
#define GST_DSP_VENC_CLASS(obj) (GstDspVEncClass *)(obj) |
| 21 |
|
| 22 |
typedef struct _GstDspVEnc GstDspVEnc; |
| 23 |
typedef struct _GstDspVEncClass GstDspVEncClass; |
| 24 |
|
| 25 |
#include "gstdspbase.h" |
| 26 |
|
| 27 |
union venc_priv_data { |
| 28 |
struct { |
| 29 |
gboolean bytestream; |
| 30 |
gboolean sps_received, pps_received, codec_data_done; |
| 31 |
GstBuffer *sps, *pps, *codec_data; |
| 32 |
} h264; |
| 33 |
struct { |
| 34 |
gboolean codec_data_done; |
| 35 |
} mpeg4; |
| 36 |
}; |
| 37 |
|
| 38 |
struct gstdsp_codec_level { |
| 39 |
gint id; |
| 40 |
gint mbpf; /* macroblock per frame */ |
| 41 |
gint mbps; /* macroblocks per second */ |
| 42 |
gint bitrate; |
| 43 |
}; |
| 44 |
|
| 45 |
enum { |
| 46 |
GSTDSP_JPEGENC, |
| 47 |
GSTDSP_H263ENC, |
| 48 |
GSTDSP_MP4VENC, |
| 49 |
GSTDSP_H264ENC, |
| 50 |
}; |
| 51 |
|
| 52 |
struct _GstDspVEnc { |
| 53 |
GstDspBase element; |
| 54 |
gint width, height; |
| 55 |
guint32 color_format; |
| 56 |
gint max_bitrate; |
| 57 |
gint bitrate; |
| 58 |
gint user_max_bitrate; |
| 59 |
gint framerate; |
| 60 |
gint quality; |
| 61 |
struct gstdsp_codec_level *supported_levels; |
| 62 |
guint nr_supported_levels; |
| 63 |
union venc_priv_data priv; |
| 64 |
gint frame_index; |
| 65 |
GstEvent *keyframe_event; |
| 66 |
GMutex *keyframe_mutex; |
| 67 |
gint mode; |
| 68 |
gint keyframe_interval; |
| 69 |
gboolean intra_refresh; |
| 70 |
bool intra_refresh_set; |
| 71 |
gint level; |
| 72 |
}; |
| 73 |
|
| 74 |
struct _GstDspVEncClass { |
| 75 |
GstDspBaseClass parent_class; |
| 76 |
}; |
| 77 |
|
| 78 |
GType gst_dsp_venc_get_type(void); |
| 79 |
|
| 80 |
G_END_DECLS |
| 81 |
|
| 82 |
#endif /* GST_DSP_VENC_H */ |