if (!gst_width_ || !gst_height_)
GetFrameDetails();
+ GstCaps* caps = gst_sample_get_caps(sample);
+ if (caps) {
+ GstVideoInfo vi;
+ gst_video_info_from_caps(&vi, caps);
+ int width = GST_VIDEO_INFO_WIDTH(&vi);
+ int height = GST_VIDEO_INFO_HEIGHT(&vi);
+
+ if (width != gst_width_|| height != gst_height_) {
+ LOG (INFO) << __FUNCTION__
+ << " ###### from " << gst_width_ << "X" << gst_height_
+ << " to " << width << "X" << height;
+ gst_width_ = width;
+ gst_height_ = height;
+ manager()->OnMediaDataChange(
+ GetPlayerId(), video_format_, gst_height_, gst_width_, media_type);
+ }
+ }
+
base::TimeDelta timestamp =
base::TimeDelta::FromMicroseconds(
GST_BUFFER_TIMESTAMP(buffer) /