GST_AUDIO_ENCODER_STREAM_LOCK (enc);
- buf ? GST_BUFFER_SIZE (buf) : -1, samples);
+ GST_LOG_OBJECT (enc, "accepting %d bytes encoded data as %d samples",
++ buf ? gst_buffer_get_size (buf) : -1, samples);
+
+ /* mark subclass still alive and providing */
+ if (G_LIKELY (buf))
+ priv->got_data = TRUE;
+
+ if (priv->pending_events) {
+ GList *pending_events, *l;
+
+ pending_events = priv->pending_events;
+ priv->pending_events = NULL;
+
+ GST_DEBUG_OBJECT (enc, "Pushing pending events");
+ for (l = pending_events; l; l = l->next)
+ gst_pad_push_event (enc->srcpad, l->data);
+ g_list_free (pending_events);
+ }
+
+ /* send after pending events, which likely includes newsegment event */
if (G_UNLIKELY (enc->priv->tags)) {
GstTagList *tags;
+#if 0
+ GstCaps *caps;
+#endif
/* add codec info to pending tags */
tags = enc->priv->tags;
/* no more pending */
enc->priv->tags = NULL;
- gst_pb_utils_add_codec_description_to_tag_list (tags, GST_TAG_CODEC,
- GST_PAD_CAPS (enc->srcpad));
+#if 0
+ caps = gst_pad_get_current_caps (enc->srcpad);
+ gst_pb_utils_add_codec_description_to_tag_list (tags, GST_TAG_CODEC, caps);
gst_pb_utils_add_codec_description_to_tag_list (tags, GST_TAG_AUDIO_CODEC,
- GST_PAD_CAPS (enc->srcpad));
+ caps);
+#endif
-
GST_DEBUG_OBJECT (enc, "sending tags %" GST_PTR_FORMAT, tags);
gst_element_found_tags_for_pad (GST_ELEMENT (enc), enc->srcpad, tags);
}
g_signal_connect_data (G_OBJECT (sinkpad), "notify::tags",
G_CALLBACK (notify_tags_cb), ntdata, (GClosureNotify) g_free,
(GConnectFlags) 0);
- g_object_set_data (G_OBJECT (sinkpad), "playbin2.notify_tags_handler",
+ g_object_set_data (G_OBJECT (sinkpad), "playbin.notify_tags_handler",
- (gpointer) notify_tags_handler);
+ (gpointer) (guintptr) notify_tags_handler);
/* store the pad in the array */
GST_DEBUG_OBJECT (playbin, "pad %p added to array", sinkpad);
gulong notify_tags_handler;
notify_tags_handler =
- (gulong) g_object_get_data (G_OBJECT (peer),
+ (guintptr) g_object_get_data (G_OBJECT (peer),
- "playbin2.notify_tags_handler");
+ "playbin.notify_tags_handler");
if (notify_tags_handler != 0)
g_signal_handler_disconnect (G_OBJECT (peer), notify_tags_handler);
- g_object_set_data (G_OBJECT (peer), "playbin2.notify_tags_handler", NULL);
+ g_object_set_data (G_OBJECT (peer), "playbin.notify_tags_handler", NULL);
/* remove the pad from the array */
g_ptr_array_remove (select->channels, peer);