Index: /trunk/src/VBox/Main/src-client/EbmlWriter.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/EbmlWriter.cpp	(revision 68331)
+++ /trunk/src/VBox/Main/src-client/EbmlWriter.cpp	(revision 68332)
@@ -54,6 +54,10 @@
     };
 
+    /** Stack of EBML sub elements. */
     std::stack<EbmlSubElement> m_Elements;
-    RTFILE m_File;
+    /** The file's handle. */
+    RTFILE                     m_File;
+    /** The file's name (path). */
+    Utf8Str                    m_strFile;
 
 public:
@@ -69,5 +73,17 @@
     inline int create(const char *a_pszFilename, uint64_t fOpen)
     {
-        return RTFileOpen(&m_File, a_pszFilename, fOpen);
+        int rc = RTFileOpen(&m_File, a_pszFilename, fOpen);
+        if (RT_SUCCESS(rc))
+        {
+            m_strFile = a_pszFilename;
+        }
+
+        return rc;
+    }
+
+    /** Returns the file name. */
+    inline const Utf8Str& getFileName(void)
+    {
+        return m_strFile;
     }
 
@@ -104,4 +120,6 @@
         RTFileClose(m_File);
         m_File = NIL_RTFILE;
+
+        m_strFile = "";
     }
 
@@ -1106,4 +1124,9 @@
 }
 
+const Utf8Str& WebMWriter::GetFileName(void)
+{
+    return m_pImpl->m_Ebml.getFileName();
+}
+
 uint64_t WebMWriter::GetFileSize(void)
 {
Index: /trunk/src/VBox/Main/src-client/EbmlWriter.h
===================================================================
--- /trunk/src/VBox/Main/src-client/EbmlWriter.h	(revision 68331)
+++ /trunk/src/VBox/Main/src-client/EbmlWriter.h	(revision 68332)
@@ -31,4 +31,8 @@
 
 #include <iprt/file.h>
+
+#include <VBox/com/string.h> /* For Utf8Str. */
+
+using namespace com;
 
 class WebMWriter_Impl;
@@ -123,4 +127,11 @@
 
     /**
+     * Gets file name.
+     *
+     * @returns File name as UTF-8 string.
+     */
+    const Utf8Str& GetFileName(void);
+
+    /**
      * Gets current output file size.
      *
