RE: helix metadata
"Eric Hyche" <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Organization | RealNetworks, Inc. |
| Message-ID | <001b01c9ce6d$d0f87230$72e95690$@com> |
Erwan, [Again, please remember to copy a helix mailing list.] > For that reason, I want to know specifically how helix works. That's to >say what happens when a stream is arriving, how does Helix Client parses the >streams, how does it get, retrieve the information to play back the stream, >how the renderer can access to these information. Here's a good place to start: https://helix-client.helixcommunity.org/Architecture > I know that, when a stream is arriving Helix permits to abstract UDP, TCP >protocols or local files. Then it gets the mime type thanks to the >recognizer. This permits to parse the streams in InitializeRenderer(), >comparing the mime type of each renderer with the mime type of the stream. >Concerning the structure that contains the metadata, I don't really know how >it works. I know metadata are retrieved in CreateStreamHeader(). Then >they're put in a stream header. Then, you told me a SDP file was created to >put these information and finally a IHXRegistry. I'd like to know where does >this happen in the source code. > There are several different paths depending on whether playback is via RTSP, HTTP, or local file playback. Which one will you be using? Eric ======================================= Eric Hyche ([email protected]) Principal Engineer RealNetworks, Inc. >-----Original Message----- >From: Erwan Gouyette [mailto:[email protected]] >Sent: Wednesday, May 06, 2009 9:04 AM >To: [email protected] >Subject: RE: [Helix-client-dev] helix metadata > > >Hi! Thanks for replying so quickly. > >-->Do you want to playback the media, or just examine the metadata? > > The thing is I already have a solution to read streams in a set top box. >But the way the parsing of streams is done is no good and Helix Client does >that very well. So I'd like to integrate this solution. > For that reason, I want to know specifically how helix works. That's to >say what happens when a stream is arriving, how does Helix Client parses the >streams, how does it get, retrieve the information to play back the stream, >how the renderer can access to these information. > > I know that, when a stream is arriving Helix permits to abstract UDP, TCP >protocols or local files. Then it gets the mime type thanks to the >recognizer. This permits to parse the streams in InitializeRenderer(), >comparing the mime type of each renderer with the mime type of the stream. >Concerning the structure that contains the metadata, I don't really know how >it works. I know metadata are retrieved in CreateStreamHeader(). Then >they're put in a stream header. Then, you told me a SDP file was created to >put these information and finally a IHXRegistry. I'd like to know where does >this happen in the source code. > >Hope I'm not wrong, thanks a lot, > >Erwan > > > >-----Message d'origine----- >De : Eric Hyche [mailto:[email protected]] >Envoyé : mercredi 6 mai 2009 14:01 >À : 'Erwan Gouyette' >Cc : [email protected] >Objet : RE: [Helix-client-dev] helix metadata > >Erwan, > >[Please copy a Helix mailing list when you send me email about Helix. >Sometimes I won't be able to get to support email like this >for a while and other engineers on the list may be able to help you sooner.] > >>--> I'm interested in retrieving metadata that indicate how to play the >>stream. So, if I'm not wrong, these metadata are retrieved in the stream >>header IHXValues* pHeader, during step 8) CreateStreamHeader(). This is >done >>by the File_Format. Then the stream header pHeader is returned to the >server >>in step 9) StreamHeaderReady(). In this same step the SDP file is created >>but I can't see in which call... Is the stream info file the SDP file? >>Finally I don't know where all informations are put inside a IHXRegistry. >> > >Do you want to playback the media, or just examine the metadata? I was >assuming >you wanted to playback AND observe metadata. If you just want to look at >the metadata, then there is a simpler way of doing that: take a look >at the sample code in datatype/tools/dtdriver/samples/metadata. This uses >the dtdriver framework. > >>--> All this concerns the playback of local files. Is this the same for >>streaming from any server? Cause this is what I'm really concerned about. >> > >Yes - this works for local and streaming cases. > >Eric > >======================================= >Eric Hyche ([email protected]) >Principal Engineer >RealNetworks, Inc. > > >>-----Original Message----- >>From: Erwan Gouyette [mailto:[email protected]] >>Sent: Wednesday, May 06, 2009 5:09 AM >>To: [email protected] >>Subject: RE: [Helix-client-dev] helix metadata >> >> >> >>I found out that : >> >>************************************************************* >> 1)In HXFileSource::InitDone (HX_RESULT status), there's : >> >> m_pFFObject->GetFileHeader(); >> >> >> 2)In CAACFileFormat::GetFileHeader(), there's : >> >> m_pFileObject->Seek( 0, FALSE); >> >> >> 3)In HXFileSource::FileHeaderReady ( HX_RESULT status, IHXValues* >>pHeader), there's : >> >> ContinueWithFileHeader(status, pHeader); >> >> >> 4)In HXFileSource::ContinueWithFileHeader(HX_RESULT status, IHXValues* >>pHeader), there's : >> >> ProcessFileHeader(); >> >> >> 5)In HXFileSource::ProcessFileHeader(void), there's : >> >> HXSource::ProcessFileHeader(); >> and >> m_pFFObject->GetStreamHeader(i); >> >> >> 6)In HXSource::ProcessFileHeader(void), there's : >> >> IHXBuffer* pTitle = NULL; >> IHXBuffer* pAuthor = NULL; >> IHXBuffer* pCopyright = NULL; >> IHXBuffer* pAbstract = NULL; >> IHXBuffer* pDescription = NULL; >> IHXBuffer* pLicenseInfo = NULL; >> IHXBuffer* pKeywords = NULL; >> IHXValues* pValues = NULL; >> IHXValues* pMetaInfo = NULL; >> >> pValues->GetPropertyBuffer("Title", pTitle); >> pValues->GetPropertyBuffer("Author", pAuthor); >> pValues->GetPropertyBuffer("Copyright", pCopyright); >> pValues->GetPropertyBuffer("Abstract", pAbstract); >> pValues->GetPropertyBuffer("Description", pDescription); >> pValues->GetPropertyBuffer("Keywords", pKeywords); >> >> if (!pTitle) m_pFileHeader->GetPropertyBuffer("Title", pTitle); >> if (!pAuthor) m_pFileHeader->GetPropertyBuffer("Author", >pAuthor); >> if (!pCopyright) m_pFileHeader->GetPropertyBuffer("Copyright", >>pCopyright); >> if (!pDescription) m_pFileHeader->GetPropertyCString("Description", >>pDescription); >> if (!pAbstract) m_pFileHeader->GetPropertyCString("Abstract", >>pAbstract); >> if (!pKeywords) m_pFileHeader->GetPropertyCString("Keywords", >>pKeywords); >> >> if (pTitle) pMetaInfo->SetPropertyBuffer("Title", pTitle); >> if (pAuthor) pMetaInfo->SetPropertyBuffer("Author", pAuthor); >> if (pCopyright) pMetaInfo->SetPropertyBuffer("Copyright", >>pCopyright); >> if (pDescription) pMetaInfo->SetPropertyBuffer("Description", >>pDescription); >> if (pAbstract) pMetaInfo->SetPropertyBuffer("Abstract", pAbstract); >> if (pKeywords) pMetaInfo->SetPropertyBuffer("Keywords", pKeywords); >> >> >> 7)In CAACFileFormat::GetStreamHeader(UINT16 unStreamNumber, there's : >> >> retVal = CreateStreamHeader(pBuf); >> >> >> 8)In CAACFileFormat::CreateStreamHeader(IHXBuffer * pAACFrame), there's : >> >> pHdr->SetPropertyULONG32("AvgBitRate", m_ulAvgBitRate); >> >> retVal = m_pFileType->UpdateStreamHeader(pHdr, pAACFrame, m_pContext); >> >> retVal = m_pPayloadFormat->SetStreamHeader(pHdr); >> >> retVal = m_pFormatResponse->StreamHeaderReady(retVal, pHdr); >> >> >> 9)In HXFileSource::StreamHeaderReady(HX_RESULT status, IHXValues* >>pHeader), ther's : >> >> STREAM_INFO* pStreamInfo = NULL; >> >> status = HandleSDPData(pHeader); >> >> StreamHeaderReadyExt(pHeader); >> >> return ProcessStreamHeaders(pHeader, pStreamInfo); >> >> >> 10)In HXFileSource::ProcessStreamHeaders(IHXValues* pHeader, >STREAM_INFO*& >>pStreamInfo), there's : >> >> theErr = HXSource::ProcessStreamHeaders(pHeader, pStreamInfo); >> >> >> 11)In HXSource::ProcessStreamHeaders(IHXValues* pHeader, STREAM_INFO*& >>pStreamInfo), there's : >> >> pHeader->GetPropertyULONG32("StreamNumber", ulStreamNumber); >> pHeader->GetPropertyULONG32("AvgBitRate", ulAvgBitRate); >> pHeader->GetPropertyULONG32("MaxBitRate", ulMaxBitRate); >> pHeader->GetPropertyULONG32("AvgPacketSize", ulAvgPacketSize); >> pHeader->GetPropertyULONG32("Predata", ulPredata); >> pHeader->GetPropertyULONG32("Duration", ulDuration); >> >> pStreamInfo->BufferingState().OnStreamHeader( >> ulStreamNumber, >> ulPreroll, >> ulPredata, >> GetHeaderBOOL(pHeader, "PreDataAtStart"), >> GetHeaderBOOL(pHeader, "PreDataAfterSeek"), >> GetHeaderBOOL(pHeader, "PrerollAtStart"), >> GetHeaderBOOL(pHeader, "PrerollAfterSeek"), >> ulAvgBitRate, >> ulMaxBitRate, >> pMimeType); >>********************************************************************** >> >> >>--> I'm interested in retrieving metadata that indicate how to play the >>stream. So, if I'm not wrong, these metadata are retrieved in the stream >>header IHXValues* pHeader, during step 8) CreateStreamHeader(). This is >done >>by the File_Format. Then the stream header pHeader is returned to the >server >>in step 9) StreamHeaderReady(). In this same step the SDP file is created >>but I can't see in which call... Is the stream info file the SDP file? >>Finally I don't know where all informations are put inside a IHXRegistry. >> >>--> All this concerns the playback of local files. Is this the same for >>streaming from any server? Cause this is what I'm really concerned about. >> >>Thanks a lot, >> >>Erwan >> >> >> >>-----Message d'origine----- >>De : Eric Hyche [mailto:[email protected]] >>Envoyé : mardi 21 avril 2009 18:18 >>À : 'Erwan Gouyette' >>Objet : RE: [Helix-client-dev] helix metadata >> >>In general it works like this: >> >>- file format plugin on the server reads the meta-data out of the media >> file and puts it in a file header IHXValues which it returns to the >> server in a IHXFormatResponse::FileHeaderReady() call. >>- Server takes the meta-data from the file header IHXValues and puts >> it into the SDP which is provided in the RTSP DESCRIBE response. >>- client reads the SDP in the RTSP DESCRIBE response and populates >> the IHXRegistry with the appropriate meta-data, so that other components >> (or the application) can read the meta-data from there. >> >>Eric >> >>======================================= >>Eric Hyche ([email protected]) >>Principal Engineer >>RealNetworks, Inc. >> >> >>>-----Original Message----- >>>From: Erwan Gouyette [mailto:[email protected]] >>>Sent: Tuesday, April 21, 2009 11:24 AM >>>To: [email protected] >>>Subject: RE: [Helix-client-dev] helix metadata >>> >>>Ok, thank you. But what I don't understand is when and how helix client >>>retrieves the metadata that are coming in a stream. I guess that inside >>data >>>received and stocked in a buffer, it has to retrieve metadata to make the >>>renderer work properly. So, in the source code, where does this happen >>>(HXFileSource::Setup())? I thought a stream header was created and >metadata >>>were put inside. Then renderer could access to data through the stream >>>header pointer. Apologies for any inconveniences. Thanks for helping me, >>> >>>Erwan >>> >>>PS: I tried several times and spent hours to build splay but I just can't >>>get through. I could retrieve all sources but I can't go further because >of >>>"authenticity of host can't be established". I don't understand why, it >>>makes no sense. But maybe you could indicate me where to look for a debug >>>trace... Thanks >>> >>> >>>-----Message d'origine----- >>>De : Eric Hyche [mailto:[email protected]] >>>Envoyé : mardi 21 avril 2009 15:27 >>>À : 'Erwan Gouyette'; [email protected] >>>Objet : RE: [Helix-client-dev] helix metadata >>> >>>The metadata for the currently playing clip is stored in the Helix >>>IHXRegistry. For an example of this, build splay and run it with >>>the -a option. Every 1s or so it will print out its entire registry tree, >>>and you should be able to find the relevant metadata >>>there. >>> >>>Eric >>> >>>======================================= >>>Eric Hyche ([email protected]) >>>Principal Engineer >>>RealNetworks, Inc. >>> >>> >>>>-----Original Message----- >>>>From: [email protected] >>>[mailto:[email protected]] >>>>On Behalf Of Erwan Gouyette >>>>Sent: Monday, April 20, 2009 3:54 AM >>>>To: [email protected] >>>>Subject: [Helix-client-dev] helix metadata >>>> >>>>Hello, I'd like to know where (in which function) helix client retrieve >>>metadata about the stream it's >>>>playing? Thanks, >>>> >>>> >>>> >>>>Erwan >>> >> >