RE: helix metadata
"Eric Hyche" <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Organization | RealNetworks, Inc. |
| Message-ID | <002a01c9ce42$5fc095f0$1f41c1d0$@com> |
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 >> >