[Bug 649931] PATCH: allow apexsink to play to new, generation 2 AirTunes (AirPlay) hardware

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed May 11 00:53:21 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=649931
  GStreamer | gst-plugins-bad | git

Sebastian Dröge <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #187604|none                        |needs-work
             status|                            |

--- Comment #1 from Sebastian Dröge <slomo at circular-chaos.org> 2011-05-11 07:53:18 UTC ---
Review of attachment 187604:
 --> (https://bugzilla.gnome.org/review?bug=649931&attachment=187604)

So the new generation uses UDP? You should make sure that you don't send too
large packets from the sink then, TCP will handle that correctly by using
fragmentation but for UDP you have to do it yourself

::: ext/apexsink/gstapexsink.c
@@ +119,3 @@
+  static GEnumValue generation[] = {
+    {GST_APEX_GENERATION_ONE, "GST_APEX_GENERATION_ONE", "First generation
(e.g., original AirPort Express)"},
+    {GST_APEX_GENERATION_TWO, "GST_APEX_GENERATION_TWO", "Second generation
(e.g., Apple TV v2)"},

Please use something else for the name (the first string), e.g. generation-one

@@ +136,3 @@
+  static GEnumValue transport_protocol[] = {
+    {GST_APEX_TCP, "GST_APEX_TCP", "TCP"},
+    {GST_APEX_UDP, "GST_APEX_UDP", "UDP"},

Please use something else for the name (the first string), e.g. udp and tcp

@@ +407,3 @@
+        GST_INFO_OBJECT (sink, "ApEx transport protocol set to \"%d\"",
sink->transport_protocol);
+      } else {
+        G_OBJECT_WARN_INVALID_PSPEC (object, "transport protocol", prop_id,
pspec);

Instead of this warning you should do nothing and use a GST_WARNING_OBJECT()
that says that the property can only be changed in NULL state.

@@ +575,3 @@
+   */
+  usleep ((gulong) ((length * 1000000.) / (GST_APEX_RAOP_BITRATE *
+                     GST_APEX_RAOP_BYTES_PER_SAMPLE)));

Instead of sleeping it's probably a good idea to use the GstClock API here,
which allows interruptions and everything.

-- 
Configure bugmail: https://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