TSFileSource

nate.deepcreek.org.au / Programming / TSFileSource

Description

TSFileSource is a DirectShow File Source push Filter that can be used to load DVB-T Transport Stream Files for playing in Filtergraphs.

More ...
Features

What does it do?

  • It can load Full or partial TS Files that are captured from the DVB-T cards.
  • It can detect the duration of the TS file based on the Broadcasters inserted PCR information.
  • It can detect major changes in PCR timing within the file stream and provide an accumulative duration time.
  • It can parse the Transport stream information and display the Network Name, Original Network Name, Channel name and Number.
  • It can display the Network ID, Transport ID, Program Stream ID, Video, Audio, Teletext pid values.
  • It can also display the current Now & Next information while playing.
  • It can change between program streams while playing without the need for the user to restart the application and maintains current playing time after changing. It can also do this when switching between different Audio stream types by reconnecting to the decoders or will re-render new filters if the reconnection fails due to incompatable decoder filters.
  • It can play Full or partial TS Files as they are being recorded.
  • It will play the live file to the end of the recording without stopping.
  • It will allow you to play two seperate files within the same filtergraph although seeking will be limited to the same stream time.
  • It will alow Player applications to be able to select Sub-Programs via their IAMStreamSelect Interface.
    (eg. zoomplayer and Windows media player.)
  • It will allow you to choose MPEG 1 or MPEG 2 audio pin type on the MS Demux.
  • It will allow you to choose audio 1 or audio 2 pid as a preference.
  • It will allow you to choose Mpeg or AC3 audio type as a preference.
  • It can support some H.264 Video types.
  • It can Play TS files without PAT or PMT packets.(Note: Must have PCR packets)
  • It can save its global property page settings in the registry.
  • It can save seperate settings for audio pin type, Audio preference and program chosen in the registry referenced to the network ID.(Used with Full TS Files)
  • It can update the filtergraph's current & duration time using the "EC_LENGTH_CHANGED" event.
Downloads
TSFileSource 2.2.1.172 Zip File (195kb) Source Code (575kb) History
TSFileSource 2.2.1.0 Zip File (697kb) Source Code (745kb) History
TSFileSource 2.2.0.8 Zip File (292kb) Source Code (338kb) History
TSFileSource 2.2.0.7 Zip File (217kb) Source Code (236kb) History
TSFileSource 2.2.0.6 Zip File (213kb) Source Code (233kb) History
TSFileSource 2.2.0.5 Zip File (208kb) Source Code (227kb) History
TSFileSource 2.2.0.4 Zip File (204kb) Source Code (221kb) History
TSFileSource 2.2.0.3 Zip File (204kb) Source Code (220kb) History
TSFileSource 2.2.0.2 Zip File (381kb) Source Code (402kb) History
TSFileSource 2.2.0.1 Zip File (174kb) Source Code (177kb) History
TSFileSource 2.2.0.0 Zip File (173kb) Source Code (177kb) History
TSFileSource 2.1.1.9 Zip File (170kb) Source Code (174kb) History
TSFileSource 2.1.1.8 Zip File (170kb) Source Code (174kb) History
TSFileSource 2.1.1.7 Beta only. Zip File (111kb) Source Code (122kb) History
TSFileSource 2.1.1.6 Zip File (119kb) Source Code (109kb) History
TSFileSource 2.1.1.5 Zip File (119kb) Source Code (109kb) History
TSFileSource 2.1.1.4 Zip File (119kb) Source Code (109kb) History
TSFileSource 2.1.1.3 Zip File (119kb) Source Code (109kb) History
TSFileSource 2.1.1.2 Zip File (119kb) Source Code (109kb) History
TSFileSource 2.1.1.1 Zip File (119kb) Source Code (109kb) History
TSFileSource 2.1.1.0 Zip File (119kb) Source Code (109kb) History
TSFileSource 2.1.0.9 Zip File (90kb) Source Code (88kb) History
TSFileSource 2.1.0.8 Zip File (113kb) Source Code (102kb) History
TSFileSource 2.1.0.7 Zip File (113kb) Source Code (102kb) History
TSFileSource 2.1.0.6 Zip File (113kb) Source Code (101kb) History
TSFileSource 2.1.0.5 Zip File (112kb) Source Code (99kb) History
TSFileSource 2.1.0.4 Zip File (112kb) Source Code (99kb) History
TSFileSource 2.1.0.3 Zip File (109kb) Source Code (92kb) History
TSFileSource 2.1.0.2 Zip File (109kb) Source Code (90kb) History

Latest Source Code
History

TSFileSource 2.2.1.172

Changes:
  • Changed to compile in VS 2008.
  • Fixed a bug which was causing playback of a tsbuffer file to appear to skip to the start of the buffer whenever it was near the end and had to wait for the file to grow
  • Fixed NetRender filename generation.
  • Changed to write all the registry values the first time the registry key is created.
  • Updated to write the number values in the registry as DWORD and QWORD instead of BINARY
  • Fixed saving and loading of the Create Subtitle Pin option.
  • Added the version number to the description on the property page.
  • Updated the TSFileSource Reference Clock to use a high precision timer.
  • Added support for monogram TS files.
  • Changed TSFileSource project to be statically linked. Hopefully this will help solve the problem of not being able to register the dll in windows xp.

TSFileSource 2.2.1.0

Changes:
  • Lots of changes to reduce stutter problems.
  • Updates to PAT parsing to handle extended tables.
  • Updates to seeking code to improve the speed over slow networks.
  • Some changes to enable the Broadcast event code if the NP Control/slave options is enabled.

TSFileSource 2.2.0.8

Changes:
  • Fixed a problem with the regular update parser stalling the fillbuffer thread.
  • Fixed some PCR rollover issues with seeking & positioning return functions.
  • Added a version check to the shared memory parameters.
  • Various fixes made.
  • Fixed a problem in the shared memory handler that was causing locking of the file ref count.
  • Added two new filters based on the TSFileSource & TSFileSink called TSParserSource & TSParserSink.
  • Implemented a SharedMemory class to mimic the Win32 API File Handler methods in shared memory.
  • Added playing of Shared Memory files to the TSFileSource & TSParserSource Filters
  • Added a input pin with its own MultiMemWriter class so it can timeshift to shared memory of incomming streams.
  • Fixed various bug in the filters for playing transport stream files.
  • Added reference clock speed change support to the Source Filter's property pages for testing.

TSFileSource 2.2.0.7

Changes:
  • Fixed a problem with the DVB Format code that was not allowing PAT less only file to play.
  • Some minor fixes, Added some support for DTS Audio & Subtitle outputs.
  • Major rework of the Demux pin change code.
  • Major changes of the Demux change code.

TSFileSource 2.2.0.6 Beta 6

Changes:
  • Changed some things to improve performance for cold starting.
  • Fixed a proble in the Checkconnect() method where it was allowing connection to other than MS Demux filters.
  • Minor code changes to the reference clock mode setting when reloading the file name. The Clock mode setting is now kept after a file reload.
  • Removed the reference clock -1% change when cold starting, may have been causing some lipsync problems TBA.
  • Some minor changes to remove some threading stuff.
  • Found a problem with frame dropping when running in non HT mode. Removed the regular parser update call as well as disabled the TSBuffer extra threading.
  • Added some fixes to make the Netrender class work with the URL input format.
  • Added a High ProcessClass priority to the Net Render::CreateNetworkGraph() function if the dsnetwork graph was successful in building.

TSFileSource 2.2.0.5

Changes:
  • Fixed a problem where the filtergraph times were not being updated correctly when loading new files.
  • Fixed a problem with cold starting of Full TS Mux files where the times would change if you changed to a new service.
  • Added some code to parse the media subtype from the file if its less than 2mb. This is to help with cold starting of timeshift files.
  • Added some code to help reduce HDD clogging.
  • Added some code to allow playing the TSFileSink timeshift files from other locations i.e. over networks.
  • Added a seperate buffer thread to the TSBuffer class, seems to now seek faster.
  • Fixed a bug where it would not seek properly if the file had a pcr cross over.
  • Updated the log fileWriter class with a buffer thread.
  • Fixed a problem with the Demux code so the filter will now work better when changing streams.

TSFileSource 2.2.0.4

Changes:
  • Fixed a posible problem with the TSFileSinkPin where it was not stopping the receive thread when the filter was stopped.
  • Added a fix to the PAT parser code to fix a problem realised from germany.
  • Added a fix to the FindPin() function because it was not adding a reference to the pointer.
  • Added an extra test to exclude the Cyberlink Demux Filter from connecting, seems that it is unable to support MS Demux Interfaces Properly.

TSFileSource 2.2.0.3

Changes:
  • Fixed a problem in the PMT parser code that was causing false detection of extra streams for some files.
  • Added a function to get the available free disk space so the TSFileSink Filter will begin reusing the old files if the HDD runs out of space.
  • Fixed a crashing problem when used with other demux's that don't fully support the MS Demux interface methods like cyberlink.
  • Fixed some locking issues.
  • Fixed a PAT and ONIT parsing bug for UK users.
  • Fixed another locking bug as well as checked all of the other locks in the CTSFileSource Class.
  • Fixed a bug where the filter would lock if it was stopped before the pids were parsed.see PidParser().
  • Some minor changes to the update thread.

TSFileSource 2.2.0.2

Changes:
  • Fixed up some objects release issues.
  • Added in version information to the property pages.
  • I have had to reduce the fileWriter's sample size to stop the HDD clogging with multiple instances.
  • Changed back some file writing flags in the filewriter classes, this now allows for double buffereng on the FileWriter input Pin.
  • Added a TSThread Class to the TSFileSink filter Pin class to help with file cashing issues.
  • Removed Frodo's packet error filter code from the TSFileSink filter, was too much delay for small sample sizes.
  • Added some object locks to the IAMStreamInterface for when the Stop function is called.
  • Changed the method in the file reload code to enable a cold start if a file is reloaded that has just been created.
  • Changed some file reading/writing flags in the filewriter & file reader classes for quicker file accessing.
  • Added some classes for preperation to use the Mpeg2Parser code.
  • Added some code to the TSFileSinkPin Class to drop data packets that are not in sequence.
  • Added a Packet error indicator from the above code to display the error count on the property page, and via the ISTFileSink Interface.
  • Added a reset button to the property page to reset the error count.

TSFileSource 2.2.0.1

Changes:
  • bear:
  • Some minor changes to the code to improve stability.
  • Restored the update duration thread priority, just seems to update better.
  • Added a fixed Aspect Ratio Option to the ITSFileSource Interface and property page. It sets the media format on the Demux video output pin to 720x576, default is null.
  • Fixed a bug in the setPositions function that was causing a lock of the thread if it was called repeatedly quickly. re DNTVLive pause scrolling.
  • Fixed a bug where the pid parser was not locked while setposition was called.
  • Reduced the load delay on the network multicast render method as the filter can now do cold starts.
  • Fixed a problem where the filter was unable to change pin mode if it was loaded & rendered and new file was loaded.
  • Fixed a problem where the PidArray was being accessed during a clear operation and casing a crash.
  • Re added the line of code to change the speed of the TSFileSourceClock by 1%, the value is now only reduced if it is a cold start file load.
  • Fixed a problem where the Current File position was not being saved if the setposition() was called prior to the first pause()/run() call.
  • Fixed a bug that was being caused when the fillbuffer thread was clashing with the UpdateDuration thread.
  • Removed the line of code to change the speed of the TSFileSourceClock by 1%. It was just for testing.
  • Added a line of code to change the speed of the TSFileSourceClock by 1%.
  • Added an extra TSBuffer::Require() called from the Update Duration thread, this is so that we can read ahead between each FillBuffer calls.
  • Added some extra PidArray critical locks.
  • Added some critical locks to the demux, pidinfoarray & stream parser classes.
  • Changed the duration update method to only parse if we have the pids parsed.
  • Improved the startup delay by using a cold start method, the fillbuffer does not parse for pcr's until the pids are parsed. This means that the graph clock will not be updated until the pids are parsed. This occurs when there is sufficient file size to correctly parse the data.
  • Improved the demux::cleardemuxpin() method by replacing some calls with a vetetdemuxpin() method so it doesn't clear the pid if the new pid is the same value.
  • Added in a reference clock delay when we reach the end of the file, will slightly improve as time progresses to stay ahead.
  • Added a force output pin type method on the FileSource::load() function, this allows the graph to build with a program pin if required. i.e. If pmt param is media subtype program else Transport pin. If pmt is null then pin type is derived from the file parsing.
  • Added in some low priority setings to the DurationUpdate, and property page threads.
  • Changed the FillBuffer wait for file building method from a 50ms delay to a 2 second long retry at 50ms intervals. This is to get around file corruption caused by some drivers.
  • Fixed a bug where the filter was not seeking correctly on the first seek, the internal bitrate was not being updated in the pids array. This was apparant on large files.

TSFileSource 2.2.0.0

Changes:
  • bear:
  • Found and fixed a new bug where the local pid array times were not being updated in the Update duration thread.
  • Fixed a bug where the Multifilereader was holding the file open when in stopped, re- FileDuration's FileReader class.
  • Fixed another issue with the Multifilereader mode's correct seeking time when changing between streams.
  • Fixed a issue with the Source Load() function where it was changing the filename paramater's pointer value.
  • Fixed a bug with the Multifilereader mode where it was not seeking correctly when the TSFileSink buffer size was reached.
  • Fixed a bug with the Multifilereader mode where it was not re-seeking correctly after changing program streams.
  • Changed the IAMStreamSelect menu display, does not display pointers in the menu name anymore.
  • Fixed a bug with the MultiFileReader::Read() function where it was trying to read data past the end of the file.
  • Found and fixed a few more potential divide by zero bugs.
  • Fixed a bug in the MultiFileReader::Read() function where it would crash if the info array had no file-> class loaded.Fixed a potential problem with the IAMStreamSelect GetCount() function not returning 0 value if there are no streams.
  • Fixed a potential problem if you have a threaded call to CTSFileSourcePin::GetAvailable() function if the FileReader class does not exist such as when reloading.

TSFileSource 2.1.1.9

Changes:
  • bear:
  • Fixed a bug with the TSFileSource's ITSFileSource property page Method that was stopping the page from displaying when called.
  • Fixed a divide by zero bug that was causing the filter to crash when you tried to run the filter with a zero duration file then tried to stop it.

TSFileSource 2.1.1.8

Changes:
  • bear:
  • Changed the look of the menu in the IAMStreamSelect Interface.
  • Changed the error code returned if the NetSource filtergraph has not data flow so applications do not try to access the filter.
  • Fixed an issue when the filter was used by mplayer2.exe, seems it was selecting the first stream of every group prior to playing, hence it would then select the stream that as the Browser option and opened the open file window.
  • Fixed a bug where the filter would stall if the NetSource filtergraph failed due to no data flow.
  • Added a open file browser feature to allow changing files via the IAMStreamSelect interface.
  • Added selection capability of any active NetSource stream graphs via the IAMStreamSelect interface.
  • Changed the Demux video pin format to allow for different aspect ratios.
  • Implemented multicasting via a child filtergraph using the DSNet Receiver filter & the TSFileSink filter to create a timeshift file for playing.
  • Made some improvments to the Load() function so that the filtergraph will re-render an infinite tee filter when changing between media types.
  • Removed the Threadexist test in the SetPositions() function to fix the problem where the position is set prior to the first run call. Re Remember the last media position in Zoomplayer fix.
  • Made some further improvments to the Load() file change feature to make it more robust and to allow for Infinite tee filter in the chain.
  • Fixed a number of bugs in the duration parser to allow for buggy streams such as those that have PRBS content.
  • Made some further improvments to the Load() file change feature.
  • Some other minor improvements.
  • Fixed a problem with double starting after a file change.
  • Added a windows load feature to the Load Function, if you call it with a null filename it will now open a Browse window.
  • Improved the method of changing files, can now change files when paused and stopped.
  • Fixed a problem with the property page updating while the pidparser was restarting.
  • Added a File Load feature to the ITSFileSource Interface as well as a button to the TSFileSource Property page. You can now change the file being played on the fly.
  • Added a auto reload feature for Timeshifting files where the TSFileSource fiiter will restart if the timeshift file changes size such as in a restart of the fileWriter filter.
  • Isolated the pidArray from the TSFileSourcePin class functions so it would reduce accessing conflicts.
  • Added in some delete code in the MultiFileWriter class to delete the file before it is reused. This eliminates any delay issues due to Read/Write conflicts.
  • Fixed the auto pid parsing problem with the MultiFileWriter.
  • Removed the extra RefreshTSBufferFile() calls from the MulitfileWriter as they seem to be causing problems.
  • Added a seperate getFilePointer() & setFilePointer() calls to the fileWriters to reduce the need for special code for the different filewriters.
  • Replaced the class Destructor calls in all the code with delete.
  • Added CAMThreads to both prop pages for regular updating.
  • Fixed the GetAvailable function to return correct times.
  • Replaced the class Destructors in the load() function with delete.
  • Disabled the auto pid parse code as its still buggy for Timeshifting.
  • Fixed the line of code to update the duration, re converting to ref time rather than pcr time.
  • Added a property page to the TSFileSink Filter.
  • Added settings to the registry for the TSFileSink filter.
  • Added locking code to the pidparser to prevent the pid array from being accessed while its being updated.
  • Changed the setpointer calls from FILE_BEGIN to FILE_END.
  • Enabled the auto pid reparsing code to check pids every 5sec.
  • nate:
  • Changes to MultiFileReader
  • - Fixed problem preventing second time play.
  • - Fixed problem of new files added having the wrong file ID.
  • - Fixed problem of not working when file was opened with files Removed > 0
  • - Fixed GetFileLength to work with files being written to.
  • - Added some debugging that can be turned on for a specific file reader.
  • Changed UpdateDuration to keep working if there's a PCR rollover.
  • Fixed some build warnings
  • - made MultiFileReader inherit FileReader publicly
  • - changed RegStore to use LPTSTR instead of std::string
  • - removed all #include <streams.h> from .h files.
  • bear:
  • Made improvments the Update duration code to correctly update the filtergraph time for MultiFileReader Mode.
  • Made changes to the SetAccuratePos function to correctly seek relative to the file end position, seems to improve the MultiFileReader seeking now.
  • Changed the default clock reference option to select the TSFileSource Internal clock.
  • Changed the AC3 Preference Option Default setting to disabled so that UK users don't loose audio if a private stream is detected as AC3 and is chosen.
  • Fixed a bug with the Program Pin Mode where it was not updating the duration.
  • Added code to improve the Cyclic Timeshift mode, it can now handle pauses to the writer or the Source and the current time remains static or increases accordingly.
  • Added code for the IMediaSeeking::GetAvailable() function.
  • Added extra Update duration code for use with the MultiFileReader.
  • Added a FileReader Mode function to indicate if we are using the MultiFileReader.
  • Added some changes to the Getfilesize function of the MultifileReader.
  • Fixed a problem with the update duration thread locking the file when stopped.
  • Fixed the high cpu usage problem that occurs at 0 file start.
  • Fixed the problem where the filter would not update the demux from a 0 file start.
  • Fixed the filtergraph time to position itself relative to the position within the buffer so you can seek within it. This only happens when the buffer stops increasing in size and starts to cycle.
  • Added a test for the demux pid settings to the update duration thread so that if the pids values change it will force a update on the demux.
  • Changed the update duration method to parse only the end pcr rather than both start & end.
  • Fixed a problem with the Update duration when using the TSFileWriter file by adding Refresh TSBufferFile() calls.

TSFileSource 2.1.1.7

Changes:
  • Added TSFileSink (multi file transport stream writer)
  • Added MultiFileReader for .tsbuffer files (duration updates don't work yet)

TSFileSource 2.1.1.6

Changes:
  • Fixed a problem in the parser code that was causing false detection of A/V pids when in Program Pin Mode.
  • Fixed a problem with the CAMThread causing a lockup when the input file did not exist. Fixed the problem with the application task not ending after the above condition.
  • Added a dummy IAsyncReader Interface to allow the MS Demux to parse the data in the file when the Demux control option is inactive.(Program Pin Mode Only)
  • Added some changes to the PidParser code to allow for other country TS standards.(France)
  • Changed the media subtype for H264 video mediatype so it wll play H264 streams.(France)
  • Added some code to the FileReader class to do timeshifting, development only, using the FileWriter (TimeShift) Filter.

TSFileSource 2.1.1.5

Changes:
  • Fixed a problem where the IMPEG2StreamIdMap pids were not being cleared when changing streams.(re mpg files)
  • Fixed the AC3 Audio playback issue with mpg files. Had to add the stream offset values.

TSFileSource 2.1.1.4

Changes:
  • Made some changes to the main destructor method so that all class destructors were used.
  • Made some changes to the Breakconnect functon so that the pin could be reconnected to the Demux's.
  • Added some helper code to delete any Demux output pins if the TSfileSource filter was disconnected.
  • Fixed a bug in the GetDuration code that was causing issues with getting the pcr.
  • Added some simple code to allow the filter to operate as a push source for mpg files, It changes the output pin to MPEG2 Program mode and controls the MS Demux using the IMPEG2StreamIdMap Interface. (Note: Does not seem to work well with AC3 streams but plays MPEG2 audio ok.)

TSFileSource 2.1.1.3

Changes:
  • Changed the Pin name of the audio pin for AAC media types from "AAC" to "Audio" so Applications can still look for the audio label.
  • Fixed a bug that was holding up the filtergraph when it was destroyed from a active filter state.RE CAMThread.
  • Fixed a few more bugs.

TSFileSource 2.1.1.2

Changes:
  • Add a fix to the Pause function to allow it to work if called from a stopped condition.
  • Fixed a few more bugs.

TSFileSource 2.1.1.1

Changes:
  • Added a option on the property page to enable the Teletext pin. (Should solve any rendering Problems and make it quicker to load.)
  • Added ITSFileSource function support for the above option.

TSFileSource 2.1.1.0

Changes:
  • Fixed a divide by zero issue in the pidparser::Getduration that occured on low bitrate files.
  • Added AAC audio support, only if I could find a decoder that will work with it.
  • Fixed a problem with the IAMStreamSelect::Info function, returns the Mediatype correctly as well as the Name.
  • Fixed a few issues with the new h264 video additions.
  • Fixed some more potential memory leaks in some of the various Get PCR Functions.
  • Made the Stream Select Function display the EPG info when the first Stream position is selected.
  • Made some improvments to the Stream Select Display format.
  • Added some data packet injection code to allow viewing of the older capture formats, will only work with the Longhorn Demux though for some Network capture formats. (i.e missing pcr's)
  • Removed the Random Access flag from the file reader, re WS File Writer problem fix.
  • Added a ShowEPGInfo function to the ITSFileSource interface.

TSFileSource 2.1.0.9

Changes:
  • Added support for h264 video streams.

TSFileSource 2.1.0.8

Changes:
  • Fixed a problem with changing streams while seeking or paused.

TSFileSource 2.1.0.7

Changes:
  • Implemented a seperate thread for the duration updating.
  • Fixed a locking problem when in the seek mode.
  • Improved the fix for delayed play problem.

TSFileSource 2.1.0.6

Changes:
  • Fixed a potential memory leak in the Seek Absolute Function.
  • Fixed a problem in the Data rate Average Function.
  • Renamed the Property Page Label.
  • Fixed the playback delay problem after a re-seek.

TSFileSource 2.1.0.5

Changes:
  • Some bug fixes in the Update Duration FillBuffer function.
  • Added a fix for the Play/Pause/Seek/Play problem where it would not begin play imediately after a paused re-seek.

TSFileSource 2.1.0.4

Changes:
  • Added some Query interfaces to the CBaseOutput Pin.
  • Addded some CBasePin Media Type check functions that may be of some use to earlier connection methods.
  • Added code to set the CBasePin media type incase it was needed.
  • Added changes to the filter to try and improve the loading times of problem captures. eg. It will now only try and parse the file duration using the PCR's four times before it gives up and calculates the file duration from any pre-defined PCRs that it has already parsed. If its a readonly file it will only try and pcr parse once before it calculates from prior PCR's. This seems to now improve the loading time of bad captures down to about 5seconds.
  • Changed the duration refresh method of the Fillbuffer function for read only files from a PCR duration refresh to a calculated refresh based on the bitrate. I did this as I was getting stalling of the playback of the HD with Full TS files. If the bitrate is not a valid value then it will revert to the PCR duration refresh method.
  • Changed the load function to parse for the pids 300kB into the file to skip corrupted data at the head of the file.
  • Fixed a problem with the pid refresh feature when playing live recordings.
  • Added Absolute Seek Function.

TSFileSource 2.1.0.3

Changes:
  • Implemented an "EC_DVB_DURATIONCHANGE" & "EC_LENGTH_CHANGED" events to occur every second of an increase of stream time duration on live recorded captures. This functionality is to provide Applications an indication of a change in the duration Time so that they can update their duration displays.
  • Added IBaseFilter:QueryId() function to return the Pin from the displayed Pin Label.
  • Added IAMStreamSelect Refresh when refreshing the Pids from the property page button.
  • Added Improvements to Parser code so it will correctly parse Full TS Files with corrupted head.
  • Added Improvments to the GetDuration code to decrease load time on PCR problem files.

TSFileSource 2.1.0.2

Changes:
  • Changed the IAMStreamSelect Interface Group order to zero base as it should have been.
  • Changed the Property page CLSID to eliminate clashing with another filter.
  • Changed Language descriptors to English default in IAMStreamSelect Interface.
  • Changed IAMStreamSelect Info Function to allow for Null pointers to be supplied.
  • Fixed a Release statment in the CreateAC3Pin function which was left commented out in testing.
  • Rearranged the ITSFileSource Interface methods order to keep consistancy with the earlier official version 2.0.1.7.
    (Note: Any programs that have used the above Interface with the earlier test versions will now need to recompile using the new interface method order.)
  • Added ROT check to see if Object is already referenced so it will not make a double entry.
  • Added Filtergraph Reference Clock property Page Setting. This is to allow some DirectSound cards to have the correct reference clock set. Three options are Default, Demux & Render.
  • Added ROT enable option to Property Page. The Filter can now register the filtergraph that its in to the Running Object table. Should allow access to the IAMStreamSelect Interface from other applications.
  • Added Reference Clock setting code for testing.
  • Added StreamInfo & StreamParser classes and updated code to allow selection of Audio Tracks via the IAMStreamInterface.
  • Added IAMStreamSelect Interface to filter. Allows for basic Program switching on applications.
  • Added checkConnect function on output pin to prevent anything but the MS Demultiplexer from connecting with exception of "*Tee*" & "*Flow*" labeled filter or Filters that have a "*MPEG-2*" labeled input pin.
  • Fixed a problem in CheckConnect Function so Reclock Filter should now work again.
  • Fixed Filter Peers parsing, was only finding one filter chain.
  • Fixed Object release problem in checkConnect function.
  • Fixed a bug in the NID file Parsing code to eliminate false NID's from previous channel.
  • Fixed a EPG parsing bug that caused corrupt Now & Next information to appear if there was no N&N information in the stream.
  • Fixed a divide by zero exception bug in the Buffer module that appeared when you tried to play corrupted files.

TSFileSource 2.1.0.1

Changes:
  • Changed the code to try and isolate problem and fixed it since I was not releasing the pGraph pointer after each use.
  • Added in some filter peer code to allow the filter to only control the demux's in the same filter chain. It means that you can now play two or more TSFileSource filters within the same graph. Not that you would want to anyway.
  • Fixed an object release error.

TSFileSource 2.1.0.0

Changes:
  • General tidy up of the code to remove old unused code.

TSFileSource 2.0.1.7.NP7

Changes:
  • changes to allow it to work better with the new FileWriter Filter that DVB Webscheduler is now using.
  • Fixed some more bugs.

TSFileSource 2.0.1.7.NP6

Changes:
  • It has some changes to allow it to work with the new FileWriter Filter that DVB Webscheduler is going to use. It looks for the "filename.ts.info" file that is created while the new FileWriter is capturing and uses the information contained in this file to work out the file duration which it has not been able to do with any of the previous versions of the filewriter filter.

TSFileSource 2.0.1.7.NP5

Changes:
  • Added pid parsing on the fly to work while recording but getting some weird effects with memory being overwritten. Working on normal TS Files OK.
  • Removed ITSFileSource interface project, not required anymore.

TSFileSource 2.0.1.7.NP4

Changes:
  • Added more bug fixes related to Full TSMux Files.

TSFileSource 2.0.1.7.NP3

Changes:
  • Added ITSFileSource interface project,
  • Added Channel Number parsing,
  • Added Channel & Network Name parsing,
  • Added Program Now & Next Descriptor parsing,
  • Added a 0 byte File growing wait,
  • fixed lots of bugs

TSFileSource 2.0.1.7.NP2

Changes:
  • Don't remember whats changed.

TSFileSource 2.0.1.7.NP1

Changes:
  • Changes that allow the filter to work with the NP & TIF in a BDA Graph.I have also added a wait for file growing state in the filter's Run code to allow the filter to Parse the pids before proceeding. This is designed to allow immediate play after the file starts recording.
  • Added a refresh button to the prop page.

TSFileSource 2.0.1.7.NP

Changes:
  • Changes that allow the filter to work with the NP & TIF in a BDA Graph. I have added a new class called TunerEvent that uses the IBroadcast interface to send channel change events back to the filter so that the Demux can be updated.
  • Added two more options to the Property page "NP Control" that enables the Source filter to control the NP program selection and "NP Slave" that allows the NP to control the Source filter's program selection. ATM it only works with the DVBT Network Provider and is suggested as a test version only although it should perform as normal for playing files.

TSFileSource 2.0.1.7.z

Changes:
  • Implemented the registry save feature.
  • Added Audio2 Preference support.
  • Added a fix for any buggy duration times such as when missing pcr's such as on SBS radio.
  • Added in some ATSC AC3/LPCM/DTS Stream detection for as a test.
  • Changed the com interface to allow for User setting of the filter reg settings, programmers can now save & load settings seperate to the "default", these will be saved under "user", default is still loaded & saved from the prop page if "user" was not loaded.
  • Implemented a small fix to the PCR parsing code to allow correct durations for ATSC files and quicker loading.
  • Slight modifications to load & save the Network ID:TSID's value SID setting in the prop page along with the AC3 & Audio 2 preference settings.
  • Altered the Prop Page to include correct NID & TSID values, also installed a "Prev" to the "Next" Button.
    Please note that I have not included any limitations on the registry entry numbers as this is still being looked at.
  • Slight addition to the "ITSFileSource" interface to allow you to open the properties page.
  • Addition of ONID as well as NID on the prop page as well as some more bug fixes.

TSFileSource 2.0.1.7

Changes:
  • Changes by nate.
  • Added new duration code.
  • Added improvments to Seeking.
  • Duration updates if file is still growing. This makes it possible to seek right to the end of a file that is still growing.
  • Stopped the FillBuffer method running during a seek. This reduces the chance of getting wierd PCRs.
  • Doesn't stop and start the graph during a seek anymore.
  • I moved the Sleeping from FileReader to TSBuffer. I did this because check for EPG reads a long way into the file before it gives up, so if the file was growing and wasn't very big yet then the CheckForEPG function would hang until the file got big enough. This caused the filter creation to hang.
  • Live Delay mode doesn't work at the moment because I havn't got around to updating the option for it yet.
  • The bitrate code is totally untested at the moment, but it's returning a value so it's doing something.

TSFileSource 2.0.1.6

Changes:
  • Changes by nate.
  • All PID parsing has been moved into classes of it's own.
  • Added a PidInfo and PidInfoArray class to manage all the pid's more easily and have dynamically sized array of programs.
  • I moved all file reading and seeking into it's own class with methods that take __int64 file pointers rather than having to deal with LARGE_INTEGERs each time a seek is done in parsing code.
  • I moved all the demux handling code into it's own class.
  • I merged the CTSSource and CTSSourceFilter classes into one. There's no point having them separate because CTSSource was only derived from CUnknown and all the other interfaces could just as easily be handled in the CTSSourceFilter class.
  • I renamed each occurance of a class or variable name from TSSource to TSFileSource to match the filter name.
  • For filling media samples i created a CTSBuffer class that encapsulates all file reads. This has a few advantages.
  • The amount of data read in each chunk is independant of the size of the samples being sent. This means you can specify a larger file read chunk to cut down on the number of disk reads.
  • We can read further into the file than the size of the next sample to look for a PCR and then have that data already buffered and not have to re-read it when it comes time to send it in a sample.
  • It's easy to change the size of samples and file reads. See the constructors of CTSBuffer and CTSFileSourcePin. I havn't played around with these too much yet to see what the best values are, but i'm using 188000 for each of them now without any problems.
  • I implemented exact PCR calculation for the timing of sending samples to minimise bursting. A PCR value is calculated for the first byte of each sample, even at the start of the file.
  • It does this by using the next and last PCR and their byte position, or if there hasn't been a PCR yet it uses the next two PCRs (assuming they are within the next 1Mb of the file), or if there are no more PCRs it uses the last two previously found PCRs if they exist.
  • Cleaned up the properties dialog.
  • Added GPL headers to the files.
Settings

TSFileSource Filter Property Page Option Settings:


The following options are used for Abnormal operation and should not require changing.

Change File Name Button:
Opens a Window file Browser and allows the user to change the file being played. This is useful to assist in the playback of files for testing etc. Note, it does not change the filename that the application uses.

Prev, Next & Select Buttons:
Enables you to change the sub program that you are viewing, this is only available if you are playing a FULL TSMux file.

Show EPG Button:
This button just mainly displays the Service info, Now & Next information at the current play time.

Refresh Button:
Allows the user to re-parse the file information at the current playback point. This is useful to assist in the playbackof files that have heavy data corruption within them.

Save Button:
Allows the user to save the option settings to the registry, default settings are saved under "HKEY_LOCAL_MACHINE/SOFTWARE/TSFileSource/settings/default". Seperate settings for the Audio preferences and the selected Program IDs are saved under the "settings/ONID:TSID" locations.

Demux Control:
This option enables the filter to work with the MS MPEG2 Demultiplexer only. Disable it if you want to connect to other Demultiplexers such as the Elecard or moonlight Push Demultiplexers. Default setting is enabled.
Note: Never leave the "Demux control" disabled as this could prevent you from playing TS files in Media Players.

NP Control & NP Slave:
These Were options for previous testing and relate to the BDA Graph build with a Network Provider within the graph. Default setting is disabled.

ROT Enable:
This option just allows you to remote connect to the filtergraph using Graphedit. Default setting is disabled.

MPEG Audio pin type:
This is an option for a user to change the audio pin type incase they wish to use a specific audio decoder that is not compatable to the MPEG 2 format. Default setting is MPEG 2.

Audio 2 Preference:
This option allows the user to specify which audio stream to play if there are two of the same audio type. Used for multi language situations elsewhere but not in AU. Default setting is disabled.

AC3 Audio Preference:
This Option allows the user to specify which audio stream media type to play if there are more than one type of stream. The logic follows that when you load the file, the filter will choose the AC3 media type if there is a stream available, else it will use the MPEG pin type chosen. If you are playing a FULL TSMux file, then when changing between programs it will switch to the same media type stream that you were using from the previous program else it will choose the one thats available. Default setting is enabled.
(Note: Specific audio stream selection can only be done from the IAMStreamSelect Interface.)

Enable Teletext Pin:
This option allows the user to create an output pin that is compatable to the DVBTeletextSubtitles filter for digital Teletext useage.(I.e. Closed Captions) Will work but the Teletext filter needs further development to allow it to operate without intervention. Default setting is disabled.

Enable Teletext Pin:
This option allows the user to create an output pin that is compatable for use with other Transport input filters such as mentioned next. It has all the pids for the sub program mapped to it in the same way as the WS TSMux recording type. Default setting is disabled.

Rate Control:
This is an option to limit the data flow out of the filter to mimic a constant broadcast data rate. It is used when using the MPEG-2 Multicast Sender filter or DSNetwork filter so that you can broadcast the file over the network. Default setting is disabled.

Live Delay:
This option just delays the playback of a live file for 2 seconds when the play point reaches the end of the file. That is if you are playing a live recording and you FF to a point past the end of the file, the filter will wait 2 seconds, then resume streaming data. Can be used by converter programs to reduce CPU usage when converting live recordings. Default delay is 100ms. Default setting is disabled.

Default, TSFileSource, Demux & Render:
These Reference Clocks option settings allow a user to choose which reference clock type to use at graph building time, can help with some systems that prefer to use a render clock when they have audio issues. Default setting is TSFileSource.

ZoomPlayer Customised Settings:


Settings & Renders

  • Default Video Rendering Filter = VRM7 (*Some Decoders will not connect to some renders but VRM7 seems to be the most useful that I've found. You can experiment with these to see which one works best.)
  • Default Audio Rendering Device = Default Direct sound device.(*Best to leave this as is unless you wish to play with surround sound devices.)

Source Filters & Splitters

Special Purpose Source Filters
MPEG 2 Transport Profile:-
  • Current Source filter chain = TS FileFilter(AU) (* this can be HDTVPump Filter instead.)
  • Use following file extensions = TS & TSBUFFER (*These are file extensions that ZP will cross reference with when choosing the correct profile for playback)
  • Force Subtype = {E06D8023-DB46-11CF-B4D1-00805F6CBBEA} (*This is a special unique ID key that is allocated to a specific stream type so the source filter will always try and connect to the splitter using this.)

Audio & Video splitters

MPEG 2 Transport Profile:-
  • Current Splitter filter = MPEG2 Demultiplexer (*This is the prefered demux filter for the Push Source Filters)
  • Restrict to these file ext = TS & TSBUFFER
  • Accept the following media subtypes = {E06D8023-DB46-11CF-B4D1-00805F6CBBEA}
    {F4AEB342-0329-4fdd-A8FD-4AFF4926C978}

Audio & Video decoders

Audio Decoders
MPEG 2 Transport Profile:-
  • Current Decoder filter chain = DNTVLive!
  • Use Render overide = Keep default
  • Restrict extensions = TS & TSBUFFER
  • Accept the following media subtypes = {e436eb81-524f-11ce-9f53-0020af0ba770}
    {e06d802b-db46-11cf-b4d1-00805f6cbbea}
    {e06d802c-db46-11cf-b4d1-00805f6cbbea} (*These are the media types that the decoder is able to play, Mpeg 1, 2 & AC3)
Video Decoders
MPEG 2 Transport Profile:-
  • Current Decoder filter chain = DNTVLive! Video
  • Use Render overide = Keep default (*You can change this to a specific render for this profile if you wish, it will overide the default render settings described earlier.)
  • Restrict extensions = TS & TSBUFFER
  • Accept the following media subtypes = {E06D8026-DB46-11CF-B4D1-00805F6CBBEA}
    {F4AEB342-0329-4fdd-A8FD-4AFF4926C978}

Default Media Settings for Players

TSFileSource.reg :
	[HKEY_CLASSES_ROOT\Media Type\Extensions\.ts]
	"Source Filter"="{4F8BF30C-3BEB-43A3-8BF2-10096FD28CF2}"
	[HKEY_CLASSES_ROOT\Media Type\Extensions\.tp]
	"Source Filter"="{4F8BF30C-3BEB-43A3-8BF2-10096FD28CF2}"
	[HKEY_CLASSES_ROOT\Media Type\Extensions\.tsbuffer]
	"Source Filter"="{4F8BF30C-3BEB-43A3-8BF2-10096FD28CF2}"