00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00031
00032 #ifdef HAVE_CONFIG_H
00033 #include "autoconfig.h"
00034 #endif
00035
00036 #ifdef EXTERNAL_TRANSCODING
00037
00038 #include "common.h"
00039 #include "cds_objects.h"
00040 #include "transcoding.h"
00041 #include "transcode_dispatcher.h"
00042 #include "transcode_ext_handler.h"
00043 #include "tools.h"
00044
00045 using namespace zmm;
00046
00047 TranscodeDispatcher::TranscodeDispatcher() : TranscodeHandler()
00048 {
00049 }
00050
00051 Ref<IOHandler> TranscodeDispatcher::open(Ref<TranscodingProfile> profile,
00052 String location,
00053 Ref<CdsObject> obj,
00054 struct File_Info *info)
00055 {
00056 if (profile == nil)
00057 throw _Exception(_("Transcoding of file ") + location +
00058 "requested but no profile given ");
00059
00060
00061
00062 if (profile->getType() == TR_External)
00063 {
00064 Ref<TranscodeExternalHandler> tr_ext(new TranscodeExternalHandler());
00065 return tr_ext->open(profile, location, obj, info);
00066 }
00067 else
00068 throw _Exception(_("Unknown transcoding type for profile ") +
00069 profile->getName());
00070 }
00071
00072 #endif//EXTERNAL_TRANSCODING