Chromecast - 如何播放视频

时间:2016-12-26 18:36:26

标签: java android casting video-streaming chromecast

我最近开始使用Chromecast API。 我正在加载m3u8文件,效果很好。唯一的问题是视频没有拉伸。

这就是我构建MediaInfo的方式:

#ifndef QMFBANK_H
#define QMFBANK_H
#include <memory>

/// Comment about class itself too
class QMFBank
{
public:
    /// Creates a quadrature mirror filter bank
    QMFBank();

    /// Sets the reference to the QMF banks input source
    /// @param p_in A reference to an input source
    virtual void setInputReference(std::shared_ptr<double> p_in) = 0;

    /// Retrieves a reference to the lowpassband output
    /// @return shared pointer to the lowpassband output
    virtual std::shared_ptr<double> getLowBandReference() = 0;

    /// Retrieves a reference to the highpassband output
    /// @return shared pointer to the highpassband output
    virtual std::shared_ptr<double> getHighBandReference() = 0;

    /// Clears (zeros) the filter bank history
    virtual void clearFilter() = 0;

    /// Updates the filter bank.
    /// When this method is called, the filter bank will retrieve
    /// a new input and update its outputs
    virtual void update() = 0;
};

#endif // QMFBANK_H

有没有办法迫使chromecast占用整个电视? 目前它看起来很奇怪,因为左右两个黑条。

非常感谢!

1 个答案:

答案 0 :(得分:1)

根据此thread,Chromecast会自动缩放窗口的宽高比以填满电视屏幕,在侧面添加黑条以避免拉伸。例如1440x900的全屏分辨率在大型1080p电视上显示效果不错,但是全屏显示2560x1600显示器时,70英寸电视上的文字无法读取。