qtkitvideosrc: update after BaseSrc::fixate API change

This commit is contained in:
Alessandro Decina 2012-04-05 08:52:49 +02:00
parent cd21a65031
commit 10387bd629

View file

@ -118,7 +118,7 @@ G_DEFINE_TYPE (GstQTKitVideoSrc, gst_qtkit_video_src, GST_TYPE_PUSH_SRC);
- (BOOL)stop; - (BOOL)stop;
- (BOOL)unlock; - (BOOL)unlock;
- (BOOL)unlockStop; - (BOOL)unlockStop;
- (void)fixate:(GstCaps *)caps; - (GstCaps *)fixate:(GstCaps *)caps;
- (BOOL)query:(GstQuery *)query; - (BOOL)query:(GstQuery *)query;
- (GstStateChangeReturn)changeState:(GstStateChange)transition; - (GstStateChangeReturn)changeState:(GstStateChange)transition;
- (GstFlowReturn)create:(GstBuffer **)buf; - (GstFlowReturn)create:(GstBuffer **)buf;
@ -380,16 +380,18 @@ openFailed:
return YES; return YES;
} }
- (void)fixate:(GstCaps *)caps - (GstCaps *)fixate:(GstCaps *)caps
{ {
GstStructure *structure; GstStructure *structure;
gst_caps_truncate (caps); caps = gst_caps_truncate (caps);
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);
if (gst_structure_has_field (structure, "framerate")) { if (gst_structure_has_field (structure, "framerate")) {
gst_structure_fixate_field_nearest_fraction (structure, "framerate", gst_structure_fixate_field_nearest_fraction (structure, "framerate",
DEVICE_FPS_N, DEVICE_FPS_D); DEVICE_FPS_N, DEVICE_FPS_D);
} }
return caps;
} }
- (GstStateChangeReturn)changeState:(GstStateChange)transition - (GstStateChangeReturn)changeState:(GstStateChange)transition
@ -517,7 +519,7 @@ static gboolean gst_qtkit_video_src_unlock (GstBaseSrc * basesrc);
static gboolean gst_qtkit_video_src_unlock_stop (GstBaseSrc * basesrc); static gboolean gst_qtkit_video_src_unlock_stop (GstBaseSrc * basesrc);
static GstFlowReturn gst_qtkit_video_src_create (GstPushSrc * pushsrc, static GstFlowReturn gst_qtkit_video_src_create (GstPushSrc * pushsrc,
GstBuffer ** buf); GstBuffer ** buf);
static void gst_qtkit_video_src_fixate (GstBaseSrc * basesrc, GstCaps * caps); static GstCaps * gst_qtkit_video_src_fixate (GstBaseSrc * basesrc, GstCaps * caps);
static void static void
gst_qtkit_video_src_class_init (GstQTKitVideoSrcClass * klass) gst_qtkit_video_src_class_init (GstQTKitVideoSrcClass * klass)
@ -718,10 +720,14 @@ gst_qtkit_video_src_create (GstPushSrc * pushsrc, GstBuffer ** buf)
return ret; return ret;
} }
static void static GstCaps *
gst_qtkit_video_src_fixate (GstBaseSrc * basesrc, GstCaps * caps) gst_qtkit_video_src_fixate (GstBaseSrc * basesrc, GstCaps * caps)
{ {
GstCaps *ret;
OBJC_CALLOUT_BEGIN (); OBJC_CALLOUT_BEGIN ();
[GST_QTKIT_VIDEO_SRC_IMPL (basesrc) fixate: caps]; ret = [GST_QTKIT_VIDEO_SRC_IMPL (basesrc) fixate: caps];
OBJC_CALLOUT_END (); OBJC_CALLOUT_END ();
return ret;
} }