Chromecast定制接收器发送自定义元数据(Chromecast custom receiver send custom metadata)
我有chromecast定制接收器。 我知道如何通过
mediaMetadata.putString(MediaMetadata.KEY_TITLE, "Something");
发送公共密钥值mediaMetadata.putString(MediaMetadata.KEY_TITLE, "Something");
并在接收器中捕获它们。 我想知道是否有办法将自定义字段作为元数据发送。 像mediaMetadata.putString("...customField", "Something else");
。 每种类型的媒体只允许一组固定的字段,但我想改变它。 这可能吗?I have chromecast custom receiver. I know how to send the common key values through
mediaMetadata.putString(MediaMetadata.KEY_TITLE, "Something");
and capture them in the receiver. I am wondering if there is a way to send custom fields as metadata. Something likemediaMetadata.putString("...customField", "Something else");
. Each type of media only allows a fixed set of fields, but I would like to change this. Is this possible?
原文:https://stackoverflow.com/questions/43039686
最满意答案
如何将后端更改为其他选项? 例如:
import matplotlib as mpl mpl.use( "agg" ) from matplotlib import pyplot as plt import numpy as np print plt.get_backend() file_number = 100 for num in np.arange(file_number): plt.figure('abc' + str(num),figsize=(22,12),dpi=100) #some plots are added to the figure print 1 plt.savefig("%d.png" % num,dpi=100) print 2 plt.close() print 3
How about change the backend to other options? For example:
import matplotlib as mpl mpl.use( "agg" ) from matplotlib import pyplot as plt import numpy as np print plt.get_backend() file_number = 100 for num in np.arange(file_number): plt.figure('abc' + str(num),figsize=(22,12),dpi=100) #some plots are added to the figure print 1 plt.savefig("%d.png" % num,dpi=100) print 2 plt.close() print 3
相关问答
更多-
TCP/IP模型是一个________。[2023-05-19]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
PyQt:RuntimeError:包装的C / C ++对象已被删除(PyQt: RuntimeError: wrapped C/C++ object has been deleted)[2022-07-22]
这个问题的答案如下所示: Python PySide(内部c ++对象已经删除) 显然,使用setCentralWidget将一个小部件分配给QMainWindow,然后使用setCentralWidget分配另一个小部件将导致底层c ++ QWidget被删除,即使我有一个对象保持对它的引用。 注意:QMainWindow获取窗口小部件指针的所有权,并在适当的时候删除它。 This answer to this question is as found here: Python PySide (Inter ... -
事实证明,与wx 2.8相比,在调用Destroy()或其他类似东西之后,首先必须使用wx.Yield() 。 然后事件被处理和销毁。 在所有情况下,使用bool(object)将评估为True或False具体取决于对象是否仍处于活动状态。 Turns out that you first have to wx.Yield() after having called Destroy() or something alike, in contrast to wx 2.8. The events then ge ...
-
PyQt4 - “RuntimeError:基础C / C对象已被删除”(PyQt4 - “RuntimeError: underlying C/C object has been deleted”)[2022-07-26]
我认为问题在于你正在使用QTableWidget项目进行回调,并产生许多连接(坏)。 项目可以更改。 因此,他们可以被删除,使您的回拨死亡。 你想要的只是让itemChanged信号告诉你什么项目改变了,它发生的那一刻。 self.table = QtGui.QTableWidget() ... # only do this once...ever...on the init of the table object QtCore.QObject.connect( self.table, Q ... -
c ++ - 无法使用已与其基础RCW分离的COM对象(c++ - COM object that has been separated from its underlying RCW cannot be used)[2022-11-24]
由于某种原因,'for'块完全将Interop对象与其余代码完全分开。 我设法通过在'for'块中初始化Interop对象来解决问题。 (我已经介绍了一个bool变量,指示工作簿是否已经打开 - 如果它是假的,它会在'for'块中打开它 - 否则它会继续) 有趣的是,该对象可以在'for'块中访问而没有问题。 我确信有一个解释,我不知道 - 我是新手,只是爱好程序员。 It seems for some reason the 'for' block separates completely the Inte ... -
你必须: 将绘图保存到文件图像 读取文件并保存在Odoo二进制字段中 import matplotlib.pyplot as plt x=[1,2,3,4] y=[4,7,9,8] plt.plot(x,y) plt.savefig('/home/user/pic.png') pic_data = open('/home/user/pic.png','rb').read() self.write({'Pic':base64.encodestring(pic_data )}) You have to: Sa ...
-
我结束了使用另一种方法来解决我的测试问题。 我使用的是比较图像的函数,而不是使用matplotlib.testing内置装饰器: from matplotlib.testing.compare import compare_images compare_images(expected='expected.png', actual='actual.png', tol=13, in_decorator=True) 如果测试成功,则返回None如果图像的差异大于阈值,则返回包含一些数据的Dictionary。 ...
-
如何将后端更改为其他选项? 例如: import matplotlib as mpl mpl.use( "agg" ) from matplotlib import pyplot as plt import numpy as np print plt.get_backend() file_number = 100 for num in np.arange(file_number): plt.figure('abc' + str(num),figsize=(22,12),dpi=100) ...
-
有两种方法可以实现 1)一个物体池。 当您“分配”时,您从池中取出一个对象,当您取消分配时,将其返回池中。 这不是那么透明,但实施并不那么难。 2)为您的类/结构创建自定义分配器。 你在一个大缓冲区中预先分配内存,当你需要分配时从那里获取内存,当你需要解除分配时,你将内存返回(实际的机制取决于你)。 这有点难以实现,但可以更透明。 请查看以下链接以获取建议 http://www.drdobbs.com/policy-based-memory-allocation/184402039 http://www.b ...