Closed jhgorse closed 8 years ago
This apparently affects Linux just as well, if the source video camera is the Apple Facetime via v4l2.
gst-device-monitor-1.0 Video/Sources
Probing devices...
Failed to start device monitor!
[gst-master] [jhg@omega onevideo]$ gst-device-monitor-1.0 Video/Source
Probing devices...
Device found:
name : FaceTime HD Camera (Built-in)
class : Video/Source
caps : video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction)10/1;
video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
video/x-raw, format=(string)YUY2, width=(int)480, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
video/x-raw, format=(string)YUY2, width=(int)352, height=(int)288, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
video/x-raw, format=(string)YUY2, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
video/x-raw, format=(string)YUY2, width=(int)176, height=(int)144, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
video/x-raw, format=(string)YUY2, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
image/jpeg, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
image/jpeg, width=(int)1024, height=(int)576, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
image/jpeg, width=(int)960, height=(int)544, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)1:4:7:1, framerate=(fraction){ 2997/100, 25/1, 24/1, 15/1 };
properties:
device.path = /dev/video0
udev-probed = false
device.api = v4l2
v4l2.device.driver = uvcvideo
v4l2.device.card = "FaceTime\ HD\ Camera\ \(Built-in\)"
v4l2.device.bus_info = usb-0000:00:1a.0-1.1
v4l2.device.version = 262148 (0x00040004)
v4l2.device.capabilities = 2216689665 (0x84200001)
v4l2.device.device_caps = 69206017 (0x04200001)
#3 0x00007ffff4b2fee9 in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=pretty_function@entry=0x7ffff7759880 <__func__.20241> "gst_caps_intersect_full", expression=expression@entry=0x7ffff7759358 "GST_IS_CAPS (caps1)") at gmessages.c:1088
#4 0x00007ffff76cfd4f in gst_caps_intersect_full (caps1=<optimized out>, caps2=<optimized out>, mode=<optimized out>)
at gstcaps.c:1658
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_iterator':
#5 0x00007ffff7bceb74 in ov_aggregate_call_details_for_remotes (local=0x9d31a0 [OvLocalPeer], in=0xb39b00, call_id=8429511061)
at onevideo/outgoing.c:533
(gdb) fr 5
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_iterator':
#5 0x00007ffff7bceb74 in ov_aggregate_call_details_for_remotes (local=0x9d31a0 [OvLocalPeer], in=0xb39b00, call_id=8429511061)
at onevideo/outgoing.c:533
533 tmp = gst_caps_intersect (thiscaps[1], thatcaps[3]);
(gdb) list
528 g_assert (thatcaps);
529 /* this.send_acaps = this.send_acaps.intersect(that.recv_acaps) */
530 tmp = gst_caps_intersect (thiscaps[0], thatcaps[2]);
531 gst_caps_unref (thiscaps[0]), thiscaps[0] = tmp;
532 /* this.send_vcaps = this.send_vcaps.intersect(that.recv_vcaps) */
533 tmp = gst_caps_intersect (thiscaps[1], thatcaps[3]);
534 gst_caps_unref (thiscaps[1]), thiscaps[1] = tmp;
535 }
536 }
537
(gdb) thread apply all bt
Thread 5 (Thread 0x7fffd9a86700 (LWP 9309)):
#0 0x00007ffff45fa2fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007ffff4b28dbc in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7fffd40008c0, timeout=<optimized out>, context=0x859180) at gmain.c:4103
#2 0x00007ffff4b28dbc in g_main_context_iterate (context=context@entry=0x859180, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3803
#3 0x00007ffff4b28ecc in g_main_context_iteration (context=0x859180, may_block=may_block@entry=1) at gmain.c:3869
#4 0x00007ffff4b28f09 in glib_worker_main (data=<optimized out>) at gmain.c:5618
#5 0x00007ffff4b500a5 in g_thread_proxy (data=0x85ab70) at gthread.c:764
#6 0x00007ffff48ca555 in start_thread (arg=0x7fffd9a86700) at pthread_create.c:333
#7 0x00007ffff4605b9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 4 (Thread 0x7fffd3fff700 (LWP 9311)):
#0 0x00007ffff45fa2fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007ffff4b28dbc in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7fffc80010c0, timeout=<optimized out>, context=0x7fffcc01a4f0) at gmain.c:4103
#2 0x00007ffff4b28dbc in g_main_context_iterate (context=context@entry=0x7fffcc01a4f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3803
#3 0x00007ffff4b28ecc in g_main_context_iteration (context=context@entry=0x7fffcc01a4f0, may_block=may_block@entry=1) at gmain.c:3869
#4 0x00007fffd867a2ad in dconf_gdbus_worker_thread (user_data=0x7fffcc01a4f0) at dconf-gdbus-thread.c:82
#5 0x00007ffff4b500a5 in g_thread_proxy (data=0x7fffcc0039e0) at gthread.c:764
#6 0x00007ffff48ca555 in start_thread (arg=0x7fffd3fff700) at pthread_create.c:333
---Type <return> to continue, or q <return> to quit---
#7 0x00007ffff4605b9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 3 (Thread 0x7fffd9285700 (LWP 9310)):
#0 0x00007ffff4b2fd3b in g_logv (breakpoint=1) at gmessages.c:315
#1 0x00007ffff4b2fd3b in g_logv (log_domain=0x7ffff77542d0 <g_log_domain_gstreamer> "GStreamer", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffd9284860) at gmessages.c:1041
#2 0x00007ffff4b2feaf in g_log (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff4b9f95d "%s: assertion '%s' failed") at gmessages.c:1079
#3 0x00007ffff4b2fee9 in g_return_if_fail_warning (log_domain=<optimized out>, pretty_function=pretty_function@entry=0x7ffff7759880 <__func__.20241> "gst_caps_intersect_full", expression=expression@entry=0x7ffff7759358 "GST_IS_CAPS (caps1)") at gmessages.c:1088
#4 0x00007ffff76cfd4f in gst_caps_intersect_full (caps1=<optimized out>, caps2=<optimized out>, mode=<optimized out>)
at gstcaps.c:1658
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_iterator':
#5 0x00007ffff7bceb74 in ov_aggregate_call_details_for_remotes (local=0x9d31a0 [OvLocalPeer], in=0xb39b00, call_id=8429511061)
at onevideo/outgoing.c:533
#6 0x00007ffff7bcfeee in ov_local_peer_negotiate_thread (task=0x86c9b0 [GTask], local=0x9d31a0 [OvLocalPeer], task_data=0x0, cancellable=0xa774d0 [GCancellable]) at onevideo/outgoing.c:933
#7 0x00007ffff50f0895 in g_task_thread_pool_thread (thread_data=0x86c9b0, pool_data=<optimized out>) at gtask.c:1231
#8 0x00007ffff4b50a3e in g_thread_pool_thread_proxy (data=<optimized out>) at gthreadpool.c:307
#9 0x00007ffff4b500a5 in g_thread_proxy (data=0xb7f450) at gthread.c:764
#10 0x00007ffff48ca555 in start_thread (arg=0x7fffd9285700) at pthread_create.c:333
#11 0x00007ffff4605b9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 2 (Thread 0x7fffe67bd700 (LWP 9307)):
---Type <return> to continue, or q <return> to quit---
#0 0x00007ffff45fa2fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007ffff4b28dbc in g_main_context_iterate (priority=2147483647, n_fds=2, fds=0x7fffe00010e0, timeout=<optimized out>, context=0x65aa10) at gmain.c:4103
#2 0x00007ffff4b28dbc in g_main_context_iterate (context=0x65aa10, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3803
#3 0x00007ffff4b29142 in g_main_loop_run (loop=0x65a9a0) at gmain.c:4002
#4 0x00007ffff514a696 in gdbus_shared_thread_func (user_data=0x65a9e0) at gdbusprivate.c:274
#5 0x00007ffff4b500a5 in g_thread_proxy (data=0x63cb20) at gthread.c:764
#6 0x00007ffff48ca555 in start_thread (arg=0x7fffe67bd700) at pthread_create.c:333
#7 0x00007ffff4605b9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Thread 1 (Thread 0x7ffff7fba980 (LWP 9303)):
#0 0x00007ffff45fa2fd in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007ffff4b28dbc in g_main_context_iterate (priority=2147483647, n_fds=8, fds=0xb52ba0, timeout=<optimized out>, context=0x648d20) at gmain.c:4103
#2 0x00007ffff4b28dbc in g_main_context_iterate (context=context@entry=0x648d20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3803
#3 0x00007ffff4b28ecc in g_main_context_iteration (context=0x648d20, context@entry=0x0, may_block=may_block@entry=1) at gmain.c:3869
#4 0x00007ffff511426c in g_application_run (application=0x621100 [OvgApp], argc=4, argv=0x7fffffffb888) at gapplication.c:2308
#5 0x000000000040743e in main (argc=4, argv=0x7fffffffb888) at gui/ovg-main.c:74
linux w/ facetime camera ./debug-one-video-gui.sh -p 5015 --low-res=0 ... snip onevideo onevideo/lib.c:739:ov_local_peer_set_video_device: Supported send vcaps: EMPTY
./memcheck-one-video-gui.sh --low-res=0 ... snip 0:00:03.188003923 9644 0xfe753c0 DEBUG onevideo onevideo/lib.c:739:ov_local_peer_set_video_device: Supported send vcaps: EMPTY 0:00:06.541192772 9644 0xfe753c0 DEBUG onevideo onevideo/lib.c:1076:ov_local_peer_discovery_start: Searching for remote peers Adding new row: 192.168.88.202:5000 Waiting for remote peers 0:00:30.479558332 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:303:ov_tcp_msg_write_to_stream: Writing msg type start negotiating to the network; contents: (217613236173, 'omega.local:5000-89aa41670e9661959e2555da56c1f669', 5000) 0:00:30.513550227 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:501:ov_tcp_msg_read_from_stream: Reading message type ok, can negotiate and version 1 of length 68 bytes 0:00:30.530290722 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:209:ov_remote_peer_tcp_client_start_negotiate: Recvd OK from 'localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650' Remotes have replied; continuing negotiation... 0:00:30.537443522 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:313:get_all_remotes_addr_list_except_this: Peers (other than us) remote to peer localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650: (217613236173, []) 0:00:30.544427233 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:303:ov_tcp_msg_write_to_stream: Writing msg type query media caps to the network; contents: (217613236173, []) 0:00:30.549952197 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:501:ov_tcp_msg_read_from_stream: Reading message type reply media caps and version 1 of length 468 bytes 0:00:30.555130794 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:337:ov_remote_peer_tcp_client_query_caps: Reply caps from localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650: (217613236173, 5001, 5002, 'audio/x-opus, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved', 'image/jpeg, width=(int)1280, height=(int)720, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)640, height=(int)360, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)320, height=(int)240, framerate=(fraction){ 10/1, 5/1 }', 'audio/x-opus', 'image/jpeg; video/x-h264', [('omega.local:5000-89aa41670e9661959e2555da56c1f669', 5003, 5004, 5005, 5006)])
(OneVideo:9644): GStreamer-CRITICAL **: gst_caps_intersect_full: assertion 'GST_IS_CAPS (caps1)' failed 0:00:30.584391869 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:588:ov_aggregate_call_details_for_remotes: Set remote peer call details: localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650, [5003, 5004, 5001, 5005, 5006, 5002] 0:00:30.589063815 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:647:ov_aggregate_call_details_for_remotes: aggports table is: From: omega.local:5000-89aa41670e9661959e2555da56c1f669 To: localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650 Ports: [5003, 5004, 5001, 5005, 5006, 5002] From: localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650 To: omega.local:5000-89aa41670e9661959e2555da56c1f669 Ports: [5003, 5004, 5001, 5005, 5006, 5002]
(OneVideo:9644): GStreamer-CRITICAL **: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed
(OneVideo:9644): GStreamer-CRITICAL **: gst_structure_get_name: assertion 'structure != NULL' failed
(OneVideo:9644): GStreamer-CRITICAL *_: gst_mini_object_unref: assertion 'mini_object != NULL' failed 0:00:30.610684033 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:303:ov_tcp_msg_write_to_stream: Writing msg type call details to the network; contents: (217613236173, 'audio/x-opus, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved', 'image/jpeg, width=(int)1280, height=(int)720, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)640, height=(int)360, framerate=(fraction){ 30/1, 15/1, 5/1 }; image/jpeg, width=(int)320, height=(int)240, framerate=(fraction){ 10/1, 5/1 }', [('omega.local:5000-89aa41670e9661959e2555da56c1f669', 'audio/x-opus, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved', 'NULL', 5003, 5004, 5001, 5005, 5006, 5002)]) 0:00:30.618762847 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:501:ov_tcp_msg_read_from_stream: Reading message type acknowledged and version 1 of length 8 bytes 0:00:30.622025301 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:746:ov_remote_peer_tcp_client_send_call_details: Recvd from 'localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650' ACK 0:00:30.629495933 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:279:get_all_peers_list_except_this: Peers remote to peer localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650: (217613236173, ['omega.local:5000-89aa41670e9661959e2555da56c1f669']) 0:00:30.634690282 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:303:ov_tcp_msg_write_to_stream: Writing msg type start call to the network; contents: (217613236173, ['omega.local:5000-89aa41670e9661959e2555da56c1f669']) 0:00:30.640185270 9644 0x1943cb50 DEBUG onevideo onevideo/comms.c:501:ov_tcp_msg_read_from_stream: Reading message type acknowledged and version 1 of length 8 bytes 0:00:30.641542592 9644 0x1943cb50 DEBUG onevideo onevideo/outgoing.c:789:ov_remote_peer_tcp_client_start_call: Recvd from 'localhost.localdomain:5000-c6cfe8e1909d3c6ff7a75c2856c1f650' ACK ./memcheck-one-video-gui.sh: line 13: 9644 Killed G_SLICE="always-malloc" G_DEBUG="$G_DEBUG,gc-friendly" GSTDEBUG=":3,onevideo:6,$GST_DEBUG" $LIBTOOL --mode=execute valgrind --suppressions="${build_dir}"/tests/supp/gst.supp --tool=memcheck --leak-check=full --show-leak-kinds=definite,indirect --leak-resolution=high --num-callers=30 --log-file="${VALGRIND_LOG}" "${build_dir}"/${progtype}/one-video-${progtype} "$@"
priv->video_device is not defined (crashes when gdb$ print gst_device_get_display_name (priv->video_device) )
Different failures for the two different C920 cameras. One has H264, which gets selected and fails local_peer_setup_transmit_pipeline. The other which does not support H264, ov_aggregate_call_details_for_remotes.
b lib.c:752
priv->video_device = device;
n
(gdb) p gst_device_get_display_name (device)
$2 = (gchar *) 0x85ac70 "UVC Camera (046d:0821)"
(gdb) p gst_device_get_display_name (priv->video_device)
$3 = (gchar *) 0x85a3b0 "UVC Camera (046d:0821)"
watch priv->video_device
Hardware watchpoint 4: priv->video_device
(gdb) c
Continuing.
Watchpoint 4 deleted because the program has left the block in
which its expression is valid.
ovg_app_startup (app=0x621100 [OvgApp]) at gui/ovg-app.c:199
199 g_list_free_full (devices, g_object_unref);
(gdb) bt
#0 0x0000000000404795 in ovg_app_startup (app=0x621100 [OvgApp]) at gui/ovg-app.c:199
#1 0x00007ffff4e28f04 in _g_closure_invoke_va (closure=closure@entry=0x613bb0, return_value=return_value@entry=0x0, instance=instance@entry=0x621100, args=args@entry=0x7fffffffb4c0, n_params=<optimized out>, param_types=0x0) at gclosure.c:831
#2 0x00007ffff4e42c7d in g_signal_emit_valist (instance=0x621100, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffb4c0) at gsignal.c:3214
#3 0x00007ffff4e4329f in g_signal_emit (instance=instance@entry=0x621100, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3361
#4 0x00007ffff5113712 in g_application_register (application=application@entry=0x621100 [OvgApp], cancellable=cancellable@entry=0x0, error=error@entry=0x7fffffffb600) at gapplication.c:2012
#5 0x00007ffff5113e97 in g_application_real_local_command_line (application=0x621100 [OvgApp], arguments=0x7fffffffb6f8, exit_status=0x7fffffffb6f4) at gapplication.c:980
#6 0x00007ffff51141da in g_application_run (application=0x621100 [OvgApp], argc=4, argv=0x7fffffffb868) at gapplication.c:2277
#7 0x000000000040743e in main (argc=4, argv=0x7fffffffb868) at gui/ovg-main.c:74
ec03420 Fixed in: 3a4ab3ab5b0bc6618007aec264b8610f693ed339 and ec03420dbacbba2cb524544c45e686a13ea5e39b
Do we need to add a unref() to balance the ref()?
Probably, maybe like this (untested):
diff --git a/onevideo/ov-local-peer.c b/onevideo/ov-local-peer.c
index 63d3320..a1f3f35 100644
--- a/onevideo/ov-local-peer.c
+++ b/onevideo/ov-local-peer.c
@@ -377,6 +377,7 @@ ov_local_peer_dispose (GObject * object)
g_clear_pointer (&priv->send_acaps, gst_caps_unref);
g_clear_pointer (&priv->send_vcaps, gst_caps_unref);
+ g_clear_object (&priv->video_device);
g_clear_object (&priv->transmit_vcapsfilter);
g_clear_object (&priv->transmit);
g_clear_object (&priv->playback);
This occurs during initiation of the session with the GUI. CLI does not exhibit this behavior.
thiscaps[] and thatcaps[] values in ov_aggregate_call_details_for_remotes():outgoing.c:533:
bt all