1 /* GStreamer mpeg2enc (mjpegtools) wrapper 2 * (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net> 3 * (c) 2006 Mark Nauwelaerts <manauw@skynet.be> 4 * 5 * gstmpeg2encoder.hh: gstreamer/mpeg2enc encoder class 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public 18 * License along with this library; if not, write to the 19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 20 * Boston, MA 02110-1301, USA. 21 */ 22 23 #ifndef __GST_MPEG2ENCODER_H__ 24 #define __GST_MPEG2ENCODER_H__ 25 26 27 #include <mpeg2encoder.hh> 28 #include "gstmpeg2encoptions.hh" 29 #include "gstmpeg2encpicturereader.hh" 30 #include "gstmpeg2encstreamwriter.hh" 31 32 class GstMpeg2Encoder : public MPEG2Encoder { 33 public: 34 GstMpeg2Encoder (GstMpeg2EncOptions *options, 35 GstElement *element, GstCaps *caps); 36 ~GstMpeg2Encoder (); 37 38 gboolean setup (); 39 void init (); 40 41 /* process stream */ 42 void encode (); 43 44 /* get current output format */ 45 GstCaps *getFormat (); 46 47 private: 48 GstElement *element; 49 GstCaps *caps; 50 gboolean init_done; 51 gboolean disable_encode_retries; 52 }; 53 54 #endif /* __GST_MPEG2ENCODER_H__ */ 55