~ubuntu-branches/ubuntu/oneiric/avidemux/oneiric-proposed

« back to all changes in this revision

Viewing changes to avidemux/ADM_encoder/ADM_pluginLoad.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-08-20 08:42:44 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20090820084244-bhh15xxd7x2vbcuh
Tags: 1:2.5.1+repack-0ubuntu1
* New upstream bugfix release (LP: #416066):
  - Re-enabled several video and audio encoders (regression introduced
    in 2.5.0)
  - Updated the FFmpeg libraries
  - More video encoders are now plugins
  - DV video encoder now supports more profiles
  - Fixed loading and saving issues with LAME, x264 and Xvid options
    (regression introduced in 2.5.0)
  - Fraps video decoding support
  - Lowpass-5 mode added to libavcodec deinterlacer filter plugin
  - Fixed formatting of parameters for various filters on 64-bit platforms
  - Updated libass
  - Fixed sizing of the bitrate control on various video encoder configure
    windows (regression introduced in 2.5.0)
  - Improved filter dialog for GTK+ interface
  - New navigation icons for GTK+ interface
  - Fixed the behaviour of several GTK+ open/save dialogs (regression
    introduced in 2.5.0)
  - asharp filter's Block Adaptive mode can now be disabled using the Qt
    interface
  - Re-enabled the colour chooser dialog using the Qt interface (regression
    introduced in 2.5.0)
  - GCC 4.4 support
  - Fixed issues with CMake build scripts when using multiple make jobs
    (regression introduced in 2.5.0)
* Remove debian/patches dir and drop all patches, now applied by upstream.
* Drop quilt support.
* debian/libavidemux0.install: Also install missing libraries.
* Move debian/install to debian/avidemux.install.
* debian/rules:
  - Build the internal ffmpeg version properly (thanks to Christian Marillat).
  - A bit of cleanup.
* debian/control:
  - Bump Standards-Version.
  - Update Homepage field.
  - Adjust libavidemux0 short description.
  - gtk -> GTK, qt -> QT.
  - Set myself as Maintainer.
* Repack the tarball to remove the debian/ dir provided by upstream:
  - Create debian/README.source.
  - Update debian/watch.
  - Add get-orig-source target to debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
*/
82
82
bool     ADM_ve_getEncoderInfo(int filter, const char **name, uint32_t *major,uint32_t *minor,uint32_t *patch)
83
83
{
84
 
    ADM_assert(filter>=0 && filter<ADM_videoEncoderPlugins.size());
85
 
    ADM_vidEnc_plugin *plugin =ADM_videoEncoderPlugins[filter];
86
 
        *name=plugin->getEncoderDescription(0);
87
 
    int ma,mi,pa;
88
 
        plugin->getEncoderVersion(0,&ma,&mi,&pa);
89
 
        *major=(uint32_t)ma;
90
 
        *minor=(uint32_t)mi;
91
 
        *patch=(uint32_t)pa;
92
 
        return true;
93
 
 
 
84
        ADM_assert(filter >= 0 && filter < ADM_videoEncoderPlugins.size());
 
85
 
 
86
        ADM_vidEnc_plugin *plugin = ADM_videoEncoderPlugins[filter];
 
87
        int ma, mi, pa;
 
88
 
 
89
        plugin->getEncoderVersion(0, &ma, &mi, &pa);
 
90
 
 
91
        *name = plugin->getEncoderDescription(plugin->encoderId);
 
92
        *major = (uint32_t)ma;
 
93
        *minor = (uint32_t)mi;
 
94
        *patch = (uint32_t)pa;
 
95
 
 
96
        return true;
94
97
}
95
98
 
96
99
static int loadVideoEncoderPlugin(int uiType, const char *file)
107
110
 
108
111
                for (int encoderIndex = 0; encoderIndex < encoderCount; encoderIndex++)
109
112
                {
 
113
                        if (!plugin)
 
114
                                plugin = new ADM_vidEnc_plugin(file);
 
115
 
110
116
                        int encoderId = encoderIds[encoderIndex];
111
117
                        int apiVersion = plugin->getEncoderApiVersion(encoderId);
112
118
 
123
129
 
124
130
                                ADM_videoEncoderPlugins.push_back(plugin);
125
131
 
 
132
                                plugin = NULL;
126
133
                                success = true;
127
134
                        }
128
135
                        else
 
136
                        {
129
137
                                printf("[ADM_vidEnc_plugin] File %s has an outdated API version (%d vs %d)\n", ADM_GetFileName(file), apiVersion, ADM_VIDENC_API_VERSION);
 
138
                                delete plugin;
 
139
                        }
130
140
                }               
131
141
        }
132
142
        else
 
143
        {
133
144
                printf("[ADM_vidEnc_plugin] Unable to load %s\n", ADM_GetFileName(file));
 
145
                delete plugin;
 
146
        }
134
147
 
135
148
        return success;
136
149
}
173
186
                printf("[ADM_vidEnc_plugin] Cannot parse plugin\n");
174
187
 
175
188
        for (int i = 0; i < nbFile; i++)
 
189
        {
176
190
                loadVideoEncoderPlugin(uiType, files[i]);
 
191
                ADM_dealloc(files[i]);
 
192
        }
177
193
 
178
194
        printf("[ADM_vidEnc_plugin] Scanning done, found %d codec\n", ADM_videoEncoderPlugins.size());
179
195