~ubuntu-branches/ubuntu/quantal/mlt++/quantal

« back to all changes in this revision

Viewing changes to src/MltConsumer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2008-11-14 17:35:13 UTC
  • mfrom: (0.1.3 squeeze) (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081114173513-mjqzrkgssrm0t2f8
Tags: 0.3.2-1
* New upstream release.
* Refresh patches:
  - 01_remove_ldconfig
  - 02_custom_ldflags
* Remove 03_disable_test patch. deprecated.
* Add 04_add_valerie_ldflags patch to add mlt-valerie to LDFLAGS.
* Update debian/control:
  - Add versionned build dependency to libmlt-dev.
  - Add pkg-config build dependency.
  - Bump Standards-Version to 3.8.0. No changes needed.
  - Bump libmlt++ soname. libmlt++1 conflicts/replaces libmlt++0.2.
* Update debian/copyright: add Dan Dennedy copyrights.
* Update debian/rules: remove lintian override installation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <string.h>
23
23
#include "MltConsumer.h"
24
24
#include "MltEvent.h"
 
25
#include "MltProfile.h"
25
26
using namespace Mlt;
26
27
 
27
28
Consumer::Consumer( ) :
28
29
        instance( NULL )
29
30
{
30
 
        instance = mlt_factory_consumer( NULL, NULL );
31
 
}
32
 
 
33
 
Consumer::Consumer( char *id, char *arg ) :
 
31
        instance = mlt_factory_consumer( NULL, NULL, NULL );
 
32
}
 
33
 
 
34
Consumer::Consumer( Profile& profile ) :
 
35
        instance( NULL )
 
36
{
 
37
        instance = mlt_factory_consumer( profile.get_profile(), NULL, NULL );
 
38
}
 
39
 
 
40
Consumer::Consumer( Profile& profile, char *id, char *arg ) :
34
41
        instance( NULL )
35
42
{
36
43
        if ( id == NULL || arg != NULL )
37
44
        {
38
 
                instance = mlt_factory_consumer( id, arg );
 
45
                instance = mlt_factory_consumer( profile.get_profile(), id, arg );
39
46
        }
40
47
        else
41
48
        {
44
51
                        char *temp = strdup( id );
45
52
                        char *arg = strchr( temp, ':' ) + 1;
46
53
                        *( arg - 1 ) = '\0';
47
 
                        instance = mlt_factory_consumer( temp, arg );
 
54
                        instance = mlt_factory_consumer( profile.get_profile(), temp, arg );
48
55
                        free( temp );
49
56
                }
50
57
                else
51
58
                {
52
 
                        instance = mlt_factory_consumer( id, NULL );
 
59
                        instance = mlt_factory_consumer( profile.get_profile(), id, NULL );
53
60
                }
54
61
        }
55
62
}