[Bug 703076] New: flvdemux: add flvversion 1 to src - allow using avdec_flv on sorenson flv
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Jun 25 12:56:49 PDT 2013
http://bugzilla.gnome.org/show_bug.cgi?id=703076
GStreamer | gst-plugins-good | git
Summary: flvdemux: add flvversion 1 to src - allow using
avdec_flv on sorenson flv
Classification: Platform
Product: GStreamer
Version: git
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-good
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: prahal at yahoo.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created an attachment (id=247771)
View: http://bugzilla.gnome.org/attachment.cgi?id=247771
Review: http://bugzilla.gnome.org/review?bug=703076&attachment=247771
flvdemux: add flvversion 1 to src - allow using avdec_flv
flv current only support flvversion 1.
avdec_flv set flvversion as 1 on its sink. But flvdemux does not.
So in gst_element_factory_list_filter when the caps are checked if
is_subset of the avdec_flv sink template capabilities, the check fails.
NB: gst_caps_is_subset relies on gst_structure_is_subset. The latter
fails if the superset has more fields than the subset (and even if that
condition is removed latter fails in gst_caps_structure_is_superset_field
if a field of the superset is not in the subset -
but gst_caps_structure_is_superset_field also check that the subset
value is a "subset" of the superset adhoc field value, so it is not
as simple as switching superset and subset identifiers).
With above nota bene diagnosis I hope it makes more sense.
NB2: in 0.10 flv sorenson works without this patch .
The attached patch let flv1 (here sorenson spark) play via gstreamer
(gst-launch-1.0 and totem ).
It adds flvversion=1 field to flvdemux when it outputs x-flash-video.
ext/libav/gstavcodecmap.c:1008
caps =
gst_ff_vid_caps_new (context, NULL, codec_id, encode,
"video/x-flash-video", "flvversion", G_TYPE_INT, 1, NULL);
listing:
844 templates = gst_element_factory_get_static_pad_templates (factory);
845 for (walk = (GList *) templates; walk; walk = g_list_next (walk)) {
846 GstStaticPadTemplate *templ = walk->data;
847
848 /* we only care about the sink templates */
849 if (templ->direction == direction) {
850 GstCaps *tmpl_caps;
851
852 /* try to intersect the caps with the caps of the template */
853 tmpl_caps = gst_static_caps_get (&templ->static_caps);
(gdb) l
854
855 /* FIXME, intersect is not the right method, we ideally want to
check
856 * for a subset here */
857
858 /* check if the intersection is empty */
859 if ((subsetonly && gst_caps_is_subset (caps, tmpl_caps)) ||
860 (!subsetonly && gst_caps_can_intersect (caps, tmpl_caps))) {
861 /* non empty intersection, we can use this element */
862 g_queue_push_tail (&results, gst_object_ref (factory));
backtrace gst 1.0:
Breakpoint 3, gst_element_factory_list_filter (list=0x89fc40 = {...},
caps=0x7fffe401bb20, direction=GST_PAD_SINK, subsetonly=1)
at gstelementfactory.c:844
844 templates = gst_element_factory_get_static_pad_templates (factory);
(gdb) p *factory
$4 = {parent = {object = {object = {g_type_instance = {g_class = 0x6102a0},
ref_count = 6, qdata = 0x0}, lock = {p = 0x6c99b0, i = {7117232, 0}},
name = 0x6c99e0 "avdec_flv", parent = 0x61b070, flags = 0,
control_bindings = 0x0, control_rate = 100000000, last_sync =
18446744073709551615,
_gst_reserved = 0x0}, loaded = 0, rank = 64, plugin_name = 0x683410
"libav", plugin = 0x67b810, _gst_reserved = {0x0, 0x0, 0x0, 0x0}},
type = 0, metadata = 0x6ca9a0, staticpadtemplates = 0x6caa00 = {0x6c9240,
0x6c9280}, numpadtemplates = 2, uri_type = GST_URI_UNKNOWN,
uri_protocols = 0x0, interfaces = 0x0, _gst_reserved = {0x0, 0x0, 0x0, 0x0}}
(gdb) p g_quark_to_string(((((GstCapsArrayElement *)((GstCapsImpl
*)tmpl_caps)->array.data)[0]).structure).name)
$20 = (const gchar *) 0x7fffe4004cbd "video/x-flash-video"
(gdb) p g_quark_to_string(((((GstCapsArrayElement *)((GstCapsImpl
*)caps)->array.data)[0]).structure).name)
$21 = (const gchar *) 0x64d067 "video/x-flv"
(gdb) p gst_structure_n_fields(((((GstCapsArrayElement *)((GstCapsImpl
*)tmpl_caps)->array.data)[0]).structure))$22 = 1
(gdb) p gst_structure_n_fields(((((GstCapsArrayElement *)((GstCapsImpl
*)caps)->array.data)[0]).structure))
$23 = 0
(gdb) p g_quark_to_string(((GstStructureField *)((GstStructureImpl
*)((((GstCapsArrayElement *)((GstCapsImpl
*)tmpl_caps)->array.data)[0]).structure))->fields->data)[0].name)
$24 = (const gchar *) 0x7fffe4004cd1 "flvversion"
#0 gst_element_factory_list_filter (list=0x89fc40 = {...},
caps=0x7fffe401bb20, direction=GST_PAD_SINK, subsetonly=1) at
gstelementfactory.c:859
#1 0x00007ffff63ff34d in autoplug_factories_cb (decodebin=0xabc0c0,
pad=0x7fffd8004100, caps=0x7fffe401bb20, group=0x98c6b0) at gstplaybin2.c:3817
#2 0x00007ffff663fe28 in ffi_call_unix64 () at ../src/x86/unix64.S:76
#3 0x00007ffff663f790 in ffi_call (cif=0x7fffe3ffcc70, fn=0x7ffff63ff194
<autoplug_factories_cb>, rvalue=0x7fffe3ffcbf0, avalue=0x7fffe3ffcb90)
at ../src/x86/ffi64.c:522
#4 0x00007ffff7870fc9 in g_cclosure_marshal_generic (closure=0x91b1d0,
return_gvalue=0x7fffe3ffcde0, n_param_values=3, param_values=0x7fffe3ffcee0,
invocation_hint=0x7fffe3ffce10, marshal_data=0x0) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gclosure.c:1454
#5 0x00007ffff786f8a0 in g_closure_invoke (closure=0x91b1d0,
return_value=0x7fffe3ffcde0, n_param_values=3, param_values=0x7fffe3ffcee0,
invocation_hint=0x7fffe3ffce10) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gclosure.c:777
#6 0x00007ffff788d9f5 in signal_emit_unlocked_R (node=0xa60670, detail=0,
instance=0xabc0c0, emission_return=0x7fffe3ffcfe0,
instance_and_params=0x7fffe3ffcee0) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c:3582
#7 0x00007ffff788ccd7 in g_signal_emit_valist (instance=0xabc0c0,
signal_id=39, detail=0, var_args=0x7fffe3ffd1d8)
at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c:3336
#8 0x00007ffff788d194 in g_signal_emit (instance=0xabc0c0, signal_id=39,
detail=0)
at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c:3382
#9 0x00007ffff63f33fb in proxy_autoplug_factories_signal (decodebin=0xabca40,
pad=0x7fffd8004100, caps=0x7fffe401bb20, dec=0xabc0c0)
at gsturidecodebin.c:1675
#10 0x00007ffff663fe28 in ffi_call_unix64 () at ../src/x86/unix64.S:76
#11 0x00007ffff663f790 in ffi_call (cif=0x7fffe3ffd4e0, fn=0x7ffff63f33b2
<proxy_autoplug_factories_signal>, rvalue=0x7fffe3ffd460,
avalue=0x7fffe3ffd400) at ../src/x86/ffi64.c:522
#12 0x00007ffff7870fc9 in g_cclosure_marshal_generic (closure=0x7fffe4031200,
return_gvalue=0x7fffe3ffd650, n_param_values=3,
param_values=0x7fffe3ffd750, invocation_hint=0x7fffe3ffd680,
marshal_data=0x0)
at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gclosure.c:1454
#13 0x00007ffff786f8a0 in g_closure_invoke (closure=0x7fffe4031200,
return_value=0x7fffe3ffd650, n_param_values=3, param_values=0x7fffe3ffd750,
invocation_hint=0x7fffe3ffd680) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gclosure.c:777
#14 0x00007ffff788d9f5 in signal_emit_unlocked_R (node=0x7fffe402cf30,
detail=0, instance=0xabca40, emission_return=0x7fffe3ffd850,
instance_and_params=0x7fffe3ffd750) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c:3582
#15 0x00007ffff788ccd7 in g_signal_emit_valist (instance=0xabca40,
signal_id=84, detail=0, var_args=0x7fffe3ffda48)
at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c:3336
#16 0x00007ffff788d194 in g_signal_emit (instance=0xabca40, signal_id=84,
detail=0)
at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c:3382
#17 0x00007ffff63e383b in analyze_new_pad (dbin=0xabca40, src=0xac2830,
pad=0xac0b40, caps=0x7fffe401bb20, chain=0x7fffe4034eb0)
at gstdecodebin2.c:1549
#18 0x00007ffff63e77c5 in type_found (typefind=0xac2830, probability=100,
caps=0x7fffe401bb20, decode_bin=0xabca40) at gstdecodebin2.c:2471
---Type <return> to continue, or q <return> to quit---
#19 0x00007ffff663fe28 in ffi_call_unix64 () at ../src/x86/unix64.S:76
#20 0x00007ffff663f790 in ffi_call (cif=0x7fffe3ffdef0, fn=0x7ffff63e7520
<type_found>, rvalue=0x7fffe3ffde70, avalue=0x7fffe3ffde10)
at ../src/x86/ffi64.c:522
#21 0x00007ffff7870fc9 in g_cclosure_marshal_generic (closure=0x7fffe4031fa0,
return_gvalue=0x0, n_param_values=3, param_values=0x7fffe3ffe160,
invocation_hint=0x7fffe3ffe090, marshal_data=0x0) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gclosure.c:1454
#22 0x00007ffff786f8a0 in g_closure_invoke (closure=0x7fffe4031fa0,
return_value=0x0, n_param_values=3, param_values=0x7fffe3ffe160,
invocation_hint=0x7fffe3ffe090) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gclosure.c:777
#23 0x00007ffff788d9f5 in signal_emit_unlocked_R (node=0x8e7600, detail=0,
instance=0xac2830, emission_return=0x0,
instance_and_params=0x7fffe3ffe160) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c:3582
#24 0x00007ffff788cc41 in g_signal_emit_valist (instance=0xac2830,
signal_id=45, detail=0, var_args=0x7fffe3ffe458)
at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c:3326
#25 0x00007ffff788d194 in g_signal_emit (instance=0xac2830, signal_id=45,
detail=0)
at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/gobject/gsignal.c:3382
#26 0x00007ffff3a6d4b7 in gst_type_find_element_setcaps (typefind=0xac2830,
caps=0x7fffe401bb20) at gsttypefindelement.c:714
#27 0x00007ffff3a6d0b0 in gst_type_find_element_sink_event (pad=0xac0910,
parent=0xac2830, event=0x7fffe4003000) at gsttypefindelement.c:618
#28 0x00007ffff7b3225b in gst_pad_send_event_unchecked (pad=0xac0910,
event=0x7fffe4003000, type=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)
at gstpad.c:4983
#29 0x00007ffff7b31488 in gst_pad_push_event_unchecked (pad=0x7fffe4032060,
event=0x7fffe4003000, type=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)
at gstpad.c:4679
#30 0x00007ffff7b2cc9c in push_sticky (pad=0x7fffe4032060, ev=0x7fffe3ffe7b0,
user_data=0x7fffe3ffe820) at gstpad.c:3318
#31 0x00007ffff7b24f22 in events_foreach (pad=0x7fffe4032060,
func=0x7ffff7b2cb8a <push_sticky>, user_data=0x7fffe3ffe820) at gstpad.c:530
#32 0x00007ffff7b2d024 in check_sticky (pad=0x7fffe4032060,
event=0x7fffe4003000) at gstpad.c:3374
#33 0x00007ffff7b31911 in gst_pad_push_event (pad=0x7fffe4032060,
event=0x7fffe4003000) at gstpad.c:4796
#34 0x00007ffff7b2b566 in event_forward_func (pad=0x7fffe4032060,
data=0x7fffe3ffe9c0) at gstpad.c:2735
#35 0x00007ffff7b2b35f in gst_pad_forward (pad=0xabccc0, forward=0x7ffff7b2b42e
<event_forward_func>, user_data=0x7fffe3ffe9c0) at gstpad.c:2689
#36 0x00007ffff7b2b718 in gst_pad_event_default (pad=0xabccc0, parent=0xabca40,
event=0x7fffe4003000) at gstpad.c:2786
#37 0x00007ffff7b3225b in gst_pad_send_event_unchecked (pad=0xabccc0,
event=0x7fffe4003000, type=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)
at gstpad.c:4983
#38 0x00007ffff7b31488 in gst_pad_push_event_unchecked (pad=0xac0fa0,
event=0x7fffe4003000, type=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)
at gstpad.c:4679
#39 0x00007ffff7b2cc9c in push_sticky (pad=0xac0fa0, ev=0x7fffe3ffebe0,
user_data=0x7fffe3ffec50) at gstpad.c:3318
#40 0x00007ffff7b24f22 in events_foreach (pad=0xac0fa0, func=0x7ffff7b2cb8a
<push_sticky>, user_data=0x7fffe3ffec50) at gstpad.c:530
#41 0x00007ffff7b2d024 in check_sticky (pad=0xac0fa0, event=0x7fffe4003000) at
gstpad.c:3374
#42 0x00007ffff7b31911 in gst_pad_push_event (pad=0xac0fa0,
event=0x7fffe4003000) at gstpad.c:4796
---Type <return> to continue, or q <return> to quit---
#43 0x00007ffff3a65ea2 in gst_queue2_push_one (queue=0x7fffe4036010) at
gstqueue2.c:2584
#44 0x00007ffff3a667e6 in gst_queue2_loop (pad=0xac0fa0) at gstqueue2.c:2670
#45 0x00007ffff7b62bb4 in gst_task_func (task=0xac95f0) at gsttask.c:316
#46 0x00007ffff7b63c7c in default_func (tdata=0x8c8680, pool=0x61e890) at
gsttaskpool.c:70
#47 0x00007ffff738da36 in g_thread_pool_thread_proxy (data=0x6218f0) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gthreadpool.c:309
#48 0x00007ffff738d446 in g_thread_proxy (data=0x7fffe402e280) at
/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/glib/glib/gthread.c:798
#49 0x00007ffff6bf6e0e in start_thread (arg=0x7fffe3fff700) at
pthread_create.c:311
#50 0x00007ffff692a95d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:113
--
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list