the phrygian cap


luisbg

@luisbg

luis@debethencourt.com



Ohloh profile for Luis de Bethencourt
Blogalia




<Noviembre 2014
Lu Ma Mi Ju Vi Sa Do
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
             

Creative Commons License


planet gnome
planet ubuntu
alberto ruiz
andy wingo
jeff fortin
slomo's blog
jan schmidt
vincent's random waffle



"all religions, arts and sciences are branches of the same tree. all these aspirations are directed toward ennobling man's life, lifting it from the sphere of mere physical existence and leading the individual towards freedom." albert einstein

Building GStreamer for Mac OS X and iOS



As part of the 1.4.3 release of GStreamer I helped the team by making the OS X and iOS builds. The process is easy but has a long sequence of steps. So it is worth sharing it here just in case you might want to run your own GStreamer in any of these platforms.

1. First, you need to download CMake
http://www.cmake.org/files/v3.0/cmake-3.0.2-Darwin-universal.dmg

2. Add CMake to your PATH
$ export PATH=$PATH:/Applications/CMake.app/Contents/bin

3. Prepare the destination (as root)
$ mkdir /Library/Frameworks/GStreamer.framework
$ chown user:user /Library/Frameworks/GStreamer.framework


4. Check out the GStreamer release code
$ git clone git://anongit.freedesktop.org/gstreamer/sdk/cerbero
$ cd cerbero
$ git checkout -b 1.4 origin/1.4


5. Pin the commits to build
edit config/osx-universal.cbc to have the following:

prefix='/Library/Frameworks/GStreamer.framework/Versions/1.0'

recipes_commits = {
'gstreamer-1.0' : '1.4.3',
'gstreamer-1.0-static' : '1.4.3',
'gst-plugins-base-1.0' : '1.4.3',
'gst-plugins-base-1.0-static' : '1.4.3',
'gst-plugins-good-1.0' : '1.4.3',
'gst-plugins-good-1.0-static' : '1.4.3',
'gst-plugins-bad-1.0' : '1.4.3',
'gst-plugins-bad-1.0-static' : '1.4.3',
'gst-plugins-ugly-1.0' : '1.4.3',
'gst-plugins-ugly-1.0-static' : '1.4.3',
'gst-libav-1.0' : '1.4.3',
'gst-libav-1.0-static' : '1.4.3',
'gnonlin-1.0' : '1.2.1',
'gnonlin-1.0-static' : '1.2.1',
'gst-editing-services-1.0' : '1.2.1',
'gst-rtsp-server-1.0' : '1.4.3',
}


6. Run the bootstrap
$ ./cerbero-uninstalled bootstrap
$ echo "allow_parallel_build = True" > ~/.cerbero/cerbero.cbc


7. Run the build for OS X. Patience, it needs to build ~80 modules.
$ ./cerbero-uninstalled -c config/osx-universal.cbc package gstreamer-1.0

8. Run the build for iOS. Some extra steps are necessary for this build.
$ ./cerbero-uninstalled -c config/cross-ios-universal.cbc buildone gettext libiconv
$ ./cerbero-uninstalled -c config/cross-ios-universal.cbc package gstreamer-1.0
$ ./cerbero-uninstalled -c config/cross-ios-universal.cbc buildone gstreamer-ios-templates

4 Comentarios


Now Samsung @ London





I just moved back to Europe, this time to foggy London town, to join the Open Source Group at Samsung. Where I will be contributing upstream to GStreamer and WebKit/Blink during the day and ironically mocking the local hipsters at night.

After 4 years with Collabora it is sad to leave behind the talented and enjoyable people I've grown fond of there, but it's time to move on to the next chapter in my life. The Open Source Group is a perfect fit: contribute upstream, participate in innovative projects and be active in the Open Source community. I am very excited for this new job opportunity and to explore new levels of involvement in Open Source.

I am going to miss Montreal. It's very particular joie de vivre. Will miss the poutine, not the winter.

For all of those in London, I will be joining the next GNOME Beers event or let me know if you want to meet up for a coffee/pint.

3 Comentarios


GStreamer and emacs



Debug logs are an extremely helpful tool in the GStreamer developer's toolbox.
Most will say you can't live without them.

Something I've always missed when reading them is a convenient way to jump back and forth between the logs and the source code. So I went ahead and wrote an emacs mini mode that does exactly this:

emacs-gstreamer
an emacs mini module to navigate GStreamer debug logs.


When hitting Enter or M-. in a log file it will open the source code to the line that generated that debug message. If you have multiple emacs windows open, it will open the GStreamer source code file in the second to last active so you can continue reading the log in the active window. If you only have one window open it will open the source code file in the current one. After that you can use your favorite window and buffer handling to surf the files. Read, learn, write, and develop.

Click here to watch a screencast


To get it running you need to have loaded a tags table with the source code. Read this other article to learn how. I run it as part of my gst-uninstalled script.
Then just run M-x gst-debug in the debug log file's buffer.

Let me know if it helps your development workflow!

0 Comentarios


snappy has arrived to 1.0



snappy is an open source media player that gathers the power and flexibility of GStreamer inside the comfort of a minimalistic Clutter interface.

The snappy development team is proud to announce it's 1.0 release.
Codename: "I'll be back", Terminator

We think the project has achieved the maturity worthy of a 1.0 release. It does one thing and it does it well.



Some of the changes you will notice are:
  • It’s been given some needed visual polish
  • Playback speed adjustable
  • Video and audio synchronization tweeking
  • Time left of stream viewer
  • Better drag and drop
  • Better media history handling
  • More features accessible from Clutter interface
  • Bug fixes


Features already included from previous releases:
  • Subtitle support
  • Desktop launcher
  • Video and audio synchronization tweeking.
  • Multi-screen full-screen
  • Media queues
  • History of played media
  • Seeking/muting/cycling through languages (audio streams)
  • Frame stepping
  • Much more


Download a tarball: xz
Clone the git repo
Packages in distributions will be updated soon


Thanks to all who helped in snappy's creation!


Disclaimer: No moose were harmed during the making of this release. One got homesick and an other disappeared for days in a Breaking Bad marathon, but that's about it.

15 Comentarios


Resilience



"It always seems impossible until its done."
Nelson Mandela



My first Soyuz simulator! Summer 1964, nearly 5 years old."
Chris Hadfield

0 Comentarios


Why Coding Is Fun





"First is the sheer joy of making things. As the child delights in his mud pie, so the adult enjoys building things, especially things of his own design. [...]

Second is the pleasure of making things that are useful to other people. Deep within, we want others to use our work and to find it helpful. [...]

Third is the fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work in subtle cycles, playing out the consequences of principles built in from the beginning. [...]

Fourth is the joy of always learning, which springs from the non-repeating nature of the task. In one way or another the problem is ever new, and its solver learns something; sometimes practical, sometimes theoretical, and sometimes both.

Finally, there is the delight of working in such a tractable medium. The programmer [...] works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework,so readily capable of realizing gran conceptual structures.

Yet the program construct [...] is real in the sense that it moves and works, producing visible outputs separate from the construct itself.
"



From Fred Brooke's "Mythical Man Month"
Image from Hello Ruby

3 Comentarios


OpenStack Swift and Temporary URLs How To



One of the many amazing features of Swift, OpenStack's object storage component, is how it creates URLs to provide temporary public access to objects. Thanks to the middleware component called tempurl. For example, imagine a website wants to provide a link to a media file stored in Swift for HTML5 playback. Instead of needing a Swift account with public access, and all the problems that would bring, Swift can generate a URL with limited access time to the resource. This way the browser can access the object directly instead of needing the website to act as a proxy and objects can selectively be made publicly accessible without compromising the rest or using expensive copies between private to public accounts. If the link is accidentally leaked, the access is time limited until the expiration time set.

So how do you use this temporary urls? Glad you asked.

Let's assume you have the following Swift installation:
http://192.168.1.42:8080

Account: AUTH_data
Container: media
Object: example_obj


The first thing we need to do is add temporary URL secret keys to the Swift account. Since tempurl will look at the Temp-URL-Key and Temp-URL-Key-2 metas when an object is requested through a temporary URL to decide if access is allowed. Only one key is neccessary, but a second one is useful to rotate through keys while keeping existing temporary urls validated. Any arbitrary string can serve as a secret key.

We add the temporary urls secret keys with the command:
$ swift post -m "Temp-URL-Key:secrete_key_a"
$ swift post -m "Temp-URL-Key-2:secrete_key_b"


Once we have the keys we can allow public access to objects. The easiest way is to use the tool swift-temp-url which returns a temporary URL. The arguments it needs are; HTTP method, availability period in seconds, object path and one temp-url-key. For example to GET the object we mentioned above:

$ swift-temp-url GET 60 /v1/AUTH_data/media/example_obj secret_key_a

/v1/AUTH_data/media/example_Obj?temp_url_sig=b9746f2e38313635257877abdb8340c48ebd622c&temp_url_expires=1392925673


Now you can retrieve the file via this temporary URL, you just need to add the hostname to have the full URL.

$ curl http://192.168.1.42:8080/v1/AUTH_data/media/example_Obj?temp_url_sig=b9746f2e38313635257877abdb8340c48ebd622c&temp_url_expires=1392925673


Eventhough you probably already guessed it, let's note the format of the temporary URL. Typical object path, plus temp_url_sig, and temp_url_expires.
In this example:

http://192.168.1.42:8080/v1/AUTH_data/media/example_Obj?
temp_url_sig=b9746f2e38313635257877abdb8340c48ebd622c&
temp_url_expires=1392925673


There you have it. Notice we set it up for a GET method. You could do the same with a PUT method to allow a user to push data to a specified path. Perhaps using this in combination with browser form post translation middleware to allow direct-from-browser uploads to specific locations in Swift. Besides GET and PUSH, you can use HEAD to retrieve the header of the object.

At this stage you must be happy to see how easy and convenient this is, but wondering how you can integrate it with your code. You can replicate swift-temp-url with the following block of Python code:

import hmac
from hashlib import sha1
from time import time

# Get a temporary public url for the object
method = 'GET'
duration_in_seconds = 60*60*3
expires = int(time() + duration_in_seconds)
path = '/v1/AUTH_test/%s/%s' % (self.container, track)
key = self.temp_url_key
hmac_body = '%s\n%s\n%s' % (method, expires, path)
sig = hmac.new(key, hmac_body, sha1).hexdigest()
s = 'https://{host}/{path}?temp_url_sig={sig}&temp_url_expires={expires}'
url = s.format(host=self.url, path=path, sig=sig, expires=expires)



Have in mind that any alteration of the resource path or query arguments results in a 401 Unauthorized error. Similarly, a PUT where GET was the allowed method returns a 401. HEAD is allowed if GET or PUT is allowed. Changing the X-Account-Meta-Temp-URL-Key invalidates any previously generated temporary URLs within 60 seconds (the memcache time for the key).

That's all for now. What else would you like to learn regarding Swift?

0 Comentarios


Happy Birthday Grace Hopper





Link to video for people in planets.



"She developed the first compiler for a computer programming language. She conceptualized the idea of machine-independent programming languages, which led to the development of COBOL, one of the first modern programming languages. She is credited with popularizing the term "debugging" for fixing computer glitches (inspired by an actual moth removed from the computer)." Wikipedia

By the way, for anybody wondering why the COBOL in the Google Doodle for her today:
"SUBTRACT CurrentYear from BirthYear GIVING Age
Display Age"
doesn't return a negative value, it is because age is defined unsigned in the data division. Since ages can't be negative, and COBOL handles this negative return to an unsigned value Gracefully.

0 Comentarios


Basic Data Structures and Algorithms in the Linux Kernel



Thanks to Vijay D'Silva's brilliant answer in cstheory.stackexchange.com I have been reading some of the famous data structures and algorithms used in the Linux Kernel. And so can you.

Links based on linux 2.6:

7 Comentarios


Minimalist illustrations reflective of Modern time




Technology Pride




Inner Child




Icons that screw up our day





more at cinismoilustrado.com

0 Comentarios


GStreamer Conference 2013






I just returned from the GStreamer Conference at Edinburgh and I'm still processing the extremely interesting conversations we had there. Once again the conference was a great success, fascinating and great fun. Big kudos to the awesome organizers.

After a quick welcome by Christian Schaller, Tim-Phillip Muller gave the keynote. His approach was to get the ball rolling and get the conversation going from the beginning, instead of giving the usual summary of what has happened in the last year he looked forward into the future and talked about taking GStreamer to the next level. Not only patting ourselves in the back for a good year of development but also reminded us of what is missing and should be done. Afterwards he asked the audience and there was heavy emphasis in more and better documentation and testing from the participants.

Thanks to Tim the hall conversation where very constructive from the get-go, but after the coffee break I went back to the Kylsith room to be amazed by David Röthlisberger's automated testing of set-top boxes user interfaces. He introduced us to stb tester, which is occam's razor applied to testing. With the power of OpenCV and GStreamer, they have built a Python state machine that navigates the menus of the set-top box by triggering infrared signals, recognizes patterns/behaviour on the screen and checks any use case you might consider.

Right after came David Schleef, who was been working on GStreamer Streaming Server. Solving the common and interesting modern web problem of smooth streaming, via bitrate switching and adaptive streaming. Thanks to his work you can easily stream live video streams to thousands of clients from an HTTP server. I definitely plan to play with this technology in the near future.

My two favorite talks were yet to happen. Tuesday brought us Edward Hervey talking about Time \ and Synchronization. I appreciate that he took the time, no pun intended, to explain the concept of time itself before the actual problem of synchronizing with it. A refreshing summary about how time isn't a thing or a unit, but durations of time are what we use. How clocks work and how sometimes there is no reference on when they started and their pace, which complicate things. Ending with the three times GStreamer has and why. This topic is too long and enjoyable to do it any justice by summarizing it, I will update once Ubicast has the talk videos out. I recommend watching it.

Wednesday had the surprise of the conference. Håvard Graff presented gst-harness. A deterministic testing infrastructure for GStreamer that can properly test elements in a self contained sandbox. They are planning to merge this into gst-tools before the end of the calendar year. Of everything I saw and heard during the conference, this is without a doubt, the thing that could change the GStreamer ecosystem the most. Huge potential for improving and solidifying the stability of the elements.

All in all, the GStreamer Conference is still my favorite conference of the year. The content of the talks is just superb, and tied with GUADEC with how cool the attendants are. Big hug or chest bump to everybody I talked with there, and a big thank you to the organization and sponsors. See you all next year!

0 Comentarios


The Git Hobgoblin



All the credit to Steve Losh



A novice was learning at the feet of Master Git. At the end of the lesson he looked through his notes and said, “Master, I have a few questions. May I ask them?”

Master Git nodded.

“How can I view a list of all tags?”

git tag“, replied Master Git.

“How can I view a list of all remotes?”

git remote -v“, replied Master Git.

“How can I view a list of all branches?”

git branch -a“, replied Master Git.

“And how can I view the current branch?”

git rev-parse --abbrev-ref HEAD“, replied Master Git.

“How can I delete a remote?”

git remote rm“, replied Master Git.

“And how can I delete a branch?”

git branch -d“, replied Master Git.

The novice thought for a few moments, then asked: “Surely some of these could be made more consistent, so as to be easier to remember in the heat of coding?”

Master Git snapped his fingers. A hobgoblin entered the room and ate the novice alive. In the afterlife, the novice was enlightened.


2 Comentarios


snappy 0.3 is out!



snappy is an open source media player that gathers the power and flexibility of GStreamer inside the comfort of a minimalistic Clutter interface.

The snappy development team is proud to announce it's second release: 0.3
codename: "Rosebud", Citizen Kane



Some of the changes you will notice are:
  • UI redesign with nicer icons and layout.
  • Has a cool logo
  • It is a GNOME Project
  • Sample video player of the GStreamer SDK
  • Drag and drop media files into snappy
  • Support for subtitle streams
  • Ported to GStreamer 1.0
  • Launcher from the desktop
  • Works in Windows, OS X and Android
  • Multi-screen Desktop full-screening
  • Support for media queues
  • Code style fixes for readibility
  • Option to run without a User Interface
  • More bug fixes than we are proud of :P


Give it a spin and let us know how it can be even better for you.

download a tarball: bz2, gz or xz
clone the git repo
packages in distributions will be updated soon



Thanks to all who helped in snappy's 0.3 creation!


Disclaimer: No narwhals were harmed during the making of this release. One got homesick and an other disappeared for days in a The Wire marathon, but that's about it.

2 Comentarios


Do you use Vim? donate to Uganda



Independently of where you stand in the Vim versus Emacs infamous battle, it is hard to deny that Vim is an amazing text editor, but did you knew about Vim's peculiar license? Vim is charityware, with a GPL-compatible license. It's distributed freely, but they ask that if you find it useful you make a donation to help children in Uganda through the ICCF.



Bram Moolenaar, author and maintainer of Vim, helped establish a foundation called ICCF Holland that works to support a children's center in Uganda. He encourages users to consider making a donation to this foundation, which he serves as treasurer of and visits the site in Uganda nearly every year to monitor the center's progress.

You can become a registered user by sponsoring 10 euros or more, and you can vote for new features. Amazing.

Inside Vim try :help sponsor, and :help uganda, for more information.

2 Comentarios


Vector killed the pixel star





Might the pixel be on it's way out and dead in 5 years? This project developing a vector based video codec predicts so. The project team consists of researches of the University, Root6 Technology, Smoke & Mirrors and Ovation Data Services.

The pixel isn't perfect. A grid simplification of the original image, at any scale bigger than it was intended the image looks blocky. To that add the aliasing problems regarding edges and lines that don't match the grid nicely, and even at the original size things can look chunky.

The transition from pixel based bitmaps to vector based images has been happening for a long time in the static image world. This team of researchers is saying this is also a better way to record moving images and that it will replace the pixel in five years.

The team developed something called a vector-based video codec that attempts to overcome the challenges of a typical vector display. A typical vector display features drawn lines and contoured colors on a screen (rather than the simple, geometrical map of pixels we're all accustomed to). But it has problems--notably, areas between colors can't be filled in well enough for a high-quality image to be displayed, the researchers say.

Professor Phil Willis, from the University's Department of Computer Science, said: "This is a significant breakthrough which will revolutionize the way visual media is produced."

Read more here.

1 Comentarios


hipstercrite



Lyra Howell, a talented artistic friend, coined the word 'hipstercrite' during a recent conversation. I couldn't help laughing at the pure genius and wordsmith-juggling skill of her creation and now want it to become part of our urban lingo:

hip·ster·crite
/ˈhipstərkrit/

Noun
1. A person who hates on so-called hipsters while actually being a hipster himself and denies it.


I secretly wait for any conversation where I can drop and share this new gem into the urban vernacular.

Apparently the word already exists in urban dictionary. Proving once again the rule that if it doesn't exist on the internet, it doesn't exist. Damn you internets full of hipstercrites, even the domain (which I wanted to buy) is gone.


3 Comentarios


Primeval C: two very early compilers



Dennis Ritchie, the creator of the C programming language and co-creator of UNIX operating system, had been curating some old DECtapes, and he offered some of the artifacts. Unfortunately existing tapes lack interesting things like earliest Unix OS source, but some indicative fossils have been prepared for exhibition.

"As described in the C History paper, 1972-73 were the truly formative years in the development of the C language: this is when the transition from typeless B to weakly typed C took place, mediated by the (Neanderthal?) NB language, of which no source seems to survive. It was also the period in which Unix was rewritten in C.

In looking over this material, I have mixed emotions; so much of this stuff is immature and not well-done, and there is an element of embarrassment about displaying it. But at the same time it does capture two moments in a period of creativeness and may have some historical interest.

Two tapes are present here; the first is labeled "last1120c", the second "prestruct-c". I know from distant memory what these names mean: the first is a saved copy of the compiler preserved just as we were abandoning the PDP-11/20, which did not have multiply or divide instructions, but instead a separate, optional unit that did these operations (and also shifts) by storing the operands into memory locations. [...]

"prestruct-c" is a copy of the compiler just before I started changing it to use structures itself.

It's a bit hard to get really accurate dates for these compilers, except that they are certainly 1972-73. There are date bits on the tape image, but they suffer from a possible off-by-a-year error because we changed epochs more than once during this era, and also because the files may have been copied or fiddled after they were the source for the compiler in contemporaneous use.

The earlier compiler does not know about structures at all: the string "struct" does not appear anywhere. The second tape has a compiler that does implement structures in a way that begins to approach their current meaning. Their declaration syntax seems to use () instead of {}, but . and -> for specifying members of a structure itself and members of a pointed-to structure are both there.
"

mortdeus, from Hacker News, has mirrored these files into a github repo where you can view these files.

Read more at Dennis Ritchie's original article.

0 Comentarios


Arctic Sea Ice Death Spiral






R. Eric Collins made this fascinating and alarming movie to visually demonstrate the dramatic decrease in Arctic sea ice happening right now.

"When I was born, in 1979, the minimum summer sea ice extent in the Arctic was about 17,000 cubic kilometers. In 2012, it was less than 5,000 cubic kilometers.

The red points show weekly estimates of sea ice volume in the Arctic through time, from 1979 to today. The scale is from 0 to 35,000 cubic kilometers. There is a seasonal expansion of the ice during winter and a shrinking during the summer. There is no evidence for a sea-ice free summer in the past 700,000 years of Earth history. The next one is predicted to take place in the next 5-30 years.

Sea ice volume estimates by PIOMAS show a long-term decline in sea ice volume in the Arctic. The summer sea ice minimum now contains only 20–30% of the ice volume observed in the last 1970′s.

This phenomenon has been termed the “Arctic Sea Ice Death Spiral” and is directly related to anthropogenic greenhouse warming of the atmosphere.

It is possible that the Arctic has reached an irreversible “tipping point” from which it cannot recover the lost ice.
"


Read more and comment at the original source.

1 Comentarios


Habemus Logo



Since the first few days of the project; the idea for the snappy logo was a crocodile, one of those jokes made while having a few too many beers with other developers and just stuck.

Thanks to the awesome artwork of Troy Sobotka which was able to run with the simple idea of "make it a crocodile", snappy now has a very cool logo. snappy eats everything pouncing fast. Lame pun, I know.

The logo:


snappy. snap! snap!

Logo with project name:


Stay tuned for the announcement of the 0.3 release. Meanwhile, use the comments section to joke, mock or make even lammer puns about the crocodile.

Thanks Troy!

6 Comentarios


Obligatory post-Guadec post



Let me start first by congratulating the organizers for the best planned Guadec in modern history. It was spectacular! Though some hipster old-schoolers disgree with me and say that Villanova was the most fun (or Vinylnova), I think they are confused by nostalgia, not being able to handle a little ocean breeze, and just general old age crankiness from not finding shorts that fit. Competitions aside, it is clear that Guadec+beach is the most epic of combos.



...but even the nicest of days with the best of people come to an end. Looking forward to seeing you all again.



That said... where in the world is Duckie?

Jeff and Seif don't know if somebody took him in the airport or if he is lost his way. Not as naive as them, I know the truth, I saw it in Duckie's eyes. Jeff finally found somebody that would help clean PiTiVi's bugs and he wasn't ready to let it go, but Duckie couldn't take PiTiVi's issues anymore. They could bring even the mightiest of men down, and Duckie kept looking at the destination boards with hopes of freedom, waiting for his chance. Luck was on his side that morning, since the guys attention slipped for a moment due to Guadec sleep deprivation and some Norwegian conspiracy, and he went for it.

Run free Duckie! Run free!



Perhaps this is just wishful thinking. We love you duckie.

0 Comentarios


©2007-2013 luis de bethencourt guimera
powered by Blogalia