summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2002-09-18 15:43:34 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2002-09-18 15:43:34 +0000
commit011f651f7f50c31675e61a90302964d40d194efe (patch)
treebfc6a7ef786c156d08bd0071adf4d9b18f7229c0 /src
parentab29953ba607800562029a3cab3f23b30e8a96f4 (diff)
downloadxine-lib-011f651f7f50c31675e61a90302964d40d194efe.tar.gz
xine-lib-011f651f7f50c31675e61a90302964d40d194efe.tar.bz2
report stream metadata
CVS patchset: 2694 CVS date: 2002/09/18 15:43:34
Diffstat (limited to 'src')
-rw-r--r--src/dxr3/dxr3_decode_video.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/dxr3/dxr3_decode_video.c b/src/dxr3/dxr3_decode_video.c
index 89b82937c..b6a037f75 100644
--- a/src/dxr3/dxr3_decode_video.c
+++ b/src/dxr3/dxr3_decode_video.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_decode_video.c,v 1.15 2002/09/05 22:18:54 mroi Exp $
+ * $Id: dxr3_decode_video.c,v 1.16 2002/09/18 15:43:34 mroi Exp $
*/
/* dxr3 video decoder plugin.
@@ -584,6 +584,25 @@ static void parse_mpeg_header(dxr3_decoder_t *this, uint8_t * buffer)
this->last_width = this->width;
this->last_height = this->height;
this->last_aspect = this->aspect;
+
+ /* update stream metadata */
+ this->xine->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->width;
+ this->xine->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->height;
+ switch (this->aspect) {
+ case XINE_VO_ASPECT_SQUARE:
+ this->xine->stream_info[XINE_STREAM_INFO_VIDEO_RATIO] = 10000;
+ break;
+ case XINE_VO_ASPECT_4_3:
+ this->xine->stream_info[XINE_STREAM_INFO_VIDEO_RATIO] = 10000 * 4.0 / 3.0;
+ break;
+ case XINE_VO_ASPECT_PAN_SCAN:
+ case XINE_VO_ASPECT_ANAMORPHIC:
+ this->xine->stream_info[XINE_STREAM_INFO_VIDEO_RATIO] = 10000 * 16.0 / 9.0;
+ break;
+ case XINE_VO_ASPECT_DVB:
+ this->xine->stream_info[XINE_STREAM_INFO_VIDEO_RATIO] = 10000 * 2.11;
+ break;
+ }
}
}
@@ -623,6 +642,9 @@ static int get_duration(dxr3_decoder_t *this)
break;
}
+ /* update stream metadata */
+ this->xine->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = duration;
+
if (this->correct_durations) {
/* we set an initial average frame duration here */
if (!this->avg_duration) this->avg_duration = duration;