ext/ffmpeg/: gst-indent cleanup.

Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (gst_ffmpeg_avcodec_open),
(gst_ffmpeg_avcodec_close), (gst_ffmpeg_av_find_stream_info),
(gst_ffmpeg_log_callback), (plugin_init):
* ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_mb_decision_get_type),
(gst_ffmpeg_flags_get_type), (gst_ffmpeg_cfg_init),
(gst_ffmpeg_cfg_codec_has_pspec),
(gst_ffmpeg_cfg_install_property), (gst_ffmpeg_cfg_set_property),
(gst_ffmpeg_cfg_get_property), (gst_ffmpeg_cfg_set_defaults),
(gst_ffmpeg_cfg_fill_context), (gst_ffmpeg_cfg_finalize):
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open),
(gst_ffmpegdec_setcaps), (gst_ffmpegdec_save_incoming_values),
(gst_ffmpegdec_get_best_values), (gst_ffmpegdec_video_frame):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_base_init),
(gst_ffmpegdemux_src_query):
* ext/ffmpeg/gstffmpegenc.c: (ffmpegenc_setup_working_buf),
(gst_ffmpegenc_chain_video), (gst_ffmpegenc_flush_buffers):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_read),
(gst_ffmpegdata_write), (gst_ffmpegdata_seek),
(gst_ffmpegdata_close):
gst-indent cleanup.
This commit is contained in:
Edward Hervey 2007-11-03 16:14:53 +00:00
parent 62c4f57092
commit f85c737410
8 changed files with 248 additions and 232 deletions

View file

@ -1,3 +1,28 @@
2007-11-03 Edward Hervey <bilboed@bilboed.com>
* ext/ffmpeg/gstffmpeg.c: (gst_ffmpeg_avcodec_open),
(gst_ffmpeg_avcodec_close), (gst_ffmpeg_av_find_stream_info),
(gst_ffmpeg_log_callback), (plugin_init):
* ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_mb_decision_get_type),
(gst_ffmpeg_flags_get_type), (gst_ffmpeg_cfg_init),
(gst_ffmpeg_cfg_codec_has_pspec),
(gst_ffmpeg_cfg_install_property), (gst_ffmpeg_cfg_set_property),
(gst_ffmpeg_cfg_get_property), (gst_ffmpeg_cfg_set_defaults),
(gst_ffmpeg_cfg_fill_context), (gst_ffmpeg_cfg_finalize):
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open),
(gst_ffmpegdec_setcaps), (gst_ffmpegdec_save_incoming_values),
(gst_ffmpegdec_get_best_values), (gst_ffmpegdec_video_frame):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_base_init),
(gst_ffmpegdemux_src_query):
* ext/ffmpeg/gstffmpegenc.c: (ffmpegenc_setup_working_buf),
(gst_ffmpegenc_chain_video), (gst_ffmpegenc_flush_buffers):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_read),
(gst_ffmpegdata_write), (gst_ffmpegdata_seek),
(gst_ffmpegdata_close):
gst-indent cleanup.
2007-10-12 Tim-Philipp Müller <tim at centricular dot net>
* configure.ac:

View file

@ -44,7 +44,8 @@ static GStaticMutex gst_avcodec_mutex = G_STATIC_MUTEX_INIT;
int
gst_ffmpeg_avcodec_open (AVCodecContext *avctx, AVCodec *codec) {
gst_ffmpeg_avcodec_open (AVCodecContext * avctx, AVCodec * codec)
{
int ret;
g_static_mutex_lock (&gst_avcodec_mutex);
@ -55,7 +56,8 @@ gst_ffmpeg_avcodec_open (AVCodecContext *avctx, AVCodec *codec) {
}
int
gst_ffmpeg_avcodec_close (AVCodecContext *avctx) {
gst_ffmpeg_avcodec_close (AVCodecContext * avctx)
{
int ret;
g_static_mutex_lock (&gst_avcodec_mutex);
@ -66,7 +68,8 @@ gst_ffmpeg_avcodec_close (AVCodecContext *avctx) {
}
int
gst_ffmpeg_av_find_stream_info(AVFormatContext *ic) {
gst_ffmpeg_av_find_stream_info (AVFormatContext * ic)
{
int ret;
g_static_mutex_lock (&gst_avcodec_mutex);
@ -111,7 +114,8 @@ gst_ffmpeg_log_callback (void * ptr, int level, const char * fmt, va_list vl)
fmt2[len - 1] = '\0';
}
gst_debug_log_valist (ffmpeg_debug, gst_level, "", "", 0, NULL, fmt2?fmt2:fmt, vl);
gst_debug_log_valist (ffmpeg_debug, gst_level, "", "", 0, NULL,
fmt2 ? fmt2 : fmt, vl);
g_free (fmt2);
}
@ -156,5 +160,3 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
"All FFMPEG codecs (" FFMPEG_SOURCE ")",
plugin_init,
PACKAGE_VERSION, "LGPL", "FFMpeg", "http://ffmpeg.sourceforge.net/")

View file

@ -86,7 +86,8 @@ gst_ffmpeg_mb_decision_get_type (void)
if (!ffmpeg_mb_decision_type) {
static const GEnumValue ffmpeg_mb_decisions[] = {
{FF_MB_DECISION_SIMPLE, "Use method set by mb-cmp", "simple"},
{FF_MB_DECISION_BITS, "Chooses the one which needs the fewest bits aka vhq mode", "bits"},
{FF_MB_DECISION_BITS,
"Chooses the one which needs the fewest bits aka vhq mode", "bits"},
{FF_MB_DECISION_RD, "Rate Distortion", "rd"},
{0, NULL, NULL},
};
@ -263,16 +264,23 @@ gst_ffmpeg_flags_get_type (void)
{CODEC_FLAG_QPEL, "Quartel Pel Motion Compensation", "qpel"},
{CODEC_FLAG_GMC, "GMC", "gmc"},
{CODEC_FLAG_MV0, "Always try a MB with MV (0,0)", "mv0"},
{CODEC_FLAG_PART, "Store MV, DC and AC coefficients in seperate partitions", "part"},
{CODEC_FLAG_PART,
"Store MV, DC and AC coefficients in seperate partitions", "part"},
{CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
{CODEC_FLAG_NORMALIZE_AQP, "Normalize Adaptive Quantization (masking, etc)", "aqp"},
{CODEC_FLAG_NORMALIZE_AQP,
"Normalize Adaptive Quantization (masking, etc)", "aqp"},
{CODEC_FLAG_TRELLIS_QUANT, "Trellis Quantization", "trellis"},
{CODEC_FLAG_GLOBAL_HEADER, "Global headers in extradata instead of every keyframe", "global-headers"},
{CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction", "aic"},
{CODEC_FLAG_GLOBAL_HEADER,
"Global headers in extradata instead of every keyframe",
"global-headers"},
{CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction",
"aic"},
{CODEC_FLAG_H263P_UMV, "Unlimited Motion Vector", "umv"},
{CODEC_FLAG_CBP_RD, "Rate Distoration Optimization for CBP", "cbp-rd"},
{CODEC_FLAG_QP_RD, "Rate Distoration Optimization for QP selection", "qp-rd"},
{CODEC_FLAG_SVCD_SCAN_OFFSET, "Reserve space for SVCD scan offset user data", "scanoffset"},
{CODEC_FLAG_QP_RD, "Rate Distoration Optimization for QP selection",
"qp-rd"},
{CODEC_FLAG_SVCD_SCAN_OFFSET,
"Reserve space for SVCD scan offset user data", "scanoffset"},
{CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"},
{0, NULL, NULL},
};
@ -375,13 +383,11 @@ gst_ffmpeg_cfg_init ()
/* list properties here */
pspec = g_param_spec_enum ("pass", "Encoding pass/type",
"Encoding pass/type", GST_TYPE_FFMPEG_PASS,
0, G_PARAM_READWRITE);
"Encoding pass/type", GST_TYPE_FFMPEG_PASS, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, pass, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("quantizer", "Constant Quantizer",
"Constant Quantizer", 0, 30, 0.01f,
G_PARAM_READWRITE);
"Constant Quantizer", 0, 30, 0.01f, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, quantizer, FALSE, mpeg, NULL);
pspec = g_param_spec_string ("statsfile", "Statistics Filename",
@ -404,7 +410,9 @@ gst_ffmpeg_cfg_init ()
GST_TYPE_FFMPEG_CMP_FUNCTION, FF_CMP_SAD, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.mb_cmp, FALSE, mpeg, NULL);
pspec = g_param_spec_enum ("me-pre-cmp", "Motion Estimation Pre Pass Compare Function",
pspec =
g_param_spec_enum ("me-pre-cmp",
"Motion Estimation Pre Pass Compare Function",
"Motion Estimation Pre Pass Compare Function",
GST_TYPE_FFMPEG_CMP_FUNCTION, FF_CMP_SAD, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.me_pre_cmp, FALSE, mpeg, NULL);
@ -436,18 +444,15 @@ gst_ffmpeg_cfg_init ()
gst_ffmpeg_add_pspec (pspec, config.idct_algo, FALSE, mpeg, NULL);
pspec = g_param_spec_enum ("quant-type", "Quantizer Type",
"Quantizer Type",
GST_TYPE_FFMPEG_QUANT_TYPE, 0, G_PARAM_READWRITE);
"Quantizer Type", GST_TYPE_FFMPEG_QUANT_TYPE, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.mpeg_quant, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("qmin", "Minimum Quantizer",
"Minimum Quantizer",
1, 31, 2, G_PARAM_READWRITE);
"Minimum Quantizer", 1, 31, 2, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.qmin, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("qmax", "Maximum Quantizer",
"Maximum Quantizer",
1, 31, 31, G_PARAM_READWRITE);
"Maximum Quantizer", 1, 31, 31, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.qmax, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("max-qdiff", "Maximum Quantizer Difference",
@ -456,23 +461,19 @@ gst_ffmpeg_cfg_init ()
gst_ffmpeg_add_pspec (pspec, config.max_qdiff, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("mb_qmin", "Minimum MB Quantizer",
"Minimum MB Quantizer",
0, 31, 2, G_PARAM_READWRITE);
"Minimum MB Quantizer", 0, 31, 2, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.mb_qmin, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("mb_qmax", "Maximum MB Quantizer",
"Maximum MB Quantizer",
0, 31, 31, G_PARAM_READWRITE);
"Maximum MB Quantizer", 0, 31, 31, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.mb_qmax, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("lmin", "Minimum Lagrange Multiplier",
"Minimum Lagrange Multiplier",
1, 31, 2, G_PARAM_READWRITE);
"Minimum Lagrange Multiplier", 1, 31, 2, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, lmin, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("lmax", "Maximum Lagrange Multiplier",
"Maximum Lagrange Multiplier",
1, 31, 31, G_PARAM_READWRITE);
"Maximum Lagrange Multiplier", 1, 31, 31, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, lmax, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("qcompress", "Quantizer Change",
@ -481,8 +482,7 @@ gst_ffmpeg_cfg_init ()
gst_ffmpeg_add_pspec (pspec, config.qcompress, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("qblur", "Quantizer Smoothing",
"Quantizer Smoothing over time",
0, 1.0f, 0.5f, G_PARAM_READWRITE);
"Quantizer Smoothing over time", 0, 1.0f, 0.5f, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.qblur, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("rc-qsquish", "Ratecontrol Limiting Method",
@ -491,43 +491,41 @@ gst_ffmpeg_cfg_init ()
gst_ffmpeg_add_pspec (pspec, config.rc_qsquish, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("rc-qmod-amp", "Ratecontrol Mod",
"Ratecontrol Mod",
0, 99.0f, 0, G_PARAM_READWRITE);
"Ratecontrol Mod", 0, 99.0f, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.rc_qmod_amp, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("rc-qmod-freq", "Ratecontrol Freq",
"Ratecontrol Freq",
0, 0, 0, G_PARAM_READWRITE);
"Ratecontrol Freq", 0, 0, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.rc_qmod_freq, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("rc-buffer-size", "Ratecontrol Buffer Size",
"Decoder bitstream buffer size",
0, G_MAXINT, 0, G_PARAM_READWRITE);
"Decoder bitstream buffer size", 0, G_MAXINT, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.rc_buffer_size, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("rc-buffer-aggressivity", "Ratecontrol Buffer Aggressivity",
"Ratecontrol Buffer Aggressivity",
0, 99.0f, 1.0f, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.rc_buffer_aggressivity, FALSE, mpeg, NULL);
pspec =
g_param_spec_float ("rc-buffer-aggressivity",
"Ratecontrol Buffer Aggressivity", "Ratecontrol Buffer Aggressivity", 0,
99.0f, 1.0f, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.rc_buffer_aggressivity, FALSE, mpeg,
NULL);
pspec = g_param_spec_int ("rc-max-rate", "Ratecontrol Maximum Bitrate",
"Ratecontrol Maximum Bitrate",
0, G_MAXINT, 0, G_PARAM_READWRITE);
"Ratecontrol Maximum Bitrate", 0, G_MAXINT, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.rc_max_rate, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("rc-min-rate", "Ratecontrol Minimum Bitrate",
"Ratecontrol Minimum Bitrate",
0, G_MAXINT, 0, G_PARAM_READWRITE);
"Ratecontrol Minimum Bitrate", 0, G_MAXINT, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.rc_min_rate, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("rc-initial-cplx", "Initial Complexity for Pass 1 Ratecontrol",
pspec =
g_param_spec_float ("rc-initial-cplx",
"Initial Complexity for Pass 1 Ratecontrol",
0, 9999999.0f, 0, G_PARAM_READWRITE);
"Initial Complexity for Pass 1 Ratecontrol", 0, 9999999.0f, 0,
G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.rc_initial_cplx, FALSE, mpeg, NULL);
pspec = g_param_spec_string ("rc-eq", "Ratecontrol Equation",
"Ratecontrol Equation",
"tex^qComp", G_PARAM_READWRITE);
"Ratecontrol Equation", "tex^qComp", G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.rc_eq, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("b-quant-factor", "B-Quantizer Factor",
@ -569,30 +567,25 @@ gst_ffmpeg_cfg_init ()
gst_ffmpeg_add_pspec (pspec, config.chroma_elim_threshold, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("lumi-masking", "Luminance Masking",
"Luminance Masking",
-1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
"Luminance Masking", -1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.lumi_masking, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("dark-masking", "Darkness Masking",
"Darkness Masking",
-1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
"Darkness Masking", -1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.dark_masking, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("temporal-cplx-masking",
"Temporal Complexity Masking",
"Temporal Complexity Masking",
-1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
"Temporal Complexity Masking", -1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.temporal_cplx_masking, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("spatial-cplx-masking",
"Spatial Complexity Masking",
"Spatial Complexity Masking",
-1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
"Spatial Complexity Masking", -1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.spatial_cplx_masking, FALSE, mpeg, NULL);
pspec = g_param_spec_float ("p-masking", "P Block Masking",
"P Block Masking",
-1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
"P Block Masking", -1.0f, 1.0f, 0.0f, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.p_masking, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("dia-size",
@ -645,31 +638,26 @@ gst_ffmpeg_cfg_init ()
pspec = g_param_spec_int ("noise-reduction",
"Noise Reduction",
"Noise Reduction Strength",
0, 1000000, 0, G_PARAM_READWRITE);
"Noise Reduction Strength", 0, 1000000, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.noise_reduction, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("intra-dc-precision",
"Intra DC precision",
"Precision of the Intra DC coefficient - 8",
0, 16, 0, G_PARAM_READWRITE);
"Precision of the Intra DC coefficient - 8", 0, 16, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.intra_dc_precision, FALSE, mpeg, NULL);
/* TODO skipped coder_type, context_model, inter_threshold, scenechange_threshold */
pspec = g_param_spec_flags ("flags", "Flags",
"Flags",
GST_TYPE_FFMPEG_FLAGS, 0, G_PARAM_READWRITE);
"Flags", GST_TYPE_FFMPEG_FLAGS, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.flags, FALSE, mpeg, NULL);
pspec = g_param_spec_boolean ("interlaced", "Interlaced Material",
"Interlaced Material",
FALSE, G_PARAM_READWRITE);
"Interlaced Material", FALSE, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, interlaced, FALSE, mpeg, NULL);
pspec = g_param_spec_int ("max-bframes", "Max B-Frames",
"Maximum B-frames in a row",
0, FF_MAX_B_FRAMES, 0, G_PARAM_READWRITE);
"Maximum B-frames in a row", 0, FF_MAX_B_FRAMES, 0, G_PARAM_READWRITE);
gst_ffmpeg_add_pspec (pspec, config.max_b_frames, FALSE, mpeg, NULL);
pspec = g_param_spec_enum ("prediction-method", "Prediction Method",
@ -758,65 +746,67 @@ gst_ffmpeg_cfg_install_property (GstFFMpegEncClass * klass, guint base)
switch (G_PARAM_SPEC_VALUE_TYPE (pspec)) {
case G_TYPE_STRING:{
GParamSpecString *pstring = G_PARAM_SPEC_STRING (pspec);
pspec = g_param_spec_string (name, nick, blurb,
lavc_default ? G_STRUCT_MEMBER (gchar *, ctx, ctx_offset)
: pstring->default_value,
pspec->flags);
: pstring->default_value, pspec->flags);
break;
}
case G_TYPE_INT:{
GParamSpecInt *pint = G_PARAM_SPEC_INT (pspec);
pspec = g_param_spec_int (name, nick, blurb,
pint->minimum, pint->maximum,
lavc_default ? G_STRUCT_MEMBER (gint, ctx, ctx_offset)
: pint->default_value,
pspec->flags);
: pint->default_value, pspec->flags);
break;
}
case G_TYPE_UINT:{
GParamSpecUInt *puint = G_PARAM_SPEC_UINT (pspec);
pspec = g_param_spec_uint (name, nick, blurb,
puint->minimum, puint->maximum,
lavc_default ? G_STRUCT_MEMBER (guint, ctx, ctx_offset)
: puint->default_value,
pspec->flags);
: puint->default_value, pspec->flags);
break;
}
case G_TYPE_ULONG:{
GParamSpecULong *pulong = G_PARAM_SPEC_ULONG (pspec);
pspec = g_param_spec_ulong (name, nick, blurb,
pulong->minimum, pulong->maximum,
lavc_default ? G_STRUCT_MEMBER (gulong, ctx, ctx_offset)
: pulong->default_value,
pspec->flags);
: pulong->default_value, pspec->flags);
break;
}
case G_TYPE_FLOAT:{
GParamSpecFloat *pfloat = G_PARAM_SPEC_FLOAT (pspec);
pspec = g_param_spec_float (name, nick, blurb,
pfloat->minimum, pfloat->maximum,
lavc_default ? G_STRUCT_MEMBER (gfloat, ctx, ctx_offset)
: pfloat->default_value,
pspec->flags);
: pfloat->default_value, pspec->flags);
break;
}
case G_TYPE_BOOLEAN:{
GParamSpecBoolean *pboolean = G_PARAM_SPEC_BOOLEAN (pspec);
pspec = g_param_spec_boolean (name, nick, blurb,
lavc_default ? G_STRUCT_MEMBER (gboolean, ctx, ctx_offset)
: pboolean->default_value,
pspec->flags);
: pboolean->default_value, pspec->flags);
break;
}
default:
if (G_IS_PARAM_SPEC_ENUM (pspec)) {
GParamSpecEnum *penum = G_PARAM_SPEC_ENUM (pspec);
pspec = g_param_spec_enum (name, nick, blurb,
pspec->value_type,
lavc_default ? G_STRUCT_MEMBER (gint, ctx, ctx_offset)
: penum->default_value, pspec->flags);
} else if (G_IS_PARAM_SPEC_FLAGS (pspec)) {
GParamSpecFlags *pflags = G_PARAM_SPEC_FLAGS (pspec);
pspec = g_param_spec_flags (name, nick, blurb,
pspec->value_type,
lavc_default ? G_STRUCT_MEMBER (guint, ctx, ctx_offset)
@ -935,8 +925,7 @@ gst_ffmpeg_cfg_get_property (GObject * object,
break;
case G_TYPE_INT:
g_return_val_if_fail (qdata->size == sizeof (gint), TRUE);
g_value_set_int (value,
G_STRUCT_MEMBER (gint, ffmpegenc, qdata->offset));
g_value_set_int (value, G_STRUCT_MEMBER (gint, ffmpegenc, qdata->offset));
break;
case G_TYPE_ULONG:
g_return_val_if_fail (qdata->size == sizeof (gulong), TRUE);
@ -984,6 +973,7 @@ gst_ffmpeg_cfg_set_defaults (GstFFMpegEnc * ffmpegenc)
for (i = 0; i < num_props; ++i) {
GValue val = { 0, };
GParamSpec *pspec = pspecs[i];
/* only touch those that are really ours; i.e. should have some qdata */
if (!g_param_spec_get_qdata (pspec, quark))
continue;
@ -1020,8 +1010,7 @@ gst_ffmpeg_cfg_fill_context (GstFFMpegEnc * ffmpegenc, AVCodecContext * context)
&& context_offset >= 0) {
/* memcpy a bit heavy for a small copy, but hardly part of 'inner loop' */
memcpy (G_STRUCT_MEMBER_P (context, context_offset),
G_STRUCT_MEMBER_P (ffmpegenc, qdata->offset),
qdata->size);
G_STRUCT_MEMBER_P (ffmpegenc, qdata->offset), qdata->size);
}
list = list->next;
}

View file

@ -277,11 +277,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
"systemstream", G_TYPE_BOOLEAN, FALSE,
"rmversion", G_TYPE_INT, version, NULL);
if (context) {
gst_caps_set_simple (caps,
"format", G_TYPE_INT, context->sub_id, NULL);
gst_caps_set_simple (caps, "format", G_TYPE_INT, context->sub_id, NULL);
if (context->extradata_size >= 8) {
gst_caps_set_simple (caps,
"subformat", G_TYPE_INT, GST_READ_UINT32_BE (context->extradata), NULL);
"subformat", G_TYPE_INT, GST_READ_UINT32_BE (context->extradata),
NULL);
}
}
}

View file

@ -544,7 +544,8 @@ gst_ffmpegdec_open (GstFFMpegDec * ffmpegdec)
}
/* out-of-order incoming buffer handling */
if ((oclass->in_plugin->id == CODEC_ID_H264) && (ffmpegdec->context->extradata_size != 0))
if ((oclass->in_plugin->id == CODEC_ID_H264)
&& (ffmpegdec->context->extradata_size != 0))
ffmpegdec->outoforder = TRUE;
ffmpegdec->next_ts = GST_CLOCK_TIME_NONE;
@ -852,13 +853,14 @@ no_par:
}
static void
gst_ffmpegdec_save_incoming_values (GstFFMpegDec * ffmpegdec, GstClockTime timestamp,
GstClockTime duration)
gst_ffmpegdec_save_incoming_values (GstFFMpegDec * ffmpegdec,
GstClockTime timestamp, GstClockTime duration)
{
GST_LOG_OBJECT (ffmpegdec, "BEFORE timestamp:%"GST_TIME_FORMAT"/%"GST_TIME_FORMAT
" duration:%"GST_TIME_FORMAT"/%"GST_TIME_FORMAT,
GST_TIME_ARGS (ffmpegdec->tstamp1), GST_TIME_ARGS (ffmpegdec->tstamp2),
GST_TIME_ARGS (ffmpegdec->dur1), GST_TIME_ARGS (ffmpegdec->dur2));
GST_LOG_OBJECT (ffmpegdec,
"BEFORE timestamp:%" GST_TIME_FORMAT "/%" GST_TIME_FORMAT " duration:%"
GST_TIME_FORMAT "/%" GST_TIME_FORMAT, GST_TIME_ARGS (ffmpegdec->tstamp1),
GST_TIME_ARGS (ffmpegdec->tstamp2), GST_TIME_ARGS (ffmpegdec->dur1),
GST_TIME_ARGS (ffmpegdec->dur2));
/* shift previous new values to oldest */
if (ffmpegdec->tstamp2 != GST_CLOCK_TIME_NONE)
@ -869,16 +871,17 @@ gst_ffmpegdec_save_incoming_values (GstFFMpegDec * ffmpegdec, GstClockTime times
ffmpegdec->tstamp2 = timestamp;
ffmpegdec->dur2 = duration;
GST_LOG_OBJECT (ffmpegdec, "AFTER timestamp:%"GST_TIME_FORMAT"/%"GST_TIME_FORMAT
" duration:%"GST_TIME_FORMAT"/%"GST_TIME_FORMAT,
GST_TIME_ARGS (ffmpegdec->tstamp1), GST_TIME_ARGS (ffmpegdec->tstamp2),
GST_TIME_ARGS (ffmpegdec->dur1), GST_TIME_ARGS (ffmpegdec->dur2));
GST_LOG_OBJECT (ffmpegdec,
"AFTER timestamp:%" GST_TIME_FORMAT "/%" GST_TIME_FORMAT " duration:%"
GST_TIME_FORMAT "/%" GST_TIME_FORMAT, GST_TIME_ARGS (ffmpegdec->tstamp1),
GST_TIME_ARGS (ffmpegdec->tstamp2), GST_TIME_ARGS (ffmpegdec->dur1),
GST_TIME_ARGS (ffmpegdec->dur2));
}
static void
gst_ffmpegdec_get_best_values (GstFFMpegDec * ffmpegdec, GstClockTime *timestamp,
GstClockTime *duration)
gst_ffmpegdec_get_best_values (GstFFMpegDec * ffmpegdec,
GstClockTime * timestamp, GstClockTime * duration)
{
/* Best timestamp is the smallest valid timestamp */
if (ffmpegdec->tstamp1 == GST_CLOCK_TIME_NONE) {
@ -904,9 +907,9 @@ gst_ffmpegdec_get_best_values (GstFFMpegDec * ffmpegdec, GstClockTime *timestamp
ffmpegdec->dur1 = GST_CLOCK_TIME_NONE;
}
GST_LOG_OBJECT (ffmpegdec, "Returning timestamp:%"GST_TIME_FORMAT" duration:%"GST_TIME_FORMAT,
GST_TIME_ARGS (*timestamp),
GST_TIME_ARGS (*duration));
GST_LOG_OBJECT (ffmpegdec,
"Returning timestamp:%" GST_TIME_FORMAT " duration:%" GST_TIME_FORMAT,
GST_TIME_ARGS (*timestamp), GST_TIME_ARGS (*duration));
}
static gboolean
@ -1447,8 +1450,7 @@ gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
GST_LOG_OBJECT (ffmpegdec, "no valid duration found");
}
}
}
else {
} else {
GST_LOG_OBJECT (ffmpegdec, "using in_duration");
}

View file

@ -171,8 +171,7 @@ gst_ffmpegdemux_base_init (GstFFMpegDemuxClass * klass)
GstElementDetails details;
GstPadTemplate *sinktempl, *audiosrctempl, *videosrctempl;
params =
(GstFFMpegDemuxClassParams *)
params = (GstFFMpegDemuxClassParams *)
g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass), GST_FFDEMUX_PARAMS_QDATA);
g_assert (params != NULL);

View file

@ -605,8 +605,7 @@ gst_ffmpegenc_chain_video (GstPad * pad, GstBuffer * inbuf)
ffmpegenc_setup_working_buf (ffmpegenc);
ret_size = avcodec_encode_video (ffmpegenc->context,
ffmpegenc->working_buf, ffmpegenc->working_buf_size,
ffmpegenc->picture);
ffmpegenc->working_buf, ffmpegenc->working_buf_size, ffmpegenc->picture);
if (ret_size < 0) {
#ifndef GST_DISABLE_GST_DEBUG

View file

@ -125,7 +125,8 @@ gst_ffmpegdata_peek (URLContext * h, unsigned char *buf, int size)
break;
}
GST_DEBUG ("Got %d (%s) return result %d", ret, gst_flow_get_name (ret), total);
GST_DEBUG ("Got %d (%s) return result %d", ret, gst_flow_get_name (ret),
total);
return total;
}
@ -162,9 +163,7 @@ gst_ffmpegdata_write (URLContext * h, unsigned char *buf, int size)
/* create buffer and push data further */
if (gst_pad_alloc_buffer_and_set_caps (info->pad,
info->offset,
size, GST_PAD_CAPS (info->pad),
&outbuf) != GST_FLOW_OK)
info->offset, size, GST_PAD_CAPS (info->pad), &outbuf) != GST_FLOW_OK)
return 0;
memcpy (GST_BUFFER_DATA (outbuf), buf, size);
@ -206,7 +205,8 @@ gst_ffmpegdata_seek (URLContext * h, offset_t pos, int whence)
gint64 duration;
if (gst_pad_is_linked (info->pad))
if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format, &duration))
if (gst_pad_query_duration (GST_PAD_PEER (info->pad), &format,
&duration))
info->offset = ((guint64) duration) + pos;
}
break;