Creating Objective-C wrappers for Swift implementation

Ryan Francesconi rowingatsea at gmail.com
Thu Mar 26 00:54:34 GMT 2020


Hi, I put the code here:
https://github.com/ryanfrancesconi/TaglibWrapper <https://github.com/ryanfrancesconi/TaglibWrapper>

Hope that is helpful - that is basically the functionality that I needed, and isn’t a complete port or anything. There is a chapter implementation in there though.

Ryan



> On Mar 25, 2020, at 4:34 PM, Nolaine Crusher <nolainecrusher at gmail.com> wrote:
> 
> Thank you so much, that would be amazing! If I can help, just let me know!
> 
> On Wed, Mar 25, 2020 at 4:33 PM Ryan Francesconi <rowingatsea at gmail.com <mailto:rowingatsea at gmail.com>> wrote:
> I created a taglib wrapper for swift. If i can clean it up soon, I will post it for you!
> 
> Ryan
> 
>> On Mar 25, 2020, at 3:18 PM, Nolaine Crusher <nolainecrusher at gmail.com <mailto:nolainecrusher at gmail.com>> wrote:
>> 
>> Hi.
>> 
>> I've only been coding for about six months, and that's in Swift. Before that, I knew so little about coding that even using command line apps could pose a very daunting challenge for me.
>> 
>> However, the project I'm working on involves using metadata to curate audiobook libraries. For now I'm limiting the formats my app will support to .mp3, .aac(.m4b), and .flac. This is posing a number of challenges.
>> 
>> 1) ffmpeg's support for metadata in general, and more obscure metadata tags in particular, is very limited.
>> 2) AVFoundation, while it appears willing to read .mp3 metadata, won't export an .mp3 file on passthrough settings after editing metadata. And it doesn't deal with FLAC at all.
>> 
>> For obvious reasons, TagLib is my best bet. But I don't know C++. Or even Objective-C.
>> 
>> I found this build of TagLib (https://github.com/Phisto/TagLib <https://github.com/Phisto/TagLib>) for MacOS, and I found these Objective-C wrappers (https://github.com/BTRLabs/TagLibIOS <https://github.com/BTRLabs/TagLibIOS>) to make TagLib usable in Swift. (however, the wrappers are for IOS, and the project itself is a CocoaPod and I sort of hate the way CocoaPods takes over your project.) Between the two, I was able to cobble together a sort of Franken-code project that would work for MacOS without relying on CocoPods, which I'm calling TagLibKit:
>> 
>> https://github.com/NCrusher74/TagLibKit <https://github.com/NCrusher74/TagLibKit>
>> 
>> However, that's about as far as my monkey-see/monkey-do attempt at emulating the code in the wrappers will take me. And unfortunately, it's not far enough, because the TagLibIOS wrappers only wrap the text-based ID3 frames. It will handle Comments, USLT, and IPLS/TIPL frames, but not CHAP and CTOC frames. And since I'm dealing with Audiobooks, chapters would be a good thing to have. Admittedly, most people just separate their chapters by file, but that's because not a lot of apps support chaptered MP3 and that is one of the things I'm hoping to correct with my project.
>> 
>> I'm more than willing to do the work myself, but like I said, I don't know C++ or ObjectiveC, so at the very least I would need a mentor who knows TagLib and would be willing to guide me into figuring out what I need to do.
>> 
>> Could anyone advise me on this?
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20200325/32db897a/attachment-0001.html>


More information about the taglib-devel mailing list