Branch: refs/heads/master
  Home:   https://github.com/mltframework/mlt
  Commit: 0112a3c3b709d951c54c0d653c7dce5867436271
      
https://github.com/mltframework/mlt/commit/0112a3c3b709d951c54c0d653c7dce5867436271
  Author: Brian Matherly <c...@brianmatherly.com>
  Date:   2015-02-02 (Mon, 02 Feb 2015)

  Changed paths:
    A src/tests/test_frame/test_frame.cpp
    A src/tests/test_frame/test_frame.pro
    M src/tests/tests.pro

  Log Message:
  -----------
  Add test for Mlt::Frame.

The copy constructor test fails due to a bug in the Frame copy constructor.
The next commit will fix the bug.


  Commit: 3828a3c707279e834ab0ffb48cf78d252926179c
      
https://github.com/mltframework/mlt/commit/3828a3c707279e834ab0ffb48cf78d252926179c
  Author: Brian Matherly <c...@brianmatherly.com>
  Date:   2015-02-02 (Mon, 02 Feb 2015)

  Changed paths:
    M src/mlt++/MltFrame.cpp

  Log Message:
  -----------
  Fix reference counter incremented twice in Frame copy constructor.

If the copy constructor was used, mlt_frame_close would never be called because
the reference counter would be 1. Instead, the Mlt::Propertiec destructor would
close the frame properties and the rest of the frame would never be freed.


  Commit: 2be77ba6ed727542bdb461586275ee99044c08b8
      
https://github.com/mltframework/mlt/commit/2be77ba6ed727542bdb461586275ee99044c08b8
  Author: Brian Matherly <c...@brianmatherly.com>
  Date:   2015-02-02 (Mon, 02 Feb 2015)

  Changed paths:
    M src/mlt++/MltFrame.cpp

  Log Message:
  -----------
  Make the Mlt::Properties initialization match the copy constructor.

This method is more explicit and makes it easier to understand what is going
on.


  Commit: 6ad719b268d359f335a4a572e2b043fdaef475bb
      
https://github.com/mltframework/mlt/commit/6ad719b268d359f335a4a572e2b043fdaef475bb
  Author: Brian Matherly <c...@brianmatherly.com>
  Date:   2015-02-02 (Mon, 02 Feb 2015)

  Changed paths:
    M src/mlt++/MltFrame.cpp
    M src/mlt++/MltFrame.h
    M src/mlt++/mlt++.vers
    M src/tests/test_frame/test_frame.cpp

  Log Message:
  -----------
  Add default constructor, const copy constructor and copy operator=.

The default constructor is useful to define frame objects that will be assigned
at a later time. In Mlt++, some objects have a default constructor that
initializes the underlying MLT type while others create an invalid object. The
Frame copy constructor creates an invalid object so that empty frames can be
predeclared without the expense of initializing an empty frame only to destroy
it all when it is actually assigned to a frame.

The const copy constructor duplicates the non-const constructor, but is useful
so that frames can be initialized from tempory variables.

The copy operator= is necessary so that frames can be stored in containers.

Additionally, with this change, Mlt::Frame implements "the big three" which
is a good practice.


Compare: https://github.com/mltframework/mlt/compare/b54cf8dc1660...6ad719b268d3
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to