On Fri, Sep 21, 2012 at 1:20 AM, Archos <
raul...@sent.com> wrote:
> Hi!
> Respect to the license, you can license it like you want since you're its
> creator but please don't use a GPL license in packages. You don't give the
> copyright to "Xiph.org Foundation" or another one; the copyright is yours.
I haven't looked at the source too closely, and I'm not a lawyer. I
think as long as you didn't actually use any code from libogg directly
(only used the references, and it looks like at least the API
reference) you should be fine to use whatever licence you like.
> I have seen that some functions, like PageOut, return an int with different
> meaning for each returned value; it's ok in languages like C/C++ but in Go
> could be done returning an error, if were necessary, and constants.
>
> i.e., in function PageOut[1], instead of return:
>
> // return values:
> // -1) recapture (hole in data)
> // 0) need more data
> // 1) page returned
>
> you could return a error instead of -1 or 0, and nil error instad of 1
>
> [1]:
https://github.com/grd/ogg/blob/master/ogg.go#L744
I agree here. The C API frequently does that. Another example is the
ogg_sync_wrote returning -1 on error and 0 otherwise. func (oy
*SyncState) Wrote(Bytes int) int [1] Follows this exactly. In this
case, it could/should probably return error with the error when needed
and nil otherwise. I'm sure there are other cases where you should use
something like this as well.
Does this not implement the ogg bitpack part of the C API? I see the
General, Encoding, & Decoding, but I don't see Bitpacking. (Granted
I'm not intimately familiar with using the C libogg API, I just
noticed that while doing a quick comparison.)
[1]
https://github.com/grd/ogg/blob/master/ogg.go#L635
> By the way, thanks because Go needs packages related to audio/video.
Agreed! Any work here is great to see :)
> El viernes, 21 de septiembre de 2012 06:18:04 UTC+1, Gerard escribió:
>>
>> Hello gophers, I just finished re-writing libogg 1.3.0 in Go
>> (
www.github.com/grd/ogg). That by itself isn't much, but it can be used as a
>> basis for other libraries such as ogg/vorbis, celt, flac etc (even with cgo
>> imo). The re-writing isn't exactly a one on one copy of the features, but
>> how I think it should be done. The unit testing passes completely. I must
>> say that when looking at the code it looks quite easy, however the coding
>> was anything but easy.
>>
>> Suggestions for improvements are welcome. O yes, I have an OT question
>> about the licencing stuff. Can I use the std Go license or should I use the
>> xiph license?
>>
>> Regards,
>> Gerard
>
> --
>
>