Lines 284-290
gst_ffmpegenc_getcaps (GstPad * pad)
Link Here
|
284 |
GstFFMpegEncClass *oclass = |
284 |
GstFFMpegEncClass *oclass = |
285 |
(GstFFMpegEncClass *) G_OBJECT_GET_CLASS (ffmpegenc); |
285 |
(GstFFMpegEncClass *) G_OBJECT_GET_CLASS (ffmpegenc); |
286 |
AVCodecContext *ctx = NULL; |
286 |
AVCodecContext *ctx = NULL; |
287 |
enum PixelFormat pixfmt; |
287 |
int i; |
288 |
GstCaps *caps = NULL; |
288 |
GstCaps *caps = NULL; |
289 |
|
289 |
|
290 |
GST_DEBUG_OBJECT (ffmpegenc, "getting caps"); |
290 |
GST_DEBUG_OBJECT (ffmpegenc, "getting caps"); |
Lines 317-323
gst_ffmpegenc_getcaps (GstPad * pad)
Link Here
|
317 |
_shut_up_I_am_probing = TRUE; |
317 |
_shut_up_I_am_probing = TRUE; |
318 |
#endif |
318 |
#endif |
319 |
GST_DEBUG_OBJECT (ffmpegenc, "probing caps"); |
319 |
GST_DEBUG_OBJECT (ffmpegenc, "probing caps"); |
320 |
for (pixfmt = 0; pixfmt < PIX_FMT_NB; pixfmt++) { |
320 |
for (i = 0; oclass->in_plugin->pix_fmts[i]!=PIX_FMT_NONE; i++) { |
321 |
GstCaps *tmpcaps; |
321 |
GstCaps *tmpcaps; |
322 |
|
322 |
|
323 |
/* need to start with a fresh codec_context each time around, since |
323 |
/* need to start with a fresh codec_context each time around, since |
Lines 337-345
gst_ffmpegenc_getcaps (GstPad * pad)
Link Here
|
337 |
/* makes it silent */ |
337 |
/* makes it silent */ |
338 |
ctx->strict_std_compliance = -1; |
338 |
ctx->strict_std_compliance = -1; |
339 |
|
339 |
|
340 |
ctx->pix_fmt = pixfmt; |
340 |
ctx->pix_fmt = oclass->in_plugin->pix_fmts[i]; |
341 |
if (gst_ffmpeg_avcodec_open (ctx, oclass->in_plugin) >= 0 && |
341 |
if (gst_ffmpeg_avcodec_open (ctx, oclass->in_plugin) >= 0) { |
342 |
ctx->pix_fmt == pixfmt) { |
|
|
343 |
ctx->width = -1; |
342 |
ctx->width = -1; |
344 |
if (!caps) |
343 |
if (!caps) |
345 |
caps = gst_caps_new_empty (); |
344 |
caps = gst_caps_new_empty (); |