glib functions on PA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'Twas brillig, and Margarita Olaya at 21/04/11 17:16 did gyre and gimble:
> Hi Tanu,
> 
> On Thu, Apr 21, 2011 at 12:12 AM, Tanu Kaskinen <tanuk at iki.fi> wrote:
>> On Thu, 2011-04-21 at 10:13 +0530, Arun Raghavan wrote:
>>> On Wed, 2011-04-20 at 23:26 -0500, Margarita Olaya wrote:
>>>> Hi,
>>>>
>>>> The initial implementation of  jack detection is using threads and
>>>> simple file operations like open, close and read currently I'm looking
>>>> into using pa_threads and glib functions. First step It is simple
>>>> enough e.g change threads by pa_threads and for file operations I have
>>>>
>>>> u->fd = g_open(u->device_id, O_RDONLY)
>>>> ioch = g_io_channel_unix_new(u->fd);
>>>>
>>>> then use g_io_channel_read_chars() instead of read.
>>>>
>>>> I'm wonder if it is the beast approach or I'm missing any PA function
>>>> that fits better for this purpose.
>>>
>>> I'm not aware of any PA code that uses glib for this. module-pipe-sink
>>> seems to do most of the things you need so that might serve as a good
>>> starting point.
>>
>> Also, the server side code doesn't use glib for anything - the glib
>> dependency has been avoided on purpose. (I don't know or remember the
>> details why Lennart has been avoiding glib - is it only to keep the
>> amount of dependencies low, or are there some other reasons why PA
>> shouldn't use glib.)
> 
> If that is the case, It looks that it is better to keep the simple
> file operations, right? Otherwise I'll add a glib dependency.

Yes, please use the various pa_ functions already in use for other basic
file operations. No glib deps in the core PA or modules (module-gconf is
an exception but even it will die away soon - for various values of "soon").

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux