|Publication number||US7349395 B2|
|Application number||US 10/602,415|
|Publication date||25 Mar 2008|
|Filing date||23 Jun 2003|
|Priority date||23 Jun 2003|
|Also published as||US20040258060|
|Publication number||10602415, 602415, US 7349395 B2, US 7349395B2, US-B2-7349395, US7349395 B2, US7349395B2|
|Inventors||Wenhong Liu, Tuan D. Le, Matthijs A. Gates|
|Original Assignee||Microsoft Corporation|
|Export Citation||BiBTeX, EndNote, RefMan|
|Patent Citations (16), Referenced by (13), Classifications (15), Legal Events (4)|
|External Links: USPTO, USPTO Assignment, Espacenet|
The described subject matter relates to computing systems, and more particularly to a system, method, and computer program product for parsing a packetized, multiprogram transport stream.
MPEG-2 is a known data transport protocol adapted for multiplexing more than one data stream (e.g., video, audio, and data) to produce a single program, i.e., a logical grouping of video, audio and/or data streams. MPEG-2 provides a basic framework for integrated video, audio, and data services. Common uses for MPEG-2 include high definition television (HDTV), digital video broadcast (DVB), Advanced Television Systems Committee (ATSC), and other digital streaming applications.
An MPEG-2 data stream must be decoded before the content in the data stream may be presented to a user. Many broadcasters of MPEG-2 data streams develop proprietary hardware and software systems to decode their MPEG-2 data stream. For example, cable and satellite television broadcasters typically provide a set-top box to decode their broadcast stream before presenting it on a television screen.
In addition, many consumer electronic devices, e.g., digital camcorders and DVD players, generate output that is transmitted in an MPEG-2 data stream. The output may be processed for display by an application executing on a computing device, and may be displayed on a monitor and/or speakers connected to the computing device. Because an MPEG-2 data stream may include content from multiple, different sources, and because the content might change over time, it is necessary to parse the data stream during processing to permit an application to identify and process the desired data from the data stream.
In an exemplary implementation, a method of computing is provided. Portions of a packetized, multi-program transport stream are received. The transport stream includes program specific information about data in the packetized, multi-program transport stream. At least one program identifier is extracted from the program specific information and provided to an external application.
In another exemplary implementation, a method of processing a packetized, multi-program transport stream is provided. Program specific information is extracted from a packetized, multi-program transport stream and parsed to obtain at least one program identifier associated with a program in the packetized, multi-program transport stream. An output of a demultiplexer is configured based on at least one program identifier.
In another exemplary implementation, a method of computing is provided. A plurality of program identifiers are retrieved from a received MPEG-2 transport stream and presented in a user interface. A signal indicating a selected program identifier is received from the user interface, and an MPEG-2 demultiplexer is configured based on the selected program identifier.
In an exemplary implementation, the packetized, multi-program transport stream is embodied as an MPEG-2 transport stream. A parser filter retrieves program specific information (PSI) from the MPEG-2 transport stream. Initially, the parser filter retrieves a program association table (PAT), the contents of which are used to obtain information from the program map tables (PMTs) for one or more programs in the transport stream. The parser filter forwards information extracted from the PMT tables in transport stream to an external application, which may display the PMT information in a suitable user interface. In addition, the PMT information may be used to configure the output of an MPEG-2 demultiplexer. This arrangement permits monitoring of the contents of an MPEG-2 transport stream and dynamic configuration of a MPEG-2 multiplexer to accommodate changes in the program information contained in the MPEG-2 transport stream.
Exemplary methods, systems, and devices are disclosed for parsing a packetized, multi-program transport stream to obtain information about specific programs within the program stream. The obtained information may be transmitted to an external application, which may display the information in a user interface. In addition, the obtained information may be used to select content from the data stream.
Exemplary Computing System
Computing device 130 further includes a hard disk drive 144 for reading from and writing to a hard disk 144, a magnetic disk drive 146 for reading from and writing to a removable magnetic disk 148, and an optical disk drive 150 for reading from or writing to a removable optical disk 152 such as a CD ROM or other optical media. The hard disk drive 144, magnetic disk drive 146, and optical disk drive 150 are connected to the bus 136 by an SCSI interface 154 or some other appropriate interface. The drives and their associated computer-readable media provide nonvolatile storage of computer-readable instructions, data structures, program modules and other data for computing device 130. Although the exemplary environment described herein employs a hard disk, a removable magnetic disk 148 and a removable optical disk 152, it should be appreciated by those skilled in the art that other types of computer-readable media which can store data that is accessible by a computer, such as magnetic cassettes, flash memory cards, digital video disks, random access memories (RAMs), read only memories (ROMs), and the like, may also be used in the exemplary operating environment.
A number of program modules may be stored on the hard disk 144, magnetic disk 148, optical disk 152, ROM 138, or RAM 140, including an operating system 158, one or more application programs 160, other program modules 162, and program data 164. A user may enter commands and information into computing device 130 through input devices such as a keyboard 166 and a pointing device 168. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are connected to the processing unit 132 through an interface 170 that is coupled to the bus 136. A monitor 172 or other type of display device is also connected to the bus 136 via an interface, such as a video adapter 174. In addition to the monitor, personal computers typically include other peripheral output devices (not shown) such as speakers and printers.
Computing device 130 commonly operates in a networked environment using logical connections to one or more remote computers, such as a remote computer 176. The remote computer 176 may be another personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to computing device 130, although only a memory storage device 178 has been illustrated in
When used in a LAN networking environment, computing device 130 is connected to the local network 180 through a network interface or adapter 184. When used in a WAN networking environment, computing device 130 typically includes a modem 186 or other means for establishing communications over the wide area network 182, such as the Internet. The modem 186, which may be internal or external, is connected to the bus 136 via a serial port interface 156. In a networked environment, program modules depicted relative to the computing device 130, or portions thereof, may be stored in the remote memory storage device. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.
Generally, the data processors of computing device 130 are programmed by means of instructions stored at different times in the various computer-readable storage media of the computer. Programs and operating systems may be distributed, for example, on floppy disks, CD-ROMs, or via a communication network such as, e.g., the Internet. From there, they are installed or loaded into the secondary memory of a computer. At execution, they are loaded at least partially into the computer's primary electronic memory. Embodiments described herein include these and other various types of computer-readable storage media when such media contain instructions or programs for implementing the steps described below in conjunction with a microprocessor or other data processor. Embodiments described herein also include the computer itself when programmed according to the methods and techniques described below.
Exemplary Coding and Decoding of MPEG-2 Transport Stream
An ES is broken up into packets, forming a packetized elementary stream (PES). In
The MPEG-2 standard defines two ways to deliver packetized elementary streams: program streams and transport streams. Program streams are designed for environments that are relatively error free, such as local file storage. In a program stream, the PES packets are multiplexed and organized into units called packs. All of the PES streams in a program stream are synchronized to the same clock.
Transport streams (TS) are designed for unreliable or error-prone environments, such as network broadcasts. An MPEG-2 transport stream can contain multiple programs that are synchronized to different clocks. A transport stream adds a second layer of packetizing—the PES streams are broken into transport stream packets, with a fixed size of 188 bytes per packet. Transport stream packets can also contain program information, described below. In this document, the term “transport stream” is used generically to refer to both program streams and transport streams.
Each transport stream packet has a 4-byte header. The multiplexer 230 assigns a packet ID (PID) to each PES stream or program information stream within the transport stream. If a transport stream contains multiple programs, then the stream IDs might not be unique, but the PID assignments are unique within the transport stream.
In the decoding process, the MPEG-2 transport stream 232 is received in a demultiplexer 234, which demultiplexes the transport stream 232 and outputs a video PES 236 and an audio PES 238. The video PES 236 is input to a depacketizer 240, the output of which is directed to a video decoder 242, which decodes the video stream and outputs a video bitstream 244. Similarly, the audio PES 238 is input to a depacketizer 250, the output of which is directed to an audio decoder 252, which decodes the video stream and outputs a video bitstream 254. The video bitstream 244 may be displayed on a suitable device, e.g., a monitor, and the audio bitstream 254 may be played on a suitable device, e.g., speakers.
The multiplexer may be configured to generate additional outputs. In the exemplary embodiment depicted in
An MPEG-2 transport stream can carry multiple programs, i.e., bitstreams from multiple, different sources. Therefore, there needs to be a way to associate PES packets with the programs to which they belong. This is accomplished using data in the transport stream that identifies the individual program streams. Collectively, this data is referred to Program Specific Information (PSI). PSI data is multiplexed into packets when MPEG-2 data is encoded. PSI data includes a program association table (PAT) and a program map table (PMT).
Each PMT includes a list of streams for the program and a corresponding table entry gives the PID for the each stream. The PMT also includes a code that identifies the stream type, e.g., video, audio, data, etc. By way of example,
ISO/IEC 13818-1 defines some standard stream types, an abbreviated list of which is provided in the following table.
0x05 - 0x7F
. . .
0x80 - 0xFF
Other standards that are based on MPEG-2, such as ATSC, may define additional stream types in the “user private” range. For example, ATSC defines 0×81 as Dolby AC-3 audio. In addition, PSI can include Conditional Access Tables (CAT) and Network Identification Tables (NIT).
The MPEG-2 transport stream 415 is directed to an MPEG-2 demultiplexer 420. The MPEG-2 demultiplexer is configurable to demultiplex the MPEG-2 transport stream and to generate a plurality of output streams. In the exemplary embodiment depicted in
MPEG-2 demultiplexer 420 may also be configured to output PSI on an output 465. The PSI is directed to a PSI parser 470, which parses the PSI received in the MPEG-2 transport stream and extracts at least one program identifier associated with data in the MPEG-2, which may then be provided to an external application 480 over a communication link 475. External application 480 may include an application that utilizes an MPEG-2 transport stream, e.g., a DVD player or other multimedia player. The external application 480 may display the program identifier(s) received from the PSI parser 470 and may use the program identifier(s) to configure and/or reconfigure the MPEG-2 demultiplexer 420 to output the video, audio, and/or data programs of interest to the external application, e.g., by passing a command over communication link 485.
Exemplary Parsing Operation
The process illustrated in
At step 512 the PID of a retrieved section is analyzed to determine whether the PID is a PAT or a PMT. When the PSI parser filter 470 is initially instantiated it will lack information about the contents of the transport stream. Therefore, after its initial instantiation, the first retrieved packet will be a PAT, i.e., a section that has a PID of zero (0). Accordingly, at operation 512, control is passed to operation 514, which determines whether the PAT is currently applicable. In an exemplary embodiment, this may be determined by checking the current_next_indicator in the PAT table. If the PAT is not currently applicable, then the PAT is discarded at operation 516 and processing of the PAT is terminated.
By contrast, if the PAT is currently applicable, then control passes to operation 518, which determines whether the transport stream identifier is new. In an exemplary embodiment, this may be performed by storing the transport stream identifier in a suitable memory location and comparing the received transport stream identifier with the stored transport stream identifier. If the transport stream identifier is new, then at operation 526 the existing PAT and PMT information (See,
At operation 532, the new PMT PIDs are mapped to the output pins of the demultiplexer 420. In an exemplary embodiment, this operation is performed by the external application 480.
If, at operation 518 it is determined that the transport stream identifier is not new, then control passes to operation 520, which determines whether the section number is new. In an exemplary embodiment, this may be performed by storing the section number in a suitable memory location and comparing the received section number with the stored section number. If the section number is new, then control passes to operation 530, and the new section number is stored in memory and the external application 480 is notified that a new PAT section has been received. Operation 532 is executed as described above.
By contrast, if the section number is not new, then control passes to operation 522, which determines whether the version number is new. In an exemplary embodiment, this may be performed by storing the version number in a suitable memory location and comparing the received version number with the stored version number. If the version number is not new, then the PAT is discarded at operation 524. However, if the version number is new, the operations 526 through 632 are executed, as described above.
Referring again to operation 512, if the retrieved section represents a PMT, then control passes to operation 534, and the parser filter 470 reads the program number of the retrieved section. At operation 536 it is determined whether the section was already read. It will be appreciated that the same section may be transmitted multiple times in the transport stream, e.g., for error correction purposes. This is illustrated in
If at operation 536 it is determined that the section has already been read, then control passes to step 540, which determines whether the section has a new version number. In an exemplary embodiment, this may be performed by storing the version number in a suitable memory location and comparing the received version number with the stored version number. If the version number is not new, then the section may be discarded, at operation 542. However, if the section number is new, then at operation 544 the section is replaced and the external application 480 is notified of the replaced section.
By executing the operations outlined in
Microsoft Corporation of Redmond, Wash., USA, has developed a series of application programming interfaces (APIs) that define a media-streaming architecture for the Microsoft “WINDOWS” operating system. This architecture is referred to commercially as the “DIRECTSHOW” application programming interface. The platform enables developers to write applications that can perform high-quality video and audio playback or capture.
The building blocks of “DIRECTSHOW” applications are software components called filters. A filter is a software component that performs some operation on a multimedia stream. For example, filters can read files, get video from a video capture device, decode various stream formats, including MPEG-2 streams, and pass data to a graphics or sound card. Filters can receive input and produce output. For example, if a filter decodes MPEG-2 video, then the input is an MPEG-2 encoded bitstream and the output is a series of uncompressed video frames. An application performs a task by connecting chains of filters together, so that the output from one filter becomes the input for another. A set of connected filters is called a filter graph.
In an exemplary embodiment, the architecture illustrated in
An MPEG-2 demultiplexer 664 receives the MPEG-2 transport stream on an input pin 666. MPEG-2 demultiplexer 664 may be embodied as a filter that receives an input stream, demultiplexes the input stream, and generates an output on one or more output pins. The demultiplexer filter is instantiated with no output pins. The IMpeg2Demultiplexer::CreateOutputPin method may be used to create an output pin 668 on the demultiplexer filter. Alternatively, the property page on the demultiplexer may be used to create an output pin 668 with media type MPEG-2 PSI. This pin will deliver the PAT and PMT sections, and to map PID 0×00 to the output pin 668. The content type may be set to MPEG2 PSI Sections.
A PSI parser filter 670 is instantiated and has an input pin 672 connected to an output pin 668 of the demultiplexer 664. When the graph is executed, the PSI Parser filter 670 receives Program Specific Information (PSI) from an MPEG-2 transport stream and extracts program information from the PAT and PMTs in the transport stream. As the PSI parser filter 670 decodes the PAT sections, the PMT PIDs are mapped to the output pin 668 on the demultiplexer, so that the PSI parser filter receives the PMT sections.
After the PSI parser filter 670 retrieves Program Specific Information (PSI) tables from the MPEG-2 transport stream input to the demultiplexer 664, the PSI tables may be processed as described with reference to
In operation, a user may enter an audio PID number in the audio PID edit box 635, and the video PID number in the Video PID edit box 640. The user may then click the View Program button 650. The PSI parser filter 670 will configure the output pins on the demultiplexer 664 to match the program stream information and render the pins.
In an alternate embodiment, the PSI parser 670 may be used by an application to programmatically configure the output pins of the demultiplexer 664. To use the PSI Parser filter 670 in an application, a filter graph from an MPEG-2 source to the MPEG-2 demultiplexer is created. Next, an output pin on the demux for the PSI data is created and PID 0×00, which is reserved for PAT sections, is mapped to this pin, as shown in the following code fragment:
// Set the media type to MPEG-2 table sections.
// Create the pin.
hr = pDemux->CreateOutputPin(&mt, L“PSI”, &pPsiPin);
// Map to PID 0.
ULONG Pid = 0x00;
hr = pPid->MapPID(1, &Pid, MEDIA_MPEG2_PSI);
The PSI Parser filter is added to the graph and connected to the output pin on the demultiplexer 664. The PSI parser filter 670 supports a custom interface, IMpeg2PsiParser, for retrieving the PSI information from a transport stream. The IMpeg2PsiParser interface exposes the following methods.
Finds the Program Map Table (PMT)
PID for a program, given the program
Retrieves the number of elementary
streams in a specified program.
Retrieves the number of programs in the
Retrieves the version_number field
from the Program Association Table
Retrieves the version_number field
from a specified PMT.
Retrieves the PID assignment for a
specified elementary stream in a
Retrieves the PID assignment for a
Retrieves the program number for a
Retrieves the stream type for a specified
elementary stream in a program.
Retrieves the transport_stream_id field
from the PAT.
The PSI Parser queries the IMpeg2PsiParser interface. When the graph is executed and a new PAT or PMT section is received, an EC_PROGRAM_CHANGED signal is generated by the PSI Parser filter. When an EC_PROGRAM_CHANGED event is received, IMpeg2PsiParser methods may be invoked to retrieve the available PSI information.
By way of example, the GetCountOfPrograms method may be used to retrieve the number of programs, as illustrated in the following code fragment.
Similarly, the GetRecordProgramNumber method may be used to get the program number for a specific program, as illustrated in the following code fragment.
WORD ProgNum = 0;
for (int i = 0; iProgram < NumProgs; i++)
hr = pPsi->GetRecordProgramNumber(i, &ProgNum);
The program number may be used to obtain the PMT entries for individual programs. The GetCountOfElementaryStreams method may be used to get the number of elementary streams in a program, as illustrated in the following code fragment.
For each elementary stream, the GetRecordElementaryPid method returns the PID, and the GetRecordStreamType method returns the stream type, as illustrated in the following code fragment.
BYTE ESType = 0;
WORD ESPid = 0;
for (ULONG j = 0; j < cElemStreams; j++)
hr = pPsi->GetRecordElementaryPid(ProgNum, j, &ESPid);
hr = pPsi->GetRecordStreamType(ProgNum, j, &ESType);
The PID and the stream type enable a user to programmatically configure output pins on the MPEG-2 Demultiplexer. To create an output pin, a user may call the IMpeg2Demultiplexer::CreateOutputPin method, which creates a new output pin on the demultiplexer 664. Next, one or more stream IDs are assigned to the new output pin. For transport streams, query the pin for IMPEG2PIDMap and call IMPEG2PIDMap::MapPID. The MPEG-2 Demultiplexer can create new pins and new PID mappings while the graph is running, but the graph should be stopped to connect pins.
Described herein are exemplary methods for parsing a packetized, multi-program transport stream and for retrieving program-specific information associated with programs in the transport stream. The program-specific information may be presented in a user interface, which may receive a signal from a user to select a particular program for further processing. The signal is processed and may be used to configure the output pins of a demultiplexer. Alternatively, the method may be implemented to programmatically configure the output pins of the demultiplexer. The methods may be executed as a continuous process, so that changes in the program stream are detected substantially in real-time. The demultiplexer may be reconfigured to accommodate the changes.
One skilled in the art will recognize that the methods described herein can readily be extended to process sections that are format-specific, e.g., DVB or ASTC.
The methods described herein may be embodied as logic instructions written on a computer-readable medium. These logic instructions may be executed by the processor of a computing device to configure the computing device as an apparatus that performs the described methods.
Although the described arrangements and procedures have been described in language specific to structural features and/or methodological operations, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or operations described. Rather, the specific features and operations are disclosed as preferred forms of implementing the claimed present subject matter.
|Cited Patent||Filing date||Publication date||Applicant||Title|
|US5913038||13 Dec 1996||15 Jun 1999||Microsoft Corporation||System and method for processing multimedia data streams using filter graphs|
|US5920572 *||11 Jan 1996||6 Jul 1999||Divicom Inc.||Transport stream decoder/demultiplexer for hierarchically organized audio-video streams|
|US6097380||24 Jun 1996||1 Aug 2000||Microsoft Corporation||Continuous media stream control|
|US6229801||26 Sep 1997||8 May 2001||International Business Machines Corporation||Delivery of MPEG2 compliant table data|
|US6434171 *||6 Oct 1998||13 Aug 2002||Fujitsu Limited||Digital multiplex transmission apparatus|
|US6999424 *||24 Jan 2000||14 Feb 2006||Ati Technologies, Inc.||Method for displaying data|
|US20010009548 *||20 Dec 2000||26 Jul 2001||U.S. Philips Corporation||Method and apparatus for converting data streams|
|US20010028780 *||29 Sep 1997||11 Oct 2001||Samsung Electronics Co., Ltd.||Multimedia system for transferring and receiving program number and methods therefor|
|US20010033619 *||27 Feb 2001||25 Oct 2001||Tsuyoshi Hanamura||Apparatus, method and computer program product for transcoding a coded multiplexed sound and moving picture sequence|
|US20020016969||13 Apr 2001||7 Feb 2002||International Business Machines Corporation||Media on demand system and method|
|US20020048450||18 May 2001||25 Apr 2002||International Business Machines Corporation||System and method of processing MPEG streams for file index insertion|
|US20020087969||28 Dec 2000||4 Jul 2002||International Business Machines Corporation||Interactive TV audience estimation and program rating in real-time using multi level tracking methods, systems and program products|
|US20020166123||17 Jan 2002||7 Nov 2002||Microsoft Corporation||Enhanced television services for digital video recording and playback|
|US20030002584||4 Sep 2002||2 Jan 2003||International Business Machines Corporation||MPEG video decoder with integrated scaling and display functions|
|US20030035649 *||18 Oct 2001||20 Feb 2003||Chung Hyun-Kwon||Method and apparatus for recording and reproducing video data, and information storage medium in which video data is recorded by the same|
|US20030055879||20 Sep 2001||20 Mar 2003||International Business Machines Corporation||Translation and substitution of transmitted environmental data|
|Citing Patent||Filing date||Publication date||Applicant||Title|
|US7724682 *||17 Jan 2006||25 May 2010||Broadcom Corp.||Method and system for generating transport stream packets|
|US7792144 *||14 Nov 2005||7 Sep 2010||Broadcom Corporation||Processing data packets using navigational hardware assist|
|US8081656||2 Sep 2010||20 Dec 2011||Broadcom Corporation||Processing data packets using navigational hardware assist|
|US8098657||10 Jan 2006||17 Jan 2012||Broadcom Corporation||System and method for providing data commonality in a programmable transport demultiplexer engine|
|US8132215 *||26 Oct 2004||6 Mar 2012||Panasonic Corporation||Apparatus for receiving broadcast signal|
|US8345677 *||12 May 2005||1 Jan 2013||Brian Crookes||Digital program mapping|
|US8745674||22 Dec 2011||3 Jun 2014||Panasonic Corporation||Apparatus for receiving broadcast signal|
|US20050091697 *||26 Oct 2004||28 Apr 2005||Matsushita Electric Industrial Co., Ltd.||Apparatus for receiving broadcast signal|
|US20060025093 *||28 Jul 2004||2 Feb 2006||Microsoft Corporation||Broadcast metadata plug-in model|
|US20060026662 *||28 Jul 2004||2 Feb 2006||Microsoft Corporation||Broadcast metadata format independent of transmission standard|
|US20060209709 *||17 Jan 2006||21 Sep 2006||Ati Technologies, Inc.||Method and system for generating transport stream packets|
|US20060268864 *||10 Jan 2006||30 Nov 2006||Rodgers Stephane W||System and method for providing data commonality in a programmable transport demultiplexer engine|
|US20060291460 *||12 May 2005||28 Dec 2006||Brian Crookes||Digital program mapping|
|U.S. Classification||370/392, 348/E05.005, 375/E07.268, 370/537|
|International Classification||H04L12/28, H04N7/58, H04N5/00|
|Cooperative Classification||H04N21/2365, H04N21/4347, H04N21/4345, H04N21/434|
|European Classification||H04N21/434V, H04N21/434S, H04N21/2365, H04N21/434|
|23 Jun 2003||AS||Assignment|
Owner name: MICROSOFT CORPORATION, WASHINGTON
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:LIU, WENHONG;LE, TUAN D.;GATES, MATTHIJS A.;REEL/FRAME:014245/0455
Effective date: 20030623
|24 Aug 2011||FPAY||Fee payment|
Year of fee payment: 4
|9 Dec 2014||AS||Assignment|
Owner name: MICROSOFT TECHNOLOGY LICENSING, LLC, WASHINGTON
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MICROSOFT CORPORATION;REEL/FRAME:034541/0477
Effective date: 20141014
|9 Sep 2015||FPAY||Fee payment|
Year of fee payment: 8