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 HAVE_LIBDVDNAV
00037
00038 #include "mpegremux_processor.h"
00039 #include "mpegdemux/mpegdemux.h"
00040
00041 using namespace zmm;
00042
00043 MPEGRemuxProcessor::MPEGRemuxProcessor(int in_fd, int out_fd, unsigned char keep_audio_id) : ThreadExecutor()
00044 {
00045 if (in_fd < 0)
00046 throw _Exception(_("Got invalid input fd!"));
00047
00048 if (out_fd < 0)
00049 throw _Exception(_("Got invalid input fd!"));
00050
00051 this->in_fd = in_fd;
00052 this->out_fd = out_fd;
00053 this->keep_audio_id = keep_audio_id;
00054 startThread();
00055 }
00056
00057 void MPEGRemuxProcessor::threadProc()
00058 {
00059 log_debug("Starting remux thread...\n");
00060 status = remux_mpeg(in_fd, out_fd, 0xe0, keep_audio_id);
00061 threadRunning = false;
00062 log_debug("Done remuxing\n");
00063 }
00064
00065 #endif//HAVE_LIBDVDNAV