summaryrefslogtreecommitdiffstats
path: root/gst-libs/ext/mplex/outputstream.hh
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-01-01 22:45:57 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-01-01 22:45:57 +0000
commit9003ed34ba8e694b44433597c890affac369c368 (patch)
treedca1fa1b1decb37f42397813935add00b4f13182 /gst-libs/ext/mplex/outputstream.hh
parent0e3024712e2a935d1f5b216cd4d7794a0132c522 (diff)
downloadgst-plugins-bad-9003ed34ba8e694b44433597c890affac369c368.tar.gz
gst-plugins-bad-9003ed34ba8e694b44433597c890affac369c368.tar.bz2
gst-plugins-bad-9003ed34ba8e694b44433597c890affac369c368.zip
configure.ac: Fix configure check for mpeg2enc. We need 1.6.1.93 instead of 1.6.1.92, since the pkg-config file of 1....
Original commit message from CVS: 2004-01-01 Ronald Bultje <rbultje@ronald.bitfreak.net> * configure.ac: Fix configure check for mpeg2enc. We need 1.6.1.93 instead of 1.6.1.92, since the pkg-config file of 1.6.1.92 is borked and it therefore uses the wrong include paths. Too bad... Note that 1.6.1.93 is not release yet. ;). Also add a check for mplex, which is now using the lib'ified mplex from mjpegtools, too. * ext/ffmpeg/gstffmpegcodecmap.c: Add codec_tag for 3ivx/xvid. For xvid, this should fix playback issues. I don't think ffmpeg handles 3ivx correctly, so this probably won't work. But it won't hurt either. * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_connect), (gst_ffmpegdec_chain): * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect), (gst_ffmpegenc_chain_audio): Fix memleak in audio encoding. Close codec if open fails, this calls the cleanup routines so we can re-use the context. * ext/mpeg2enc/gstmpeg2enc.cc: Fix pad template names/types, fix memory issue with getcaps(). * ext/mpeg2enc/gstmpeg2encoder.cc: * ext/mpeg2enc/gstmpeg2encoder.hh: Fix compile issue with new caps system (const thingy). * ext/mpeg2enc/gstmpeg2encpicturereader.cc: * ext/mpeg2enc/gstmpeg2encpicturereader.hh: We read a first frame right on initing, so that we have a caps when we init the output. This caps is cached in padprivate and read as first frame. * ext/mplex/Makefile.am: * ext/mplex/gstmplex.cc: * ext/mplex/gstmplex.h: * ext/mplex/gstmplex.hh: * ext/mplex/gstmplexibitstream.cc: * ext/mplex/gstmplexibitstream.hh: * ext/mplex/gstmplexjob.cc: * ext/mplex/gstmplexjob.hh: * ext/mplex/gstmplexoutputstream.cc: * ext/mplex/gstmplexoutputstream.hh: We wrap mjpegtools mplex. So I rewrote the plugin. The old plugin had issues, didn't do capsnego, supported only a subset of the mplex features and required a mplex fork in our local CVS. Plus that it worked agaist a very old mplex version. Rewriting was faster than updating it. * gst-libs/ext/Makefile.am: * gst-libs/ext/mplex/INSTRUCT: * gst-libs/ext/mplex/Makefile.am: * gst-libs/ext/mplex/README: * gst-libs/ext/mplex/TODO: * gst-libs/ext/mplex/ac3strm_in.cc: * gst-libs/ext/mplex/audiostrm.hh: * gst-libs/ext/mplex/audiostrm_out.cc: * gst-libs/ext/mplex/aunit.hh: * gst-libs/ext/mplex/bits.cc: * gst-libs/ext/mplex/bits.hh: * gst-libs/ext/mplex/buffer.cc: * gst-libs/ext/mplex/buffer.hh: * gst-libs/ext/mplex/fastintfns.h: * gst-libs/ext/mplex/format_codes.h: * gst-libs/ext/mplex/inputstrm.cc: * gst-libs/ext/mplex/inputstrm.hh: * gst-libs/ext/mplex/lpcmstrm_in.cc: * gst-libs/ext/mplex/mjpeg_logging.cc: * gst-libs/ext/mplex/mjpeg_logging.h: * gst-libs/ext/mplex/mjpeg_types.h: * gst-libs/ext/mplex/mpastrm_in.cc: * gst-libs/ext/mplex/mpegconsts.cc: * gst-libs/ext/mplex/mpegconsts.h: * gst-libs/ext/mplex/mplexconsts.hh: * gst-libs/ext/mplex/multplex.cc: * gst-libs/ext/mplex/outputstream.hh: * gst-libs/ext/mplex/padstrm.cc: * gst-libs/ext/mplex/padstrm.hh: * gst-libs/ext/mplex/stillsstream.cc: * gst-libs/ext/mplex/stillsstream.hh: * gst-libs/ext/mplex/systems.cc: * gst-libs/ext/mplex/systems.hh: * gst-libs/ext/mplex/vector.cc: * gst-libs/ext/mplex/vector.hh: * gst-libs/ext/mplex/videostrm.hh: * gst-libs/ext/mplex/videostrm_in.cc: * gst-libs/ext/mplex/videostrm_out.cc: * gst-libs/ext/mplex/yuv4mpeg.cc: * gst-libs/ext/mplex/yuv4mpeg.h: * gst-libs/ext/mplex/yuv4mpeg_intern.h: * gst-libs/ext/mplex/yuv4mpeg_ratio.cc: We don't fork mjpegtools' mplex in our CVS anymore. * gst/avi/gstavidemux.c: (gst_avi_demux_src_getcaps), (gst_avi_demux_add_stream): * gst/avi/gstavidemux.h: Add getcaps() function for proper caps nego. This makes some parts of AVI playback/reading work. * sys/ximage/ximagesink.c: (gst_ximagesink_sinkconnect): Resize window on new capsnego. This is probably wrong, but I'm still committing it because with current capsnego, the first successfull capsnego is auto-fixated, therefore rounded down to the lowest values in the caps. this results in a 16x16 XWindow that is not reized when real capsnego finishes. Dave, I see more cases of this, do you know a proper solution? * tools/gst-launch-ext.in: Fix MPEG-4 AAC (Apple iPod/iTunes) file commandline.
Diffstat (limited to 'gst-libs/ext/mplex/outputstream.hh')
-rw-r--r--gst-libs/ext/mplex/outputstream.hh198
1 files changed, 0 insertions, 198 deletions
diff --git a/gst-libs/ext/mplex/outputstream.hh b/gst-libs/ext/mplex/outputstream.hh
deleted file mode 100644
index 3b625613..00000000
--- a/gst-libs/ext/mplex/outputstream.hh
+++ /dev/null
@@ -1,198 +0,0 @@
-
-#ifndef __OUTPUTSTREAM_H__
-#define __OUTPUTSTREAM_H__
-
-#include <config.h>
-#include <stdio.h>
-#include "mjpeg_types.h"
-
-#include "inputstrm.hh"
-#include "padstrm.hh"
-#include "systems.hh"
-
-typedef enum
-{ start_segment, mid_segment,
- runout_segment
-}
-segment_state;
-
-class OutputStream
-{
-public:
- OutputStream ()
- {
- underrun_ignore = 0;
- underruns = 0;
-
- opt_verbosity = 1;
- opt_buffer_size = 46;
- opt_data_rate = 0; /* 3486 = 174300B/sec would be right for VCD */
- opt_video_offset = 0;
- opt_audio_offset = 0;
- opt_sector_size = 2324;
- opt_VBR = 0;
- opt_mpeg = 1;
- opt_mux_format = 0; /* Generic MPEG-1 stream as default */
- opt_multifile_segment = 0;
- opt_always_system_headers = 0;
- opt_packets_per_pack = 20;
- opt_ignore_underrun = false;
- opt_max_segment_size = 0;
- }
- bool OutputMultiplex ();
- void Init (vector < ElementaryStream * >*strms, PS_Stream *stream);
- void Close ();
-
- void InitSyntaxParameters ();
- void ByteposTimecode (bitcount_t bytepos, clockticks & ts);
-
- inline Sys_header_struc *SystemHeader ()
- {
- return &sys_header;
- }
-
- unsigned int PacketPayload (MuxStream & strm, bool buffers, bool PTSstamp, bool DTSstamp);
- unsigned int WritePacket (unsigned int max_packet_data_size,
- MuxStream & strm,
- bool buffers, clockticks PTS, clockticks DTS, uint8_t timestamps);
-
- /* Special "unusual" sector types needed for particular formats
- */
-
- void OutputDVDPriv2 ();
-
- /* Syntax control parameters, public becaus they're partly referenced
- by the input stream objects.
- */
-
- bool always_sys_header_in_pack;
- bool dtspts_for_all_vau;
- bool sys_header_in_pack1;
- bool buffers_in_video;
- bool always_buffers_in_video;
- bool buffers_in_audio;
- bool always_buffers_in_audio;
- bool sector_align_iframeAUs;
- bool split_at_seq_end;
- bool seg_starts_with_video;
- bool timestamp_iframe_only;
- bool video_buffers_iframe_only;
- unsigned int audio_buffer_size;
- unsigned int video_buffer_size;
-
- /* more profile options */
- int opt_verbosity;
- int opt_quiet_mode;
- int opt_buffer_size;
- int opt_data_rate;
- int opt_video_offset;
- int opt_audio_offset;
- int opt_sector_size;
- int opt_VBR;
- int opt_mpeg;
- int opt_mux_format;
- int opt_multifile_segment;
- int opt_always_system_headers;
- int opt_packets_per_pack;
- bool opt_stills;
- bool opt_ignore_underrun;
- int verbose;
- off_t opt_max_segment_size;
-
- /* Sequence run-out control */
- bool running_out;
- clockticks runout_PTS;
-
-
-/* In some situations the system/PES packets are embedded with
- external transport data which has to be taken into account for SCR
- calculations to be correct. E.g. VCD streams. Where each 2324 byte
- system packet is embedded in a 2352 byte CD sector and the actual
- MPEG data is preceded by 30 empty sectors.
-*/
-
- unsigned int sector_transport_size;
- unsigned int transport_prefix_sectors;
- unsigned int sector_size;
- unsigned int vcd_zero_stuffing; /* VCD audio sectors have 20 0 bytes :-( */
-
- int dmux_rate; /* Actual data mux-rate for calculations always a multiple of 50 */
- int mux_rate; /* MPEG mux rate (50 byte/sec units */
- unsigned int packets_per_pack;
-
-private:
-
- /* Stream packet component buffers */
-
- Sys_header_struc sys_header;
- Pack_struc pack_header;
- Pack_struc *pack_header_ptr;
- Sys_header_struc *sys_header_ptr;
- bool start_of_new_pack;
- bool include_sys_header;
-
- /* Under-run error messages */
- unsigned int underruns;
- unsigned int underrun_ignore;
-
- /* Output data stream... */
- PS_Stream *psstrm;
- bitcount_t bytes_output;
- clockticks ticks_per_sector;
-
-public:
- clockticks current_SCR;
-private:
- clockticks audio_delay;
- clockticks video_delay;
- bool vbr;
-
- /* Source data streams */
- /* Note: 1st video stream is regarded as the "master" stream for
- the purpose of splitting sequences etc...
- */
- vector < ElementaryStream * >*estreams; // Complete set
- vector < ElementaryStream * >vstreams; // Video streams in estreams
- vector < ElementaryStream * >astreams; // Audio streams in estreams
-
- PaddingStream pstrm;
- VCDAPadStream vcdapstrm;
- DVDPriv2Stream dvdpriv2strm;
-
-private:
- unsigned int RunInSectors ();
-
- void NextPosAndSCR ();
- void SetPosAndSCR (bitcount_t bytepos);
-
- void OutputPrefix ();
-
- void OutputSuffix ();
- void OutputPadding (bool vcd_audio_pad);
- void MuxStatus (log_level_t level);
-
- void WriteRawSector (uint8_t * rawpackets, unsigned int length);
- void AppendMuxStreamsOf (vector < ElementaryStream * >&elem, vector < MuxStream * >&mux);
-
- /* state var for muxing */
- segment_state seg_state;
-
- vector < bool > completed;
- vector < bool >::iterator pcomp;
- vector < ElementaryStream * >::iterator str;
-
- unsigned int packets_left_in_pack; /* Suppress warning */
- bool padding_packet;
- bool video_first;
-
-/*
- * Local variables:
- * c-file-style: "gnu"
- * tab-width: 8
- * indent-tabs-mode: nil
- * End:
- */
-};
-
-
-#endif //__OUTPUTSTREAM_H__