Yalir / sfeMovie

sfeMovie is a simple C++ library that lets you play movies in SFML based applications. It relies on FFmpeg to read medias and remains consistent with SFML's naming conventions.
http://sfemovie.yalir.org/
GNU Lesser General Public License v2.1
114 stars 37 forks source link

Switch to C++11 #65

Closed Ceylo closed 9 years ago

Ceylo commented 9 years ago

Check:

Features to be tested so far:

Ceylo commented 9 years ago

If you're interested in other features of C++11, let me know

feliwir commented 9 years ago

Other things that we should definetly use:

Ceylo commented 9 years ago

I agree on 2 and 3 but not 1. I want to keep code strongly typed :P

hsdk123 commented 9 years ago

Other features don't necessarily come to mind, but it's great that the project's moving to using C++11 - memory management through shared_ptr sounds just great.

bluekirby0 commented 9 years ago

std::thread std::chrono std::mutex std::atomic and C++11 lambda functions are all incredibly useful. Everything except lambda should be available on most modern compilers. Lambda might require gcc users to update but should be fine everywhere else.

auto is useful when working with iterators and some of the std::chrono types but should be avoided for any values that survive outside of a small scope.

Ceylo commented 9 years ago

Considering that SFML brings thread and mutex support, are std::thread and std::mutex useful? As for C++11 lambda I don't see any usecase in sfeMovie at the moment. Same for std::chrono, SFML support looks sufficient.

bluekirby0 commented 9 years ago

Honestly I haven't tried SFML's threading because it seems a bit redundant now that the STL provides a portable solution (plus std::thread feels a lot like pthreads which I've used for a long time now).

I guess its a matter of preference since both provide portable threading implementations.

If I see specific cases where a lambda expression might be useful I'll let you know. As for std::chrono steady_clock and high_resolution_clock have their uses when you want absolutely predictable timer behavior or the lowest latency clock available on a system.

Ceylo commented 9 years ago

I'm not that much convinced by writing tests for each feature anymore. The purpose was to guarantee that a feature was supported by our target compilers before using it in the code. The point is if we use the feature directly in the sources, it'll go through Jenkins which will build sfeMovie with all the compilers we support. So here the tests don't add any value. I guess direct integration is enough.

Ceylo commented 9 years ago

Merged to master