Showing posts with label gsoc. Show all posts
Showing posts with label gsoc. Show all posts

Sunday, August 30, 2015

GUADEC 2015

At the beginning of this month I've spent a few great days in Goteborg, at GUADEC conference. That was my second GUADEC (first time I've participated last year, in Strasbourg).

There were a lot of interesting presentations, but the most I enjoyed all of the keynotes. As a Google Summer of Code student (I've worked for GStreamer project [1]), I was able to give a lightning talk about my project. It seemed to be interested to some people, so after that someone asked me to show him my project "in action". We were talking about possible improvements and new features.

In the evenings organizers prepared for attendees some event, so I could integrate with other GNOME people. Moreover, they organized for us (GSOC students and mentors) a dinner, so I could meet other students a little bit better, talk mostly about our summer projects, but also about differences in education at their universities  (people came from different part of world).

In conclusion, I enjoyed GUADEC, all presentations and evening events. I'd like to thank the GNOME Foundation for sponsoring my travel and my hostel. My participation probably wasn't be able without Foundation's help. Thanks a lot!


[1] http://www.cookandcommit.eu/2015/06/gstreamer-debugger-introduction.html

Monday, June 29, 2015

GStreamer Debugger - introduction

Hi everyone,
This year I've been accepted to Google Summer of Code :) Last year I worked on Banshee project [1], and this year I joined to GStreamer [2] team.
This summer I work on tool for GStreamer-based applications - GStreamer Debugger.

Goals
At the end of this summer, I'm going to provide you an application, which allows you to connect to your remote pipeline (obviously, lo interface can be used as well :)), watch pipeline graph (and its changes), spy selected queries, events, log messages, messages from bus and log messages, and even buffers. Application won't allow user modify pipeline and pipeline's state, but who knows - if it is useful feature, I implement it in the future.
GStreamer doesn't provide possibility to connect to pipeline, so I have to do it on my own.

Progress
June is a month, when I've exams on my university (fortunately, I've already passed all of them!), so I didn't spend as much time as I wanted on this project. Anyway, I accomplished a few milestones.
There's a list, what already has been done:
  • gst-trace [3] plugin, containing tcp server. For now, it sends GstEvents, GstMessages, and log messages to clients (todo: send GstBuffers, and GstQueries)
  • client application, which displays events and log messages (todo: display GstBuffers, GstQueries, GstMessages). I have a lot of ideas, how to improve client application, but I'm not sure whether I meet GSOC deadline, so I suppose, most of them will be implement after Google's program. 
  • protocol - I used Google Protobuf library [4]. In general, I've defined most of protocol's structures, I just make minor improvements, when I need it.
Below you can find a few screenshoots of client application. Full code can be found on my github account ([5], [6]).




Links
[1] http://www.cookandcommit.eu/2014/04/google-summer-of-code-2014-with-gnome.html
[2] http://gstreamer.freedesktop.org/
[3] https://bugzilla.gnome.org/show_bug.cgi?id=733187
[4] https://developers.google.com/protocol-buffers/
[5] https://github.com/loganek/gstreamer
[6] https://github.com/loganek/gst-debugger

Wednesday, August 6, 2014

GSoC Report #4


Last stage of my Google Summer of Code 2014 project was to implement mechanism for sending metadata to AcoustID service.
Me and my mentor decided, that metadata will be sent automatically in a background. There is no need for user interaction. Data is sent on adding new audio file to a music library, or on a change metadata of existing track.
AcoustID requires API key for acceptance new metadata, so user has to enter his key into a preferences window.

Metadata Fixer preferences window

Key might be obtained on a acoust id website [1]. While user doesn't enter api key, in plugin window, "AcoustID Settings" button will be displayed.

Plugin info with button referring to an AcoustID preferences window





Links
[1] https://acoustid.org/api-key

Friday, July 11, 2014

Creating SQL database `on the fly` - sqlfiddle.com

Recently I had to write some SQL queries in a quite advanced application (Banshee [1]). I'm not an expert in SQL, so I had to work through trial and error. But recompilation and restart application every time, when I changed something, was very time consuming. Unfortunately, I didn't use my own computer, and I hadn't installed(and I wasn't able to install) any SQLite shell. I started to looking for web interface for SQLite database.
One of the first result in Google was sqlfiddle [2] page. At first sight website looks very simple. And in reality - it is. On the left side you have to write DDL statements, and on the right side, you may use created schema by sending some queries.
For now, service offers many different databases:
  • MySQL (a few versions)
  • Oracle
  • PostgreSQL (a few versions)
  • SQLite
  • MS SQL Server (a few versions)
You may also generate link to your case, and paste id e.g. in some forum or irc channel.
There is also a lot of minor features, which can be use
ful in specified cases:
  • 3 types of displaying results,
  • execution time measurement,
  • query execution plan,
  • different query terminators,
and many others, which I probably missed. I would highly recommend at least try this tool. Maybe you would like it, and will use it in your daily work ;)

sqlfiddle in action

Links
[1] http://banshee.fm/
[2] http://sqlfiddle.com/

Thursday, July 10, 2014

GSoC Report #3

Finally I added all planned earlier options to my Banshee's plugin:
  • Empty Album Name - looking for tracks with empty album's name,
  • Missing Artist and Titles Fix - looking for tracks with empty fields Artist and/or Title,
  • Missing Albums Fix - looking for tracks with empty album's name,
  • Missing Most of Metadata Fix - looking for tracks with empty fields: Album, Artist, and Title,
  • Invalid Metadata Fix - looking for tracks with invalid(it means, different from online database) metadata.
All of them, except Empty Album Name, use fingerprints. So that's also the difference between Empty Album Name and Missing Album Fix. The first one uses track title and artist name, so you can't use it for looking track with empty albums and/or titles. The second one can be used even for tracks with no metadata, because it takes fingerprints for searching.

All available options in Metadata Fixer


Changes in code
There was a lot of changes in my source code. Before my GSoC attendance, I haven't so much experience in functional programming, so I wasn't able to use all of advantages, which come from F# language. Fortunatelly, my mentor, Andrés G. Aragoneses, is very helpful, so thanks his few advices, I refactored some pieces of code in my plugin. I hope, my code looks now much better now;)

Monday, June 30, 2014

GSoC Report #2

Previously I wrote about an application, which allows you to find metadata tags using audio file fingerprint. This application was written in C#, and required some minor fixes.

Rewriting standalone application in F#
So that's what I've done during last week; I fixed minor bugs (e.g. some fields in JSON file were optional), and the most important: rewrote application in F#. From now on, I'm not writing in C# during GSoC no more :)

Implemented AcoustID in a Banshee's plugin
Afterwards, I've finally implemented AcoustID support in Banshee! Now you can get any audio file form your disk, and find metadata of it. For now my plug-in supports only finding track Artist and Title fields, but I hope, the rest of them will be done and available in the nearest future.

Plugin based on fingerprints in Metadata Fixer

Caching AcoustID results
Fingerprint computation is a long process (approximately 5 seconds per file), so calculated fingerprints are stored in a cache directory. It allows to use results in the future.
Fingerprints are saved in a files, where filename is a hash of track URI and size of file.

Computing fingerprints in a background
Moreover, I also started to implement mechanism, which computes fingerprints in a background, so user don't have to waste his time on a waiting for fingerprints. It's working now, but I didn't test it too much, and probably it requires still a lot of work.

Empty album's names fixer improvements
However, I improved a little MetadataFixer plugin by adding another column to a main view: Track Info. It was useful in my plugin, and might be also used in the future. Plugin's author can decide, whether this column should be available (by overriding specific method), and what should be there displayed (e.g. file URI or track title).

Track Info column in Metadata Fixer plugin

Saturday, June 21, 2014

GSoC Report #1 (slightly delayed)

At first, I have to explain my little delay of progress report - I started my work a little bit later (that's because of exams on my university), and that's why I'm writing my progress report now (I promise, I will publish my further report in the nearest two weeks:)

Last time I spent a lot of time on a  learning F# language. My mentor, Andrés G. Aragoneses, proposed me to write my task in this language (at the beginning it was to be a C# ). I'd never written anything using this language, so I started to read everything what I noticed in the internet about it. The most interesting articles I can be found at the end of post.
Because I even after reading a lot of articles I wasn't so experienced in F# (I'm still not ;), I started to write in C#, and then I rewrote my code to F#.

Empty album's names fixer
My first subtask was add new function to  Metadata Fixer plugin. Pluggin allowed to find and fix duplicated artists, albums and genres in loaded files. I implemented one more option: finding tracks, which has empty album's names, and setting this field to "God's Album". Screenshot of plugin and results is shown below:

Input track list, with empty album's names


Tracks with empty album's field, found by plugin


Fixed album's names

After that, I improved it a little, by finding real album's name in MusicBrainz [1] service.
Album's names found in MusicBrainz

Meanwhile I fixed bug [2], which totally prevented to use Metadata Fixer in the newest Banshee version.

Working with AcoustID
Now I'm trying to use AcoustID [3] - it's an Open Source project, which allows to read fingerprints from audiofile. Fingerprint may be used for finding more informations about track (e.g. track name, artist, release etc.).
For now, I wrote an application, which takes audiofile as an argument, reads fingerprints, and display some informations about this file.
Sample usage:
loganek@loganek-cmp ~$ ./ChromaPrintTest.exe ~/unknown.mp3
Track ID: 370f8c7a-ae8d-4ac4-9c41-f731929580e7
=========================
Recording ID: cfe8e73c-09c1-4c86-a86c-d31da7448a08
Title: Ten sen
Artists:
     * Varius Manx (ID: 04f19c9f-f9c3-4645-bb26-7f7211ae7b6f)
Release Groups:
     * Najlepsze z dobrych (Type: Album, ID: c6ac2258-16c4-3362-8396-08c5fa49456d)
     * Ego (Type: Album, ID: 322c5fec-d0bf-37ba-82a9-c1d1b93608c3)

loganek@loganek-cmp ~$
Fingerprints are calculated from decoded stream, so we can use this application for every audio format, which is supported by GStreamer installed on your system.

Commits
For my commits, follow the link [4]

F# tutorials
Links

Saturday, April 26, 2014

Google Summer of Code 2014 with GNOME!

Hello everyone! From 19th May (official, but I hope a little bit earlier) I'm starting to improve Banshee application under Google Summer of Code. Something more about project you may find here.