/************************************************************************** * CoInternetParseUrl (URLMON.@) */ HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved) { if(dwReserved) WARN("dwReserved = %d\n", dwReserved); switch(ParseAction) { case PARSE_CANONICALIZE: return parse_canonicalize_url(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); case PARSE_SECURITY_URL: return parse_security_url(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); case PARSE_ENCODE: return parse_encode(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); case PARSE_PATH_FROM_URL: return parse_path_from_url(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); case PARSE_SCHEMA: return parse_schema(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); case PARSE_SECURITY_DOMAIN: return parse_security_domain(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); case PARSE_DOMAIN: return parse_domain(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); case PARSE_ROOTDOCUMENT: return parse_rootdocument(pwzUrl, dwFlags, pszResult, cchResult, pcchResult); default: FIXME("not supported action %d\n", ParseAction); } return E_NOTIMPL; }
static gboolean gst_rtp_dv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) { GstStructure *structure; GstRTPDVDepay *rtpdvdepay; GstCaps *srccaps; gint clock_rate; gboolean systemstream, ret; const gchar *encode, *media; rtpdvdepay = GST_RTP_DV_DEPAY (depayload); structure = gst_caps_get_structure (caps, 0); if (!gst_structure_get_int (structure, "clock-rate", &clock_rate)) clock_rate = 90000; /* default */ depayload->clock_rate = clock_rate; /* we really need the encode property to figure out the frame size, it's also * required by the spec */ if (!(encode = gst_structure_get_string (structure, "encode"))) goto no_encode; /* figure out the size of one frame */ if (!parse_encode (rtpdvdepay, encode)) goto unknown_encode; /* check the media, this tells us that the stream has video or not */ if (!(media = gst_structure_get_string (structure, "media"))) goto no_media; systemstream = FALSE; if (!strcmp (media, "audio")) { /* we need a demuxer for audio only */ systemstream = TRUE; } else if (!strcmp (media, "video")) { const gchar *audio; /* check the optional audio field, if it's present and set to bundled, we * are dealing with a system stream. */ if ((audio = gst_structure_get_string (structure, "audio"))) { if (!strcmp (audio, "bundled")) systemstream = TRUE; } } /* allocate accumulator */ rtpdvdepay->acc = gst_buffer_new_and_alloc (rtpdvdepay->frame_size); /* Initialize the new accumulator frame. * If the previous frame exists, copy that into the accumulator frame. * This way, missing packets in the stream won't show up badly. */ memset (GST_BUFFER_DATA (rtpdvdepay->acc), 0, rtpdvdepay->frame_size); srccaps = gst_caps_new_simple ("video/x-dv", "systemstream", G_TYPE_BOOLEAN, systemstream, "width", G_TYPE_INT, rtpdvdepay->width, "height", G_TYPE_INT, rtpdvdepay->height, "framerate", GST_TYPE_FRACTION, rtpdvdepay->rate_num, rtpdvdepay->rate_denom, NULL); ret = gst_pad_set_caps (depayload->srcpad, srccaps); gst_caps_unref (srccaps); return ret; /* ERRORS */ no_encode: { GST_ERROR_OBJECT (rtpdvdepay, "required encode property not found in caps"); return FALSE; } unknown_encode: { GST_ERROR_OBJECT (rtpdvdepay, "unknown encode property %s found", encode); return FALSE; } no_media: { GST_ERROR_OBJECT (rtpdvdepay, "required media property not found in caps"); return FALSE; } }