Posted
over 8 years
ago
45th VideoLAN report
After a couple of very busy weeks, we're back on a normal schedule. Therefore, here is the weekly report about the VLC and VideoLAN communities!
Features
VLC
We started the week by adding the support for MPEG-2 and VC-1
... [More]
hardware decoders on Android in the mediacodec module.
We also fixed some MPEG-4 regressions on this module.
Hugo fixed a few issues on the UPnP module, and mostly added the support for Windows Media Sharing servers, in this module.
We also added support for subtitles over UPnP, using the work done in the core the previous week.
The Matroska demuxer got a few fixes for some regressions, but mostly implemented the fast-seek option, that is imprecise, but faster than the normal seek. This is useful when computing thumbnails, for example.
Some changes on the libVLC parsing events were done, to simplify the handling in client applications. If you were using the not-stable-yet libVLC 3.0, beware!
Near the end of the week, the core got some important changes on threads manipulation, with the introduction of vlc_thread_self() and vlc_thread_id(). The usage of futeces was introduced in the core: see Rémi's post about it.
The MMDevice audio output on Windows now supports device change events.
The Windows 64bits build will now have high-entropy ASLR activated, which should reduce the possibility of exploitation of security issues.
On Windows, we also fixed the raising issue of the Qt tooltip that we had with Qt5, the 2.2.3 DirectDraw regression and a small D3D improvement when handling large pictures.
Finally, a few H264 annex-B parsing issues were fixed and the video headers were modified to support, in the future, VR videos (nothing working yet).
Android
On the Android side, we're going on fixing issues for the 2.0.0 release.
This week, we:
improved the subtitles downloader, to activate it from within the player, and for any video,
improved the interface for scanning, the browsing and the video player animations,
improved the audio player on Android TV,
improved the speed of MKV thumbnails,
fixed a few remaining small issues.
All this was pushed in the update 1.9.12 on the play store. Hopefully, the 2.0.0 release will come this week.
WinRT / UWP
As last week, the WinRT port has been very busy again, with almost 100 commits.
As for Android, we're focusing on preparing the release, and fixing the biggest bugs people have reported.
On the libVLC backend, we fixed a few performance issues, we added more codecs support, and we improved the UPnP and SMB browsing.
On the interface side, we improved the thumbnailing and parsing process, we fixed numerous bugs that happened when resizing (and Windows 10 Mobile look) and we fixed a few crashes.
We also improved the settings and activated the access to the equalizer.
Hopefully, we'll be able to open the beta to the public soon.
That's all for this week! See you next! [Less]
|
Posted
over 8 years
ago
44th VideoLAN weekly report
Once again, unfortunately, the report skipped a week
But this report, the 44th report, is quite important for 2 reasons:
it's been over one year I've started those reports, since the first one was published on May
... [More]
10th, last year;
and this post is the 300th blogpost on this very blog!
This also mean I skipped 8 weekly reports, and did dual-reports for those weeks, which is not too bad, compared to what I hoped to achieve...
So, without waiting any further, here is the report about what happened in the last 2 weeks in the VideoLAN and VLC development community! It was a couple of busy weeks!
Features and changes
VLC
The week started by some work on the supported MIME-types for the .desktop file for VLC on Linux, by a Debian developer, which cleaned and merged all our different mimetypes support correctly.
Then, a very large patchset for seeking in the MKV (matroska) files was merged. It rewrites most of the seeking support and builds an index when playing the file. This new code fixes quite a few bugs we had on the matroska support.
We added support for subtitles over the network, with a set of functions named libvlc_media_slaves_add, libvlc_media_slaves_get (and related).
At the same time, we now auto-detect subtitles in networking shares; this is currently tested on SMB and UPnP.
We've had improvements on the Qt main window resizing, and on the playlist model.
The work on DVB scan was continued, notably to support device limits.
Another batch for ChromeCast was merged, mostly focusing on seeking and stopping the stream. We're still missing a few bits, though
And finally, we improved again our adaptive streaming support, our Blurays menus support, added support for vorbis and flac inside MP4, improved WMV metadata and prepared support for streaming output on Android.
VLC core for WinRT
The VLC engine has seen many changes for WinRT, in the last few weeks, mostly to merge the existing patches we had pending.
The 3rd party libraries (contribs) were updated and patched to correctly compile for the WinRT/UWP version.
At the same time, we merged numerous patches for the core, the modules and the buildsystem.
We improved quite a bit the Direct3D11 output, both for desktop and the WinRT version. We notably fixed the green line issue and added support for more hardware decoders on Windows Phone/RT.
We also accelerated the chroma conversions when using hardware decoding.
Finally, the WinRT audio module now supports volume changes. This was forbidden in Windows 8 apps, but is allowed in Windows 10.
Android
As we're approaching the 2.0.0 release, the Android port was quite calm.
We pushed 2 beta releases on the store: 1.9.10 and 1.9.11 to fix minor issues, mostly to fix subtitles regression and improve the thumbnails look.
We then added support for the network subtitles and subtitles downloading for network media.
This will be in the next release, that should come soon.
iOS
We released VLC 2.7.7 for iOS and 1.0.6 for AppleTV, to fix minor issues, update the software decoders, and activate AC3 and E-AC3 decoding on 64bit device and the Apple TV.
Since then, there were fixes for onedrive support, for subtitles over FTP and for SPDIF pass-through support.
WinRT / UWP
The WinRT port was extremely busy, these past two weeks.
Indeed, we are preparing a beta version named 1.9.0, that would prepare for the first true UWP version, that will be named 2.0.0.
We've added most of the features that you usually see on the Android and iOS versions of VLC, notably UPnP and network shares browsing, support for HTTPS and adaptive streaming, better hardware decoding, dialogs support, as many codecs as the desktop version, and so on.
Moreover, the engine use the runtime 12.0_app instead of the 11.0 one we used on the WinRT version.
On the UI side, we now support correctly Windows 10 integration, with Cortana, drag and drop, tablet mode and a lot of fixes so that the application looks responsive enough on all the devices, from mobile to the Xbox 1. We polished this UI and fixed a few important regressions, notably on the playback and the thumbnailer.
The application is currently in private beta mode, so that the biggest issues are fixed before opening it up.
libbluray
We released a new version of libbluray, numbered 0.9.3
This release:
adds a bd_open_files() function, deprecating old global file system hooks;
adds flags for on-disc menu support to DISC_INFO,
improves Java building and Linux integration
enable UDF/ISO support by default,
improves BDJ_EVENT_CHAPTER, main title detection,
improve BD-J compability, and fixes numerous bugs on BD-J,
improves libaacs and libmmbd detection.
fixes a large number of bugs too long to describe here
That's all for those weeks! See you soon! [Less]
|
Posted
over 8 years
ago
I've always been a big fan of static analysis. While I was working with C and
C++, I was scanning my code with:
coverity prevent
Coccinelle
Clang
CppCheck
and many more.
For a longer list of static analyzers for each language, look at
wikipedia
As
... [More]
I'm now mostly programming in Python (I'm working on
LAVA), I had a closer look at the available
static analyzers for this language.
I haven't found any static analyzer for Python as powerful as the one available
for C or /C++. However the ones listed in this article must be used on your
Python code. That's the bare minimum.
PEP
The first tool to run on any Python source code would be pep8. You can also
give a try to pep256.
pep8 is a simple tool that only check for coding style. Python does advice
the use of a standardize code style:
PEP8. It's recommended to use the
same coding style in order to keep a common style among the Python community.
However, you can obviously configure pep8 to match your coding style.
def main():
print("Hello" + " World")
if __name__ == "__main__":
main()
If you run pep8 on this file you will get:
pep8 code.py
code.py:2:3: E111 indentation is not a multiple of four
Pylint
Pylint is more of a static analyzer than pep8 as it actually check for
some Python common errors.
For instance, on this example:
def append(data=[]):
data.append(1)
return data
print(append())
[1]
print(append())
[1, 1]
print(append())
[1, 1, 1]
This is usually not what your are expecting. Pylint will warn you:
pylint code.py
No config file found, using default configuration
************* Module code
C: 1, 0: Missing module docstring (missing-docstring)
W: 1, 0: Dangerous default value [] as argument (dangerous-default-value)
C: 1, 0: Missing function docstring (missing-docstring)
[...]
Global evaluation
-----------------
Your code has been rated at 0.00/10
As you can see, Pylint is rating the source code (and show the evolution of
this rate).
Vulture
Vulture is specialized in dead code elimination. Due to the dynamic nature
of Python, such task is not as easy as it is with C. So don't expect any tool
to find all dead code.
def append(data=[]):
data.append(1)
return data
def unused():
for i in range(0, 10):
append()
def main():
append()
if __name__ == '__main__':
main()
Running vulture will give:
vulture code.py
code.py:5: Unused function 'unused'
code.py:6: Unused variable 'i'
Pychecker
Another useful tool: Pychecker does provide some interesting information.
However, it only works with Python2.
code.py:2: Modifying parameter (data) with a default value may have unexpected consequences
code.py:6: Local variable (i) not used
Prospector
I discovered prospector some weeks ago and that's now the only one I'm
using. In fact, it uses all the other static analyzers (dodgy, pep257,
pep8, pyflakes, pylint, vulture, pyroma, frosted) and provides a
nice report.
Messages
========
code.py
Line: 1
pylint: dangerous-default-value / Dangerous default value [] as argument
Line: 6
pylint: unused-variable / Unused variable 'i' (col 8)
Check Information
=================
Started: 2016-05-13 17:29:31.466860
Finished: 2016-05-13 17:29:31.553182
Time Taken: 0.09 seconds
Formatter: grouped
Profiles: default, no_doc_warnings, no_test_warnings, strictness_medium, strictness_high, strictness_veryhigh, no_member_warnings
Strictness: None
Libraries Used:
Tools Run: dodgy, mccabe, pep8, profile-validator, pyflakes, pylint
Messages Found: 2
My advice would be to run prospector regularly to track common mistakes. It
does sometime found real bugs. [Less]
|
Posted
over 8 years
ago
43rd VideoLAN weekly reports
After my 42nd report last week, and some nice encouragements, here is another weekly report about VideoLAN and VLC development.
I was far from a computer last week, so here are 2 weeks in one.
Features
VLC
... [More]
Renderers
The previous week, we started to introduce the concept of renderers in VLC.
Those are distant devices displaying audio and/or video, instead of playing it locally. The usual device people know are ChromeCasts, UPnP/DLNA renderers, AirPlay, WiDi or DIAL devices.
A new type of VLC module was introduced: renderer discovery. Like Service Discovery, they can find those renderers devices on the network, using one of the discovery protocols.
The renderer discovery capability was implemented in our mDNS module.
The Chromecast code was heavily reworked at the same time, and after 4/5 redesigns, we're almost happy with the code
The interface is still missing, but it should come soon!
Other features
The S/PDIF passthrough was implemented in the WASAPI module for Windows. This is important, as this module will be the default, starting in 3.0, for most Windows users.
The work on DVB scanning is still going on. We had numerous patches this week on this topic.
Our mDNS module now supports IPv6 and our MKV demuxer started to get a heavy lifting.
We also had fixes for the TS demuxer and muxer, the libVLC headers, the VideoToolbox decoder, Hurd compilation and improvements on the Direct3D11 video output!
Android
The Android port got 2 more beta releases for 2.0.0: 1.9.9 and 1.9.10.
We added numerous fixes, notably in the popup video view, the binder, keyboard and pad management, title display and the video view.
And of course, improvements for the subtitles download feature.
Hopefully, we will push the release soon.
WinRT
If you follow Thomas on Twitter, you will know that the WinRT port has been quite busy lately.
Cortana is now integrated in the application, so you can ask VLC to launch an album or the last video viewed.
Drag and Drop should now work almost everywhere, and you can drop just a subtitle on a playing video, if you want.
The Stream and the File dialogs have been relifted; the Settings dialog in the same way.
The mini-player and the command bar controller have been merged, together, if you have a Windows Preview build.
On the backend, some work was done on the thumbnailer, and the music and video libraries have been merged into one single library.
Some video information is now pulled from TheMovieDB.
Finally, some work was done to adapt the interface to Windows 10 Mobile.
Soon a release?
iOS/tvOS
On AppleTV, search was implemented for local servers browsing.
And we also got support for repeat on the AppleTV application.
We should get updates on those 2 applications soon, on the App Store.
That's all for those 2 weeks, see you soon! [Less]
|
Posted
almost 9 years
ago
When running pylint on your Python source code, you
might encounter this message:
Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)
This message will be raised for this kind of code:
d = dict()
if type(d) == dict:
... [More]
print("d is a dict")
The code is valid but pylint does prefer the use of isinstance(). Why is
it preferable to use one instead of the other?
Duck Typing
The short answer is: this code is unidiomatic. In fact, it does not make use of
Duck typing.
In duck typing, an object's suitability is determined by the presence of
certain methods and properties (with appropriate meaning), rather than the
actual type of the object
In Python, it's preferable to use Duck Typing rather than inspecting the type
of an object.
class User(object):
def __init__(self, firstname):
self.firstname = firstname
@property
def name(self):
return self.firstname
class Animal(object):
pass
class Fox(Animal):
name = "Fox"
class Bear(Animal):
name = "Bear"
# Use the .name attribute (or property) regardless of the type
for a in [User("John"), Fox(), Bear()]:
print(a.name)
Inheritance
The second reason not to use type() is the lack of support for
inheritance.
class MyDict(dict):
"""A normal dict, that is always created with an "initial" key"""
def __init__(self):
self["initial"] = "some data"
d = MyDict()
type(d) == dict # False
type(d) == MyDict # True
d = dict()
type(d) == dict # True
type(d) == MyDict # False
The MyDict class has all the properties of a dict, without any new methods.
It will behave exactly like a dictionary. But type() will not return the
expected result.
Using isinstance() is preferable in this case because it will give the expected
result:
d = Mydict()
isinstance(d, MyDict) # True
isinstance(d, dict) # True
d = dict()
isinstance(d, MyDict) # False
isinstance(d, dict) # True
As a conclusion, try to avoid (as much as possible) the use of type or
isinstance and prefer Duck Typing.
More information on StackOverflow [Less]
|
Posted
almost 9 years
ago
42nd week of VideoLAN reports
After a very busy week last week, here is another weekly report about VideoLAN and VLC development.
42
I'm surprised we're already at 42 and I haven't stopped doing it!
Sometimes, I'm not sure it's really useful
... [More]
, since I don't see many comments...
But lately, some people who don't comment on this blog told me, in real life, that I should continue, so here is a new report.
Features
VLC
Once again, we started the week with fixes for the WinRT/UWP build.
We got numerous small fixes for the Qt interface, notably for resizing issues of the main interface and in the preferences.
Marvin improved the Mac OS interface status-bar icon look and behavior.
François continued his work on the DVB scanning, notably splitting in a better way the DVB access from the TS demuxer module, which is a cleaner design.
VLC has also now gained the ability to auto-rotate the JPEG photos using the EXIF data.
Finally, a vlc_close function was introduced to be able to use posix_close instead of close when available.
Android
This week, we published version 1.9.8 of VLC for Android, adding notably subtitles download for local files, and media information on the Android TV version.
In this version, we pushed numerous fixes too, notably for repeat, metadata, resuming files and popup video support.
Then, the bindings for the keyboard and remote was changed too: left/right arrows seek, down arrow shows the controller, up arrow show the advanced options and center play/pause.
We also fixed numerous issues with RTL languages and layouts; and improved the code with more databinding.
iOS
On Tuesday, we pushed VLC 2.7.5 for iOS and VLC 1.0.4 for tvOS. Those release are mostly targeting improvements in SMB shares browsing.
Since then, we've readied VLC 2.7.6/1.0.5, focusing on improving the shares browsing, Dropbox, TouchID and the video filters.
WinRT
On WinRT, the week was quite busy.
We improved the speed and reliability of the libVLC core, notably so that we can use more features of the UWP platform and so we can have a stable 64bit build.
We also improved the interface, based on people's feedback on our screenshots, notably for the settings and the global navigation.
The video player was also re-themed and you can have PiP when browsing the application, if a video is still playing.
That's quite a bit for this week! Thanks a lot and see you next! [Less]
|
Posted
almost 9 years
ago
Porting code from Python 2 to Python 3 is made easier by using
2to3. This application will find
patterns that should be changed to keep the same behavior in Python 2 and 3.
However, 2to3 is sometime too conservative, trying to keep the exact same
... [More]
semantic.
For instance, dictionaries functions .items(), .keys() and
.values() now (as in Python 3) return a view and not a list.
d = {'foo' : 'bar', 'bla': 'blo'}
keys = d.keys()
type(keys)
<type list>
While in Python 3
d = {'foo' : 'bar', 'bla': 'blo'}
keys = d.keys()
type(keys)
<class dict_keys>
If you run 2to3 on this snippet, you will get:
d = {'foo' : 'bar', 'bla': 'blo'}
keys = list(d.keys())
type(keys)
<type list>
This change guarantee that the semantic is exactly the same. However this
change is often unneeded. In fact, the dict_keys class implement
__iter__, __contains__ and __len__.
We can use the dict_keys in a for loop:
d = {1: 'one', 2: 'two', 3: 'three'}
for k in d.keys():
print(k)
1
2
3
We can also check that a given key exists in the dictionary:
d = {1: 'one', 2: 'two', 3: 'three'}
if 2 in d.keys():
print("Found")
found
While maintaining the same semantic, transforming the class into a list can
waste many CPU cycles. [Less]
|
Posted
almost 9 years
ago
41st week of VideoLAN reports
Another week, another weekly report about VideoLAN and VLC development.
Features
VLC
We started the week with fixes to build libVLC for WinRT.
Then, after the work from last week, the DVB scanning was improved
... [More]
again, notably to manage timeouts; and the DTV module was fixed accordingly.
The input core was also simplified, removing muteces, reducing the number of functions to create an input, and fixing some preparsing issues (and adding the related tests). One now should just use input_item_AddOptions and the aliases named input_item_New* instead of the input_item_NewWithType or input_item_NewWithTypeExt functions.
libVLC users can now use libvlc_media_get_parsed_status and the new libvlc_MediaParsedStatus event to monitor the item preparsing.
We've had playback fixes for MPEG-SL AAC streams inside TS (#16809), we now support playback of forced subtitles in MP4 (#16803) and support RTP Reception Hint Tracks inside MP4.
We've extended our AVI muxer to support the A-law and μ-law codecs.
Finally, we improved the bluray, SMB, keystore and Qt modules.
Colorimetry
During the week-end, a small team went to Helsinki to work on the colorimetry support for VLC.
As we're moving to UltraHD (4K), the videos are shifting to new, wider, colorspaces. In the past, we just ignored the small differences and took the sane defaults.
It's not possible to do that anymore with the Rec.2020 and the new HDR colorspaces.
Therefore, during the week-end, we laid out the base to support those colorspaces inside the core.
Android
On Android, we started by fixing the navigation with the keyboards and keypads, for the classic android version.
We also added a next and a previous button in the video player, when playing a video playlist.
Then, we added support for subtitles download, from internet subtitle databases.
Finally, we fixed a few bugs, notably on focus and and metadata.
All those changes will be pushed on the store in the version 1.9.8.
iOS
This week, we pushed VLC 2.7.4 for iOS and VLC 1.0.3 for tvOS.
The tvOS release adds notably S/PDIF pass-through and support for finding subtitles over network shares.
The iOS release adds:
3D Touch Quick actions
"play all" features for OneDrive and network shares
finding subtitles over network shares,
stability improvements for SMB shares,
numerous fixes notably for video filters, downloads and interface issues.
WinRT
The WinRT code was quite active last week.
A lot of work is not visible, but is done on the libVLC backend, so that the VLC/WinRT code is closer to the Win32 code. We expect that to give us quite a boost in performances.
Another large part of the work on the interface is also not very visible, but is done to improving the medialibrary code, and clean the split between interface and the backend. This should reduce the number of crashes we are seeing.
Finally, last week, we've spent time on the design and look of the application. Here is a screenshot of the current code.
x264
Last week, just before the NAB show, we pushed some new code in the x264 codebase.
The most visible changes are:
SSE2 and AVX optimizations for dct, notably for 4:2:2 encoding
SSSE3 and AVX2 optimizations for mbtree fixed point conversions
improvements pf the b-adapt 1 algorithm, giving better quality without changing the speed,
improvements for Windows and Visual Studio compatibility
libbluray
The work on libbluray this week was mostly going on improving the BD-J menus.
This work was visible in the javax.tv namespace, but also in general where many errors were denoted to warnings, and should improve compatibility with more disks.
Finally, there is now a seek event for BD-J.
We'll have a release soon with all these improvements.
That's quite a bit for this week! Thanks a lot and see you next! [Less]
|
Posted
almost 9 years
ago
40th report about VideoLAN reports
It's been a few weeks without reports. I'm sorry, I was traveling a bit across the Ocean, and life caught up with me, a bit too much...
And of course, the VideoLAN community has been busy during that time, so a
... [More]
lot happened, and catching up is even harder. So, this report is probably more summarized than usual, please excuse me for that.
Features
VLC
The weeks started by fixing the Windows green lines regressions for 2.2.3 and 3.0.0 that could happen with the Direct3D9 module but also when deinterlacing the content.
The time bar of our Qt module got fixed (some clicks could be on the wrong time, compared to the tooltip), and it got more precise for seeking.
The Jack audio output can now have fixed names for inputs and outputs. This should be easier to reuse, after a VLC restart.
The libVLC has now a libvlc_navigate_popup call to open pop-up menus with BD-J disks.
Quite a bit of fixes and improvements got into the ChromeCast module, notably to clean the code, and to make it closer to the expected behavior.
No, it's not ready yet for primetime, since it's not exposed in the interface.
The Daala module is now independent from the Ogg demuxing library.
Finally, we got a large rework of the DVB scanning code, mostly for Linux, though.
And, as usual, we merged numerous fixes and this week they were mostly on Android Mediacodec, MP4 seeking, TS regressions, MKV ALBUM metadata support, code cleanup and adding more tests to the codebase.
Android
In the last 3 weeks, we published 3 different beta versions: 1.9.5, 1.9.6 and 1.9.7 were published on the Android Store.
Those beta versions are still focusing on stability and feedback from our users.
However, 1.9.7 added support for a popup-video window, so you can float your video above every other application, like this:
At the same time, we also added support for Samsung and LG split windows.
WinRT and iOS
The other mobile ports, iOS and WinRT got each a few improvements.
On WinRT, the biggest changes were on the handling of translations, using the new translations framework. The rest were minor fixes for stability.
On iOS, numerous fixes got merged for Cloud drives support and we got 2 releases in the pipe, waiting for reviews:
2.7.4 is the next iOS release, 1.0.3, the next tvOS release.
Those builds should arrive soon in your devices.
libbluray
The libbluray project received a few improvements too.
The number of locks were reduced, the AACS integration was enhanced, and a few fixes on chapters were merged.
However, the biggest changes were in the implementation of some javax.tv. classes, that were missing, notably on the javax.tv.util namespace; but other part of this namespace were improved to support more bluray menus.
That's almost all for those weeks, see you next! [Less]
|
Posted
almost 10 years
ago
Past releases
Following my blogpost about the history of the free DVD stack, last August, and the announces of libdvdread and libdvdnav 5.0.0, with libdvdcss 1.3.0, I kept updating the projects.
libdvdnav 5.0.1/5.02
There were not many
... [More]
regressions in DVDnav, so I quickly released libdvdnav 5.0.1 and 5.0.2, to fix remaining crashes.
libdvdread 5.0.1
However, DVDread was in a less good shape, so I released, in January, libdvdread 5.0.1 with numerous fixes and 2 minor features: DragonFly BSD bswap and a new md5 implementation.
Streaming DVD
In January, the major feature I integrated in libdvdcss, libdvdread and libdvdnav is the capability to open ISO and devices through the network, as virtual devices/files, using callbacks.
The allows to use the same architecture to play ISOs from SMB shares, SFTP or HTTP, with decryption and menu navigation.
Streaming releases
This feature was integrated in libdvdcss 1.3.99, libdvdread 5.0.2 and libdvdnav 5.0.3, all released at the end of January.
libdvdread 5.0.3
We had just a small problem remaining with the streaming feature: during the read IFO phase, we had too many seeks and read of the files. That took way too much network resources, so we added a small cache in libdvdread 5.0.3, to work around this issue.
We just released libdvdread 5.0.3 that you can find on our FTP.
libdvdcss 1.3.99
Just a word on libdvdcss 1.3.99: it's a major cleanup release of the codebase, and there could be some regressions still lingering around.
So I'm waiting for regressions, and I will release 1.4.0 when the important issues are fixed! [Less]
|